From 373e686bf4ecaaabcf80544e74f017eebe05213f Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Mon, 4 Aug 2008 03:27:13 +0000 Subject: [FIX] Cleaned up the RC file [FIX] Script editing is getting there (still a little weird...) [FIX] Cleaned up the main file a bit [FIX] Added the Skin class [FIX] All sprites and skins are internally linked now [FIX] No more image restraints (tiles are still enforced so that map editing works) [FIX] Cleaned up checking for valid values when setting in pokemod [FIX] Removed FileDialog files git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@233 6ecfd1a5-f3ed-3746-8530-beee90d26b22 --- pokescripting/TileWrapper.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'pokescripting/TileWrapper.h') diff --git a/pokescripting/TileWrapper.h b/pokescripting/TileWrapper.h index c78a2cea..babc304e 100644 --- a/pokescripting/TileWrapper.h +++ b/pokescripting/TileWrapper.h @@ -20,6 +20,7 @@ // Pokescripting includes #include "ObjectWrapper.h" +#include "SpriteWrapper.h" // Pokemod includes #include "../pokemod/Tile.h" @@ -34,7 +35,7 @@ class POKESCRIPTING_EXPORT TileWrapper : public ObjectWrapper TileWrapper(const Pokemod::Tile* tile, QObject* parent); public slots: QString name() const; - QPixmap sprite() const; + const SpriteWrapper* sprite() const; bool from(const int direction) const; private: TileWrapper& operator=(const TileWrapper& rhs); @@ -53,9 +54,9 @@ inline QString TileWrapper::name() const return m_tile->name(); } -inline QPixmap TileWrapper::sprite() const +inline const Pokescripting::SpriteWrapper* TileWrapper::sprite() const { - return m_tile->sprite(); + return new SpriteWrapper(pokemod()->spriteById(m_tile->sprite()), const_cast(this)); } inline bool TileWrapper::from(const int direction) const -- cgit