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/CoinListObjectWrapper.h | 42 ++++------------------------------- 1 file changed, 4 insertions(+), 38 deletions(-) (limited to 'pokescripting/CoinListObjectWrapper.h') 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 -- cgit