From b3121b898d96effa8d2d48f858c5838a005eb780 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Thu, 7 Oct 2010 01:23:35 +0200 Subject: [PATCH] Urrgh. Seriously. --- data/Memory-ng.xml | 20 ++++++++++++++++++++ library/include/dfhack/modules/Maps.h | 18 ++++++++++++++++-- library/modules/Materials.cpp | 2 +- tools/examples/creaturedump.cpp | 10 +++++++++- 4 files changed, 46 insertions(+), 4 deletions(-) diff --git a/data/Memory-ng.xml b/data/Memory-ng.xml index 917e0a8ef..473d70989 100644 --- a/data/Memory-ng.xml +++ b/data/Memory-ng.xml @@ -1746,6 +1746,26 @@ + + + + + + +
+ AS BOGUS AS IT GETS +
+
+
+
+ + +
+ + +
+ + .-"""-. ' \ diff --git a/library/include/dfhack/modules/Maps.h b/library/include/dfhack/modules/Maps.h index d1957c6b8..fcadecc92 100644 --- a/library/include/dfhack/modules/Maps.h +++ b/library/include/dfhack/modules/Maps.h @@ -149,6 +149,14 @@ namespace DFHack liquid_magma }; + enum e_liquidcharacter + { + liquid_fresh, + liquid_unk1, + liquid_salt, + liquid_unk2, + }; + struct naked_designation { unsigned int flow_size : 3; // how much liquid is here? @@ -188,8 +196,14 @@ namespace DFHack unsigned int feature_local : 1; /// this tile is a part of a global feature. can be combined with 'featstone' tiles unsigned int feature_global : 1; - /// those ripples on streams? - unsigned int liquid_character : 2; + /** + * water characteristics + * fresh=0 + * ?=1 + * salt=2 + * ?=3 + */ + e_liquidcharacter liquid_character : 2; }; union t_designation diff --git a/library/modules/Materials.cpp b/library/modules/Materials.cpp index 608e7b663..343fa99c0 100644 --- a/library/modules/Materials.cpp +++ b/library/modules/Materials.cpp @@ -402,7 +402,7 @@ bool Materials::ReadCreatureTypesEx (void) p->readSTLString (caste_start + sizeof_string, caste.singular, sizeof(caste.singular)); p->readSTLString (caste_start + 2 * sizeof_string, caste.plural, sizeof(caste.plural)); p->readSTLString (caste_start + 3 * sizeof_string, caste.adjective, sizeof(caste.adjective)); - cout << "Caste " << caste.rawname << " " << caste.singular << ": 0x" << hex << caste_start << endl; + //cout << "Caste " << caste.rawname << " " << caste.singular << ": 0x" << hex << caste_start << endl; if(have_advanced) { /* color mod reading */ diff --git a/tools/examples/creaturedump.cpp b/tools/examples/creaturedump.cpp index dddd6e018..ac691316b 100644 --- a/tools/examples/creaturedump.cpp +++ b/tools/examples/creaturedump.cpp @@ -302,7 +302,15 @@ void printCreature(DFHack::Context * DF, const DFHack::t_creature & creature) { cout << ", "; } - cout << mem->getSkill(creature.defaultSoul.skills[i].id) << ": " << creature.defaultSoul.skills[i].rating; + try + { + cout << mem->getSkill(creature.defaultSoul.skills[i].id) << ": " << creature.defaultSoul.skills[i].rating; + } + catch(DFHack::Error::MissingMemoryDefinition &e) + { + cout << "Unknown skill! : " << creature.defaultSoul.skills[i].id <<", rating: " << creature.defaultSoul.skills[i].rating << endl; + cout << e.what() << endl; + } } cout << endl; cout << "Traits" << endl;