diff options
| author | Quietust | 2012-03-15 20:43:27 -0500 |
|---|---|---|
| committer | Quietust | 2012-03-15 20:43:27 -0500 |
| commit | aa7f13266bf9a9ebdbf0eb4f7340400260b225e0 (patch) | |
| tree | 61b5f62a733dab33d2ed03df68a01cfa4de3a20b /plugins/dwarfexport | |
| parent | 5464564ef6aae3a4c3e7c2b708c02149a2224a56 (diff) | |
| download | dfhack-aa7f13266bf9a9ebdbf0eb4f7340400260b225e0.tar.gz dfhack-aa7f13266bf9a9ebdbf0eb4f7340400260b225e0.tar.bz2 dfhack-aa7f13266bf9a9ebdbf0eb4f7340400260b225e0.tar.xz | |
Fix dwarfexport to use enum macros
Diffstat (limited to 'plugins/dwarfexport')
| -rw-r--r-- | plugins/dwarfexport/dwarfexport.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/plugins/dwarfexport/dwarfexport.cpp b/plugins/dwarfexport/dwarfexport.cpp index 98a9862e..5db1bf22 100644 --- a/plugins/dwarfexport/dwarfexport.cpp +++ b/plugins/dwarfexport/dwarfexport.cpp @@ -110,7 +110,7 @@ static void printTraits(color_ostream &con, df::unit* cre, ostream& out) { FOR_ENUM_ITEMS(personality_facet_type,index) { - out << " <Trait name='" << df::enums::personality_facet_type::get_key(index) << + out << " <Trait name='" << ENUM_KEY_STR(personality_facet_type, index) << "' value='" << s->traits[index] << "'>"; //FIXME: needs reimplementing trait string generation /* @@ -143,12 +143,11 @@ static void printLabors(color_ostream &con, df::unit* cre, ostream& out) { // Using British spelling here, consistent with Runesmith out << " <Labours>" << endl; - for (int iCount = 0; iCount < sizeof(cre->status.labors); iCount++) + FOR_ENUM_ITEMS(unit_labor, iCount) { if (cre->status.labors[iCount]) { // Get the caption for the labor index. - df::enums::unit_labor::unit_labor thisLabor = (df::enums::unit_labor::unit_labor)iCount; - element("Labour", get_caption(thisLabor), out); + element("Labour", ENUM_ATTR_STR(unit_labor, caption, iCount), out); } } out << " </Labours>" << endl; @@ -158,7 +157,7 @@ static void printSkill(color_ostream &con, df::unit_skill* skill, ostream& out) { out << " <Skill>" << endl; - element("Name", get_caption(skill->id), out); + element("Name", ENUM_ATTR_STR(job_skill, caption, skill->id), out); element("Level", skill->rating, out); out << " </Skill>" << endl; |
