summaryrefslogtreecommitdiffstats
path: root/pokescripting/TileWrapper.h
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2008-08-05 06:10:55 +0000
committerBen Boeckel <MathStuf@gmail.com>2008-08-05 06:10:55 +0000
commitcf49a16b29ac412cfea125f7216a0e51e79aa4de (patch)
treefc3eb0271f3de0d7900c2a33ab5eafa259d8d250 /pokescripting/TileWrapper.h
parent56b91df6010a9f3d304438cf95816399a6e46622 (diff)
downloadsigen-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/TileWrapper.h')
-rw-r--r--pokescripting/TileWrapper.h27
1 files changed, 4 insertions, 23 deletions
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