Sync, fixes.

develop
Petr Mrázek 2010-08-31 06:52:03 +02:00
parent 9bcdc78d00
commit b9bee108e1
6 changed files with 36 additions and 29 deletions

@ -892,7 +892,7 @@
</Group>
</Group>
<Group name="Creatures" description="Offsets used by the Creatures module.">
<Address name="creature_vector"/>
<Address name="vector"/>
<Address name="current_race" description="Index of the current player race." />
<Address name="current_civ" description="Index of the current player civilization." />
<Group name="creature">
@ -953,7 +953,7 @@
<Address name="organics_plants" description="plant matter" />
<Address name="organics_trees" description="just wood" />
<Address name="creature_type_vector" description="A vector of creature races" />
<Address name="other" description="Base material types? Code suggests it's a null-terminated string of string pointers?" />
<Address name="other" description="Base material types? Code suggests it's a null-terminated string of string pointers? Is this used at all?" />
<Group name="creature" description="Creature race objects">
<Offset name="caste_vector" description="A race is divided into castes. Normally male and female."/>
<Offset name="extract_vector"/>
@ -1168,7 +1168,7 @@
</Group>
</Group>
<Group name="Creatures">
<Address name="creature_vector" value="0x0166ecc4" />
<Address name="vector" value="0x0166ecc4" />
<Address name="current_race" value="0x01470fbc" />
<Address name="current_civ" value="0x01470fb0" />
<Group name="creature">
@ -1350,7 +1350,7 @@
</Group>
</Group>
<Group name="Creatures">
<Address name="creature_vector" value="0x166FD0C" />
<Address name="vector" value="0x166FD0C" />
<Group name="creature">
<Group name="advanced">
<Offset name="artifact_name" value="0x6D4" />
@ -1368,6 +1368,7 @@
<Address name="organics_plants" value="0x16B0D7C" /><!--plant matter, WORLD + 0x54BAC-->
<Address name="organics_trees" value="0x16B0DAC" /><!--just wood, WORLD + 0x54BDC-->
<Address name="creature_type_vector" value="0x16B0EA0" /><!--WORLD + 0x54CD0-->
<Address name="other" value="0x16BA114" />
<Group name="descriptors">
<Address name="vectors_start" value="0x16B9780" />
<Offset name="rawname" value="0x0" />
@ -1419,7 +1420,7 @@
<PETimeStamp value="0x4bf014fa" />
<Offsets>
<Group name="Creatures">
<Address name="creature_vector" value="0x167870C" />
<Address name="vector" value="0x167870C" />
<Address name="current_race" value="0x1471FBC" />
<Address name="current_civ" value="0x1471FB0" />
</Group>
@ -1430,6 +1431,7 @@
<Address name="organics_plants" value="0x16bd0e0" />
<Address name="organics_trees" value="0x16bd110" />
<Address name="creature_type_vector" value="0x16BD204" />
<Address name="other" value="0x16C6478"/>
<Group name="descriptors">
<Address name="colors_vector" value="0x16C5ACC" />
<Address name="vectors_start" value="0x16C5AE4" />
@ -1553,7 +1555,7 @@
<Address name="translation_vector" value="0x16D33FC" />
</Group>
<Group name="Creatures">
<Address name="creature_vector" value="0x168E73C" />
<Address name="vector" value="0x168E73C" />
<Address name="current_race" value="0x014b9f1c" />
<Group name="creature">
<Group name="advanced">
@ -1700,7 +1702,7 @@
</Group>
</Group>
<Group name="Creatures">
<Address name="creature_vector" value="0x92D9AC0" />
<Address name="vector" value="0x92D9AC0" />
<Address name="current_race" value="0x92C1628" />
<Address name="current_civ" value="0x92C161C" />
<Group name="creature" valid="verify" >

@ -40,9 +40,10 @@ DFContextShared::~DFContextShared()
bool DFContextShared::InitReadNames()
{
name_firstname_offset = offset_descriptor->getOffset("name_firstname");
name_nickname_offset = offset_descriptor->getOffset("name_nickname");
name_words_offset = offset_descriptor->getOffset("name_words");
OffsetGroup * OG = offset_descriptor->getGroup("name");
name_firstname_offset = OG->getOffset("first");
name_nickname_offset = OG->getOffset("nick");
name_words_offset = OG->getOffset("second_words");
return true;
}

@ -294,7 +294,7 @@ void VersionInfoFactory::ParseBase (TiXmlElement* entry, VersionInfo* mem)
}
else if (type == "Professions")
{
pElement2nd = entry->FirstChildElement("Profession");
pElement2nd = pElement->FirstChildElement("Profession");
for(;pElement2nd;pElement2nd=pElement2nd->NextSiblingElement("Profession"))
{
const char * id = pElement2nd->Attribute("id");
@ -313,7 +313,7 @@ void VersionInfoFactory::ParseBase (TiXmlElement* entry, VersionInfo* mem)
}
else if (type == "Jobs")
{
pElement2nd = entry->FirstChildElement("Job");
pElement2nd = pElement->FirstChildElement("Job");
for(;pElement2nd;pElement2nd=pElement2nd->NextSiblingElement("Job"))
{
const char * id = pElement2nd->Attribute("id");
@ -331,7 +331,7 @@ void VersionInfoFactory::ParseBase (TiXmlElement* entry, VersionInfo* mem)
}
else if (type == "Skills")
{
pElement2nd = entry->FirstChildElement("Skill");
pElement2nd = pElement->FirstChildElement("Skill");
for(;pElement2nd;pElement2nd=pElement2nd->NextSiblingElement("Skill"))
{
const char * id = pElement2nd->Attribute("id");
@ -349,17 +349,17 @@ void VersionInfoFactory::ParseBase (TiXmlElement* entry, VersionInfo* mem)
}
else if (type == "Traits")
{
pElement2nd = entry->FirstChildElement("Trait");
pElement2nd = pElement->FirstChildElement("Trait");
for(;pElement2nd;pElement2nd=pElement2nd->NextSiblingElement("Trait"))
{
const char * id = pElement2nd->Attribute("id");
const char * name = pElement2nd->Attribute("name");
const char * lvl0 = pElement->Attribute("level_0");
const char * lvl1 = pElement->Attribute("level_1");
const char * lvl2 = pElement->Attribute("level_2");
const char * lvl3 = pElement->Attribute("level_3");
const char * lvl4 = pElement->Attribute("level_4");
const char * lvl5 = pElement->Attribute("level_5");
const char * lvl0 = pElement2nd->Attribute("level_0");
const char * lvl1 = pElement2nd->Attribute("level_1");
const char * lvl2 = pElement2nd->Attribute("level_2");
const char * lvl3 = pElement2nd->Attribute("level_3");
const char * lvl4 = pElement2nd->Attribute("level_4");
const char * lvl5 = pElement2nd->Attribute("level_5");
if(id && name && lvl0 && lvl1 && lvl2 && lvl3 && lvl4 && lvl5)
{
mem->setTrait(id, name, lvl0, lvl1, lvl2, lvl3, lvl4, lvl5);
@ -373,7 +373,7 @@ void VersionInfoFactory::ParseBase (TiXmlElement* entry, VersionInfo* mem)
}
else if (type == "Labors")
{
pElement2nd = entry->FirstChildElement("Labor");
pElement2nd = pElement->FirstChildElement("Labor");
for(;pElement2nd;pElement2nd=pElement2nd->NextSiblingElement("Labor"))
{
const char * id = pElement2nd->Attribute("id");
@ -391,7 +391,7 @@ void VersionInfoFactory::ParseBase (TiXmlElement* entry, VersionInfo* mem)
}
else if (type == "Levels")
{
pElement2nd = entry->FirstChildElement("Level");
pElement2nd = pElement->FirstChildElement("Level");
for(;pElement2nd;pElement2nd=pElement2nd->NextSiblingElement("Level"))
{
const char * id = pElement2nd->Attribute("id");
@ -410,7 +410,7 @@ void VersionInfoFactory::ParseBase (TiXmlElement* entry, VersionInfo* mem)
}
else if (type == "Moods")
{
pElement2nd = entry->FirstChildElement("Mood");
pElement2nd = pElement->FirstChildElement("Mood");
for(;pElement2nd;pElement2nd=pElement2nd->NextSiblingElement("Mood"))
{
const char * id = pElement2nd->Attribute("id");

@ -83,8 +83,8 @@ Creatures::Creatures(DFContextShared* _d)
creatures.profession_offset = OG_creature->getOffset ("profession");
creatures.race_offset = OG_creature->getOffset ("race");
creatures.pos_offset = OG_creature->getOffset ("position");
creatures.flags1_offset = OG_creature->getOffset ("creature_flags1");
creatures.flags2_offset = OG_creature->getOffset ("creature_flags2");
creatures.flags1_offset = OG_creature->getOffset ("flags1");
creatures.flags2_offset = OG_creature->getOffset ("flags2");
creatures.sex_offset = OG_creature->getOffset ("sex");
creatures.caste_offset = OG_creature->getOffset ("caste");
creatures.id_offset = OG_creature->getOffset ("id");

@ -71,6 +71,7 @@ Materials::~Materials()
bool Materials::Finish()
{
/*
inorganic.clear();
organic.clear();
tree.clear();
@ -80,6 +81,7 @@ bool Materials::Finish()
color.clear();
other.clear();
alldesc.clear();
*/
return true;
}
@ -331,8 +333,8 @@ bool Materials::ReadCreatureTypesEx (void)
OffsetGroup * OG_Creature = OG_Mats->getGroup("creature");
uint32_t castes_vector_offset = OG_Creature->getOffset ("caste_vector");
uint32_t extract_vector_offset = OG_Creature->getOffset ("extract_vector");
uint32_t tile_offset = OG_Creature->getOffset ("creature_tile");
uint32_t tile_color_offset = OG_Creature->getOffset ("creature_tile_color");
uint32_t tile_offset = OG_Creature->getOffset ("tile");
uint32_t tile_color_offset = OG_Creature->getOffset ("tile_color");
OffsetGroup * OG_Caste = OG_Creature->getGroup("caste");
uint32_t caste_colormod_offset = OG_Caste->getOffset ("color_modifiers");
uint32_t caste_attributes_offset = OG_Caste->getOffset ("attributes");

@ -271,8 +271,9 @@ void printCreature(DFHack::Context * DF, const DFHack::t_creature & creature)
}
}
std::vector<uint32_t> inventory;
//std::vector<uint32_t> inventory;
// FIXME: TOO BAD...
/*
if( Creatures->ReadInventoryPtr(creature.origin, inventory) )
{
DFHack::Items * Items = DF->getItems();
@ -282,6 +283,7 @@ void printCreature(DFHack::Context * DF, const DFHack::t_creature & creature)
printf("\t\t%s\n", Items->getItemDescription(inventory[i], Materials).c_str());
}
}
*/
/*
if(creature.pregnancy_timer > 0)