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/MapWildListWrapper.h | 29 ++++++----------------------- 1 file changed, 6 insertions(+), 23 deletions(-) (limited to 'pokescripting/MapWildListWrapper.h') diff --git a/pokescripting/MapWildListWrapper.h b/pokescripting/MapWildListWrapper.h index b11a2346..56ecb721 100644 --- a/pokescripting/MapWildListWrapper.h +++ b/pokescripting/MapWildListWrapper.h @@ -19,14 +19,17 @@ #define __POKESCRIPTING_MAPWILDLISTWRAPPER__ // Pokescripting includes -#include "MapWildListEncounterWrapper.h" #include "ObjectWrapper.h" // Pokemod includes +#include "../pokemod/Hat.h" #include "../pokemod/MapWildList.h" namespace Pokescripting { +// Forward declarations +class MapWildListEncounterWrapper; + class POKESCRIPTING_EXPORT MapWildListWrapper : public ObjectWrapper { Q_OBJECT @@ -38,6 +41,8 @@ class POKESCRIPTING_EXPORT MapWildListWrapper : public ObjectWrapper m_instances[wildList->id()] = new MapWildListWrapper(wildList, parent); return qobject_cast(m_instances[wildList->id()]); } + + Pokemod::Hat encounterHat(); public slots: QString name() const; @@ -49,28 +54,6 @@ class POKESCRIPTING_EXPORT MapWildListWrapper : public ObjectWrapper const Pokemod::MapWildList* m_wildList; }; - -inline MapWildListWrapper::MapWildListWrapper(const Pokemod::MapWildList* wildList, QObject* parent) : - ObjectWrapper(wildList, parent), - m_wildList(wildList) -{ -} - -inline QString MapWildListWrapper::name() const -{ - return m_wildList->name(); -} - -inline MapWildListEncounterWrapper* MapWildListWrapper::encounter(const int index) -{ - return MapWildListEncounterWrapper::create(m_wildList->encounter(index), this); -} - -inline int MapWildListWrapper::encounterCount() const -{ - return m_wildList->encounterCount(); -} - } #endif -- cgit