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/BadgeWrapper.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'pokescripting/BadgeWrapper.h') 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(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(this)); } inline int BadgeWrapper::obey() const -- cgit