From cf49a16b29ac412cfea125f7216a0e51e79aa4de Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Tue, 5 Aug 2008 06:10:55 +0000 Subject: [FIX] List members of pokemod classes now can be returned in their entirety [FIX] Reworked pokescripting for ease of use [FIX] Now (selected) pokemod values can be overridden in pokescripting git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@237 6ecfd1a5-f3ed-3746-8530-beee90d26b22 --- pokescripting/MapEffectWrapper.h | 28 +++++----------------------- 1 file changed, 5 insertions(+), 23 deletions(-) (limited to 'pokescripting/MapEffectWrapper.h') diff --git a/pokescripting/MapEffectWrapper.h b/pokescripting/MapEffectWrapper.h index a4fbb19f..c053937f 100644 --- a/pokescripting/MapEffectWrapper.h +++ b/pokescripting/MapEffectWrapper.h @@ -20,13 +20,15 @@ // Pokescripting includes #include "ObjectWrapper.h" -#include "SkinWrapper.h" // Pokemod includes #include "../pokemod/MapEffect.h" namespace Pokescripting { +// Forward declarations +class SkinWrapper; + class POKESCRIPTING_EXPORT MapEffectWrapper : public ObjectWrapper { Q_OBJECT @@ -40,36 +42,16 @@ class POKESCRIPTING_EXPORT MapEffectWrapper : public ObjectWrapper } public slots: QString name() const; + QPoint coordinate() const; SkinWrapper* skin(); bool isGhost() const; + Pokemod::Script script() const; private: MapEffectWrapper(const Pokemod::MapEffect* effect, QObject* parent); MapEffectWrapper& operator=(const MapEffectWrapper& rhs); const Pokemod::MapEffect* m_effect; }; - -inline MapEffectWrapper::MapEffectWrapper(const Pokemod::MapEffect* effect, QObject* parent) : - ObjectWrapper(effect, parent), - m_effect(effect) -{ -} - -inline QString MapEffectWrapper::name() const -{ - return m_effect->name(); -} - -inline Pokescripting::SkinWrapper* MapEffectWrapper::skin() -{ - return SkinWrapper::create(pokemod()->skinById(m_effect->skin()), this); -} - -inline bool MapEffectWrapper::isGhost() const -{ - return m_effect->isGhost(); -} - } #endif -- cgit