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/TrainerWrapper.h | 58 +++--------------------------------------- 1 file changed, 4 insertions(+), 54 deletions(-) (limited to 'pokescripting/TrainerWrapper.h') diff --git a/pokescripting/TrainerWrapper.h b/pokescripting/TrainerWrapper.h index ba24d105..e55497cb 100644 --- a/pokescripting/TrainerWrapper.h +++ b/pokescripting/TrainerWrapper.h @@ -18,15 +18,17 @@ #ifndef __POKESCRIPTING_TRAINERWRAPPER__ #define __POKESCRIPTING_TRAINERWRAPPER__ -// Pokemod includes +// Pokescripting includes #include "ObjectWrapper.h" -#include "SkinWrapper.h" // Pokemod includes #include "../pokemod/Trainer.h" namespace Pokescripting { +// Forward declarations +class SkinWrapper; + class POKESCRIPTING_EXPORT TrainerWrapper : public ObjectWrapper { Q_OBJECT @@ -54,58 +56,6 @@ class POKESCRIPTING_EXPORT TrainerWrapper : public ObjectWrapper const Pokemod::Trainer* m_trainer; }; - -inline TrainerWrapper::TrainerWrapper(const Pokemod::Trainer* trainer, QObject* parent) : - ObjectWrapper(trainer, parent), - m_trainer(trainer) -{ -} - -inline QString TrainerWrapper::TrainerWrapper::name() const -{ - return m_trainer->name(); -} - -inline int TrainerWrapper::TrainerWrapper::moneyFactor() const -{ - return m_trainer->moneyFactor(); -} - -inline Pokescripting::SkinWrapper* TrainerWrapper::TrainerWrapper::skin() -{ - return SkinWrapper::create(pokemod()->skinById(m_trainer->skin()), this); -} - -inline int TrainerWrapper::TrainerWrapper::depth() const -{ - return m_trainer->depth(); -} - -inline int TrainerWrapper::TrainerWrapper::teamIntel() const -{ - return m_trainer->teamIntel(); -} - -inline int TrainerWrapper::TrainerWrapper::moveIntel() const -{ - return m_trainer->moveIntel(); -} - -inline int TrainerWrapper::TrainerWrapper::itemIntel() const -{ - return m_trainer->itemIntel(); -} - -inline int TrainerWrapper::TrainerWrapper::abilityIntel() const -{ - return m_trainer->abilityIntel(); -} - -inline int TrainerWrapper::TrainerWrapper::statIntel() const -{ - return m_trainer->statIntel(); -} - } #endif -- cgit