summaryrefslogtreecommitdiff
path: root/src/resources
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/db/itemdb.cpp12
-rw-r--r--src/resources/iteminfo.cpp5
-rw-r--r--src/resources/iteminfo.h4
-rw-r--r--src/resources/skillconsts.h6
-rw-r--r--src/resources/updatefile.h6
5 files changed, 17 insertions, 16 deletions
diff --git a/src/resources/db/itemdb.cpp b/src/resources/db/itemdb.cpp
index c2d58fccc..32b724de9 100644
--- a/src/resources/db/itemdb.cpp
+++ b/src/resources/db/itemdb.cpp
@@ -224,9 +224,9 @@ void ItemDB::load()
mUnknown->setName(_("Unknown item"));
mUnknown->setDisplay(SpriteDisplay());
std::string errFile = paths.getStringValue("spriteErrorFile");
- mUnknown->setSprite(errFile, GENDER_MALE, 0);
- mUnknown->setSprite(errFile, GENDER_FEMALE, 0);
- mUnknown->setSprite(errFile, GENDER_OTHER, 0);
+ mUnknown->setSprite(errFile, Gender::MALE, 0);
+ mUnknown->setSprite(errFile, Gender::FEMALE, 0);
+ mUnknown->setSprite(errFile, Gender::OTHER, 0);
mUnknown->addTag(mTags["All"]);
loadXmlFile(paths.getStringValue("itemsFile"), tagNum);
loadXmlFile(paths.getStringValue("itemsPatchFile"), tagNum);
@@ -749,11 +749,11 @@ void loadSpriteRef(ItemInfo *const itemInfo, const XmlNodePtr node)
const int race = XML::getProperty(node, "race", 0);
if (gender == "male" || gender == "unisex")
- itemInfo->setSprite(filename, GENDER_MALE, race);
+ itemInfo->setSprite(filename, Gender::MALE, race);
if (gender == "female" || gender == "unisex")
- itemInfo->setSprite(filename, GENDER_FEMALE, race);
+ itemInfo->setSprite(filename, Gender::FEMALE, race);
if (gender == "other" || gender == "unisex")
- itemInfo->setSprite(filename, GENDER_OTHER, race);
+ itemInfo->setSprite(filename, Gender::OTHER, race);
}
void loadSoundRef(ItemInfo *const itemInfo, const XmlNodePtr node)
diff --git a/src/resources/iteminfo.cpp b/src/resources/iteminfo.cpp
index d405e6909..e6b56c43b 100644
--- a/src/resources/iteminfo.cpp
+++ b/src/resources/iteminfo.cpp
@@ -84,7 +84,7 @@ ItemInfo::~ItemInfo()
mSpriteToItemReplaceMap[f] = nullptr;
}
-const std::string &ItemInfo::getSprite(const Gender gender,
+const std::string &ItemInfo::getSprite(const Gender::Type gender,
const int race) const
{
if (mView)
@@ -346,7 +346,8 @@ int ItemInfo::getDrawPriority(const int direction) const
}
void ItemInfo::setSprite(const std::string &animationFile,
- const Gender gender, const int race)
+ const Gender::Type gender,
+ const int race)
{
mAnimationFiles[static_cast<int>(gender) + race * 4] = animationFile;
}
diff --git a/src/resources/iteminfo.h b/src/resources/iteminfo.h
index 9b8c1656a..4ea61664d 100644
--- a/src/resources/iteminfo.h
+++ b/src/resources/iteminfo.h
@@ -165,9 +165,9 @@ class ItemInfo final
{ mView = view; }
void setSprite(const std::string &animationFile,
- const Gender gender, const int race);
+ const Gender::Type gender, const int race);
- const std::string &getSprite(const Gender gender,
+ const std::string &getSprite(const Gender::Type gender,
const int race) const A_WARN_UNUSED;
void setAttackAction(const std::string &attackAction);
diff --git a/src/resources/skillconsts.h b/src/resources/skillconsts.h
index fd5181515..bba04eb47 100644
--- a/src/resources/skillconsts.h
+++ b/src/resources/skillconsts.h
@@ -18,10 +18,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef GUI_RESOURCES_SKILLCONSTS_H
-#define GUI_RESOURCES_SKILLCONSTS_H
+#ifndef RESOURCES_SKILLCONSTS_H
+#define RESOURCES_SKILLCONSTS_H
const int SKILL_MIN_ID = 200000;
const unsigned int SKILL_VAR_MIN_ID = 1000000;
-#endif // GUI_RESOURCES_SKILLCONSTS_H
+#endif // RESOURCES_SKILLCONSTS_H
diff --git a/src/resources/updatefile.h b/src/resources/updatefile.h
index 0e07fc112..fb4e522d8 100644
--- a/src/resources/updatefile.h
+++ b/src/resources/updatefile.h
@@ -20,8 +20,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef GUI_RESOURCES_UPDATEFILE_H
-#define GUI_RESOURCES_UPDATEFILE_H
+#ifndef RESOURCES_UPDATEFILE_H
+#define RESOURCES_UPDATEFILE_H
#include <string>
@@ -45,4 +45,4 @@ struct UpdateFile final
bool required;
};
-#endif // GUI_RESOURCES_UPDATEFILE_H
+#endif // RESOURCES_UPDATEFILE_H