summaryrefslogtreecommitdiffstats
path: root/pokescripting/TileWrapper.cpp
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2008-08-26 18:23:31 +0000
committerBen Boeckel <MathStuf@gmail.com>2008-08-26 18:23:31 +0000
commit940e5d4b55bbd1261bf0ccb3a915b79cf2a240c8 (patch)
tree68d3ebfe3f0763d4dbcd7e642b065f6cde73fb8c /pokescripting/TileWrapper.cpp
parentaa5ecfc2ac5c1b9c250159d01f1e83799e88eb45 (diff)
downloadsigen-940e5d4b55bbd1261bf0ccb3a915b79cf2a240c8.tar.gz
sigen-940e5d4b55bbd1261bf0ccb3a915b79cf2a240c8.tar.xz
sigen-940e5d4b55bbd1261bf0ccb3a915b79cf2a240c8.zip
[FIX] Fixed some minor typos
[FIX] Abstracted validation out to ValidationDialog [FIX] Added stat and Direction getters for Pokemod git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@244 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokescripting/TileWrapper.cpp')
-rw-r--r--pokescripting/TileWrapper.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/pokescripting/TileWrapper.cpp b/pokescripting/TileWrapper.cpp
index 8cec95f5..648bd39d 100644
--- a/pokescripting/TileWrapper.cpp
+++ b/pokescripting/TileWrapper.cpp
@@ -20,6 +20,7 @@
// Pokescripting includes
#include "PokemodWrapper.h"
+#include "SpriteWrapper.h"
Pokescripting::TileWrapper* Pokescripting::TileWrapper::create(const Pokemod::Tile* tile, PokemodWrapper* parent)
{
@@ -43,7 +44,9 @@ Pokescripting::SpriteWrapper* Pokescripting::TileWrapper::sprite()
{
if (value("sprite").canConvert<QString>())
{
- // TODO: Check sprite dimensions
+ SpriteWrapper* sprite = pokemod()->sprite(value("sprite").toString());
+ if (sprite && sprite->sprite().size() == QSize(64, 64))
+ return sprite;
}
return pokemod()->sprite(m_tile->sprite());
}