summaryrefslogtreecommitdiffstats
path: root/pokescripting/BadgeWrapper.h
diff options
context:
space:
mode:
Diffstat (limited to 'pokescripting/BadgeWrapper.h')
-rw-r--r--pokescripting/BadgeWrapper.h13
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