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/TileWrapper.h | 27 ++++----------------------- 1 file changed, 4 insertions(+), 23 deletions(-) (limited to 'pokescripting/TileWrapper.h') diff --git a/pokescripting/TileWrapper.h b/pokescripting/TileWrapper.h index 0bf72ed2..57722df3 100644 --- a/pokescripting/TileWrapper.h +++ b/pokescripting/TileWrapper.h @@ -20,13 +20,15 @@ // Pokescripting includes #include "ObjectWrapper.h" -#include "SpriteWrapper.h" // Pokemod includes #include "../pokemod/Tile.h" namespace Pokescripting { +// Forward declarations +class SpriteWrapper; + class POKESCRIPTING_EXPORT TileWrapper : public ObjectWrapper { Q_OBJECT @@ -42,34 +44,13 @@ class POKESCRIPTING_EXPORT TileWrapper : public ObjectWrapper QString name() const; SpriteWrapper* sprite(); bool from(const int direction) const; + Pokemod::Script script() const; private: TileWrapper(const Pokemod::Tile* tile, QObject* parent); TileWrapper& operator=(const TileWrapper& rhs); const Pokemod::Tile* m_tile; }; - -inline TileWrapper::TileWrapper(const Pokemod::Tile* tile, QObject* parent) : - ObjectWrapper(tile, parent), - m_tile(tile) -{ -} - -inline QString TileWrapper::name() const -{ - return m_tile->name(); -} - -inline Pokescripting::SpriteWrapper* TileWrapper::sprite() -{ - return SpriteWrapper::create(pokemod()->spriteById(m_tile->sprite()), this); -} - -inline bool TileWrapper::from(const int direction) const -{ - return m_tile->from(direction); -} - } #endif -- cgit