diff options
| author | Ben Boeckel <MathStuf@gmail.com> | 2008-08-05 06:10:55 +0000 |
|---|---|---|
| committer | Ben Boeckel <MathStuf@gmail.com> | 2008-08-05 06:10:55 +0000 |
| commit | cf49a16b29ac412cfea125f7216a0e51e79aa4de (patch) | |
| tree | fc3eb0271f3de0d7900c2a33ab5eafa259d8d250 /pokescripting/CoinListObjectWrapper.h | |
| parent | 56b91df6010a9f3d304438cf95816399a6e46622 (diff) | |
| download | sigen-cf49a16b29ac412cfea125f7216a0e51e79aa4de.tar.gz sigen-cf49a16b29ac412cfea125f7216a0e51e79aa4de.tar.xz sigen-cf49a16b29ac412cfea125f7216a0e51e79aa4de.zip | |
[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
Diffstat (limited to 'pokescripting/CoinListObjectWrapper.h')
| -rw-r--r-- | pokescripting/CoinListObjectWrapper.h | 42 |
1 files changed, 4 insertions, 38 deletions
diff --git a/pokescripting/CoinListObjectWrapper.h b/pokescripting/CoinListObjectWrapper.h index 117b6d11..1b86840f 100644 --- a/pokescripting/CoinListObjectWrapper.h +++ b/pokescripting/CoinListObjectWrapper.h @@ -19,15 +19,17 @@ #define __POKESCRIPTING_COINLISTOBJECTWRAPPER__ // Pokescripting includes -#include "ItemWrapper.h" #include "ObjectWrapper.h" -#include "SpeciesWrapper.h" // Pokemod includes #include "../pokemod/CoinListObject.h" namespace Pokescripting { +// Forward declarations +class ItemWrapper; +class SpeciesWrapper; + class POKESCRIPTING_EXPORT CoinListObjectWrapper : public ObjectWrapper { Q_OBJECT @@ -51,42 +53,6 @@ class POKESCRIPTING_EXPORT CoinListObjectWrapper : public ObjectWrapper const Pokemod::CoinListObject* m_object; }; - -inline CoinListObjectWrapper::CoinListObjectWrapper(const Pokemod::CoinListObject* object, QObject* parent) : - ObjectWrapper(object, parent), - m_object(object) -{ -} - -inline int CoinListObjectWrapper::type() const -{ - return m_object->type(); -} - -inline ItemWrapper* CoinListObjectWrapper::itemObject() -{ - if (m_object->type() == Pokemod::CoinListObject::Item) - return ItemWrapper::create(pokemod()->itemById(m_object->object()), this); - return NULL; -} - -inline SpeciesWrapper* CoinListObjectWrapper::speciesObject() -{ - if (m_object->type() == Pokemod::CoinListObject::Species) - return SpeciesWrapper::create(pokemod()->speciesById(m_object->object()), this); - return NULL; -} - -inline int CoinListObjectWrapper::amount() const -{ - return m_object->amount(); -} - -inline int CoinListObjectWrapper::cost() const -{ - return m_object->cost(); -} - } #endif |
