diff options
| author | Ben Boeckel <MathStuf@gmail.com> | 2008-08-04 03:27:13 +0000 |
|---|---|---|
| committer | Ben Boeckel <MathStuf@gmail.com> | 2008-08-04 03:27:13 +0000 |
| commit | 373e686bf4ecaaabcf80544e74f017eebe05213f (patch) | |
| tree | cddf7a223f16944b0380386e568f2606f634c366 /pokescripting/BadgeWrapper.h | |
| parent | 63417b1c5057d22bd853e92cd3a25aa812b8d917 (diff) | |
| download | sigen-373e686bf4ecaaabcf80544e74f017eebe05213f.tar.gz sigen-373e686bf4ecaaabcf80544e74f017eebe05213f.tar.xz sigen-373e686bf4ecaaabcf80544e74f017eebe05213f.zip | |
[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
Diffstat (limited to 'pokescripting/BadgeWrapper.h')
| -rw-r--r-- | pokescripting/BadgeWrapper.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/pokescripting/BadgeWrapper.h b/pokescripting/BadgeWrapper.h index bafb1509..6cfd637a 100644 --- a/pokescripting/BadgeWrapper.h +++ b/pokescripting/BadgeWrapper.h @@ -20,6 +20,7 @@ // Pokescripting includes #include "ObjectWrapper.h" +#include "SpriteWrapper.h" // Pokemod includes #include "../pokemod/Badge.h" @@ -34,8 +35,8 @@ class POKESCRIPTING_EXPORT BadgeWrapper : public ObjectWrapper BadgeWrapper(const Pokemod::Badge* badge, QObject* parent); public slots: QString name() const; - QPixmap face() const; - QPixmap badge() const; + const SpriteWrapper* face() const; + const SpriteWrapper* badge() const; int obey() const; Pokemod::Fraction stat(const int stat) const; private: @@ -55,14 +56,14 @@ inline QString BadgeWrapper::name() const return m_badge->name(); } -inline QPixmap BadgeWrapper::face() const +inline const Pokescripting::SpriteWrapper* BadgeWrapper::face() const { - return m_badge->face(); + return new SpriteWrapper(pokemod()->spriteById(m_badge->face()), const_cast<BadgeWrapper*>(this)); } -inline QPixmap BadgeWrapper::badge() const +inline const Pokescripting::SpriteWrapper* BadgeWrapper::badge() const { - return m_badge->badge(); + return new SpriteWrapper(pokemod()->spriteById(m_badge->badge()), const_cast<BadgeWrapper*>(this)); } inline int BadgeWrapper::obey() const |
