diff options
Diffstat (limited to 'src/resources')
-rw-r--r-- | src/resources/itemdb.cpp | 8 | ||||
-rw-r--r-- | src/resources/iteminfo.cpp | 2 | ||||
-rw-r--r-- | src/resources/iteminfo.h | 6 |
3 files changed, 9 insertions, 7 deletions
diff --git a/src/resources/itemdb.cpp b/src/resources/itemdb.cpp index 5f6846ba..d507987a 100644 --- a/src/resources/itemdb.cpp +++ b/src/resources/itemdb.cpp @@ -100,8 +100,8 @@ void ItemDB::load() mUnknown = new ItemInfo(); mUnknown->setName("Unknown item"); mUnknown->setImageName(""); - mUnknown->setSprite("error.xml", 0); - mUnknown->setSprite("error.xml", 1); + mUnknown->setSprite("error.xml", GENDER_MALE); + mUnknown->setSprite("error.xml", GENDER_FEMALE); ResourceManager *resman = ResourceManager::getInstance(); int size; @@ -241,12 +241,12 @@ void loadSpriteRef(ItemInfo *itemInfo, xmlNodePtr node) if (gender == "male" || gender == "unisex") { - itemInfo->setSprite(filename, 0); + itemInfo->setSprite(filename, GENDER_MALE); } if (gender == "female" || gender == "unisex") { - itemInfo->setSprite(filename, 1); + itemInfo->setSprite(filename, GENDER_FEMALE); } } diff --git a/src/resources/iteminfo.cpp b/src/resources/iteminfo.cpp index ad4c9797..4322db8d 100644 --- a/src/resources/iteminfo.cpp +++ b/src/resources/iteminfo.cpp @@ -26,7 +26,7 @@ #include "itemdb.h" const std::string& -ItemInfo::getSprite(int gender) const +ItemInfo::getSprite(Gender gender) const { if (mView) { diff --git a/src/resources/iteminfo.h b/src/resources/iteminfo.h index 90675a17..43047094 100644 --- a/src/resources/iteminfo.h +++ b/src/resources/iteminfo.h @@ -30,6 +30,8 @@ #include "spritedef.h" +#include "../player.h" + enum EquipmentSoundEvent { EQUIP_EVENT_STRIKE, @@ -131,10 +133,10 @@ class ItemInfo void setView(int view) { mView = view; } - void setSprite(const std::string &animationFile, int gender) + void setSprite(const std::string &animationFile, Gender gender) { mAnimationFiles[gender] = animationFile; } - const std::string& getSprite(int gender) const; + const std::string& getSprite(Gender gender) const; void setWeaponType(int); |