diff --git a/library/include/dfhack/DFMemInfo.h b/library/include/dfhack/DFMemInfo.h index 6eafee7a3..77b28ccd0 100644 --- a/library/include/dfhack/DFMemInfo.h +++ b/library/include/dfhack/DFMemInfo.h @@ -41,7 +41,7 @@ namespace DFHack { private: class Private; - Private * d; + Private * d; public: enum OSType { @@ -66,7 +66,7 @@ namespace DFHack uint32_t getAddress (const char *); uint32_t getHexValue (const char *); - std::string getMood(const uint32_t moodID); + std::string getMood(const uint32_t moodID); std::string getString (const std::string&); std::string getProfession(const uint32_t) const; std::string getJob(const uint32_t) const; @@ -74,9 +74,9 @@ namespace DFHack std::string getTrait (const uint32_t, const uint32_t) const; std::string getTraitName(const uint32_t) const; std::string getLabor (const uint32_t); - std::vector< std::vector > const& getAllTraits(); + std::vector< std::vector > const& getAllTraits(); - DFHack::t_level getLevelInfo(const uint32_t level) const; + DFHack::t_level getLevelInfo(const uint32_t level) const; void setVersion(const char *); void setVersion(const std::string&); @@ -105,12 +105,12 @@ namespace DFHack void setJob(const std::string &, const std::string &); void setSkill(const std::string &, const std::string &); void setTrait(const std::string &, const std::string &, const std::string &, - const std::string &, const std::string &, - const std::string &, const std::string &, const std::string &); + const std::string &, const std::string &, + const std::string &, const std::string &, const std::string &); void setLabor(const std::string &, const std::string &); - void setLevel(const std::string &nLevel, const std::string &nName, - const std::string &nXp); - void setMood(const std::string &id, const std::string &mood); + void setLevel(const std::string &nLevel, const std::string &nName, + const std::string &nXp); + void setMood(const std::string &id, const std::string &mood); void RebaseVTable(const int32_t offset); void setParentProcess(Process * _p); diff --git a/library/modules/Materials.cpp b/library/modules/Materials.cpp index 3567bb0d0..c3e358b69 100644 --- a/library/modules/Materials.cpp +++ b/library/modules/Materials.cpp @@ -301,8 +301,8 @@ bool Materials::ReadCreatureTypesEx (void) uint32_t bodypart_id_offset = mem->getOffset ("bodypart_id"); uint32_t bodypart_category_offset = mem->getOffset ("bodypart_category"); uint32_t bodypart_layers_offset = mem->getOffset ("bodypart_layers_vector"); - uint32_t bodypart_singular_offset = mem->getOffset ("bodypart_singular_vector"); - uint32_t bodypart_plural_offset = mem->getOffset ("bodypart_plural_vector"); + uint32_t bodypart_singular_offset = mem->getOffset ("bodypart_singular_vector"); // unused + uint32_t bodypart_plural_offset = mem->getOffset ("bodypart_plural_vector"); // unused uint32_t color_modifier_part_offset = mem->getOffset ("color_modifier_part"); uint32_t color_modifier_startdate_offset = mem->getOffset ("color_modifier_startdate"); uint32_t color_modifier_enddate_offset = mem->getOffset ("color_modifier_enddate"); @@ -318,7 +318,18 @@ bool Materials::ReadCreatureTypesEx (void) for (uint32_t i = 0; i < size;i++) { t_creaturetype mat; + // FROM race READ + // std::string rawname AT 0, + // char tile_character AT tile_offset, + // word tilecolor.fore : tile_color_offset, + // word tilecolor.back : tile_color_offset + 2, + // word tilecolor.bright : tile_color_offset + 4 p->readSTLString (p_races[i], mat.rawname, sizeof(mat.rawname)); + mat.tile_character = p->readByte( p_races[i] + tile_offset ); + mat.tilecolor.fore = p->readWord( p_races[i] + tile_color_offset ); + mat.tilecolor.back = p->readWord( p_races[i] + tile_color_offset + 2 ); + mat.tilecolor.bright = p->readWord( p_races[i] + tile_color_offset + 4 ); + DfVector p_castes(p, p_races[i] + castes_vector_offset); sizecas = p_castes.size(); for (uint32_t j = 0; j < sizecas;j++) @@ -364,11 +375,6 @@ bool Materials::ReadCreatureTypesEx (void) mat.castes.push_back(caste); } - mat.tile_character = p->readByte( p_races[i] + tile_offset ); - mat.tilecolor.fore = p->readWord( p_races[i] + tile_color_offset ); - mat.tilecolor.back = p->readWord( p_races[i] + tile_color_offset + 2 ); - mat.tilecolor.bright = p->readWord( p_races[i] + tile_color_offset + 4 ); - DfVector p_extract(p, p_races[i] + extract_vector_offset); for(uint32_t j = 0; j < p_extract.size(); j++) { diff --git a/output/Memory.xml b/output/Memory.xml index bf2b1c8f0..5d036c0e0 100755 --- a/output/Memory.xml +++ b/output/Memory.xml @@ -1844,6 +1844,13 @@ dwarf_race_index = 0x014abef4 0x1A14 0xE0 0xF6 + +