summaryrefslogtreecommitdiff
path: root/src/resources/itemdb.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources/itemdb.cpp')
-rw-r--r--src/resources/itemdb.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/resources/itemdb.cpp b/src/resources/itemdb.cpp
index c05d4604..4b3024a7 100644
--- a/src/resources/itemdb.cpp
+++ b/src/resources/itemdb.cpp
@@ -30,6 +30,7 @@
#include "../log.h"
#include "../utils/dtor.h"
+#include "../utils/gettext.h"
#include "../utils/xml.h"
namespace
@@ -53,8 +54,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);
XML::Document doc("items.xml");
xmlNodePtr rootNode = doc.rootNode();
@@ -93,9 +94,9 @@ void ItemDB::load()
if (id)
{
- ItemInfo *itemInfo = new ItemInfo();
+ ItemInfo *itemInfo = new ItemInfo;
itemInfo->setImageName(image);
- itemInfo->setName((name == "") ? "Unnamed" : name);
+ itemInfo->setName(name.empty() ? _("Unnamed") : name);
itemInfo->setDescription(description);
itemInfo->setEffect(effect);
itemInfo->setType(type);
@@ -172,12 +173,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);
}
}