Merge branch 'bartavelle' of git://bigbox.banquise.net/dfhack

develop
Petr Mrázek 2010-05-12 09:32:59 +02:00
commit bb4d9e760c
9 changed files with 60 additions and 15 deletions

@ -199,6 +199,17 @@ struct t_settlement
int16_t local_y1;
int16_t local_y2;
};
struct t_attrib
{
uint32_t level;
uint32_t field_4;
uint32_t field_8;
uint32_t field_C;
uint32_t leveldiff;
uint32_t field_14;
uint32_t field_18;
};
}// namespace DFHack
#endif // TYPES_H_INCLUDED

@ -275,16 +275,6 @@ namespace DFHack
t_matglossPair material;
bool active;
};
struct t_attrib
{
uint32_t level;
uint32_t field_4;
uint32_t field_8;
uint32_t field_C;
uint32_t leveldiff;
uint32_t field_14;
uint32_t field_18;
};
// FIXME: define in Memory.xml instead?

@ -60,6 +60,24 @@ namespace DFHack
char adjective[128];
std::vector<t_colormodifier> ColorModifier;
std::vector<t_bodypart> bodypart;
t_attrib strength;
t_attrib agility;
t_attrib toughness;
t_attrib endurance;
t_attrib recuperation;
t_attrib disease_resistance;
t_attrib analytical_ability;
t_attrib focus;
t_attrib willpower;
t_attrib creativity;
t_attrib intuition;
t_attrib patience;
t_attrib memory;
t_attrib linguistic_ability;
t_attrib spatial_sense;
t_attrib musicality;
t_attrib kinesthetic_sense;
};
struct t_matglossOther

@ -24,11 +24,12 @@ distribution.
#include "DFCommonInternal.h"
#include "../private/APIPrivate.h"
#include "modules/Materials.h"
#include "modules/Items.h"
#include "DFTypes.h"
#include "DFMemInfo.h"
#include "DFProcess.h"
#include "DFVector.h"
#include "modules/Materials.h"
#include "modules/Items.h"
using namespace DFHack;
@ -263,4 +264,4 @@ std::string Items::getItemDescription(uint32_t itemptr, Materials * Materials)
out.append(" ");
out.append(this->getItemClass(item.matdesc.itemType));
return out;
}
}

@ -24,6 +24,7 @@ distribution.
#include "DFCommonInternal.h"
#include "../private/APIPrivate.h"
#include "DFTypes.h"
#include "modules/Materials.h"
#include "DFMemInfo.h"
#include "DFProcess.h"
@ -296,6 +297,7 @@ bool Materials::ReadCreatureTypesEx (void)
uint32_t sizeof_string = mem->getHexValue ("sizeof_string");
uint32_t caste_colormod_offset = mem->getOffset ("caste_color_modifiers");
uint32_t caste_bodypart_offset = mem->getOffset ("caste_bodypart_vector");
uint32_t caste_attributes_offset = mem->getOffset ("caste_attributes");
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");
@ -353,6 +355,9 @@ bool Materials::ReadCreatureTypesEx (void)
caste.bodypart.push_back(part);
}
p->read(caste_start + caste_attributes_offset, sizeof(t_attrib) * (6+11), (uint8_t *)&caste.strength);
mat.castes.push_back(caste);
}
mat.tile_character = p->readByte( p_races[i] + tile_offset );

@ -30,6 +30,7 @@ distribution.
using namespace std;
#include "DFCommonInternal.h"
#include "DFTypes.h"
#include "modules/Materials.h"
#include "modules/Materials_C.h"

@ -32,6 +32,7 @@ distribution.
using namespace std;
#include "DFTypes.h"
#include "modules/Materials.h"
#include "DF_Imports.cpp"
#include "DF_Helpers.cpp"

@ -96,7 +96,24 @@ int main (int numargs, const char ** args)
<< castes[j].rawname << ":"
<< castes[j].singular << ":"
<< castes[j].plural << ":"
<< castes[j].adjective << "] ";
<< castes[j].adjective << "] ["
<< "st:" << castes[j].strength.level << "/"
<< "ag:" << castes[j].agility.level << "/"
<< "to:" << castes[j].toughness.level << "/"
<< "en:" << castes[j].endurance.level << "/"
<< "re:" << castes[j].recuperation.level << "/"
<< "di:" << castes[j].disease_resistance.level << "/"
<< "an:" << castes[j].analytical_ability.level << "/"
<< "fo:" << castes[j].focus.level << "/"
<< "wi:" << castes[j].willpower.level << "/"
<< "cr:" << castes[j].creativity.level << "/"
<< "in:" << castes[j].intuition.level << "/"
<< "pa:" << castes[j].patience.level << "/"
<< "me:" << castes[j].memory.level << "/"
<< "li:" << castes[j].linguistic_ability.level << "/"
<< "sp:" << castes[j].spatial_sense.level << "/"
<< "mu:" << castes[j].musicality.level << "/"
<< "ki:" << castes[j].kinesthetic_sense.level << "]";
cout << endl;
for(uint32_t k = 0; k < castes[j].ColorModifier.size(); k++)
{

@ -1444,9 +1444,10 @@ map_data_1b60_offset 0x1B9c
Castes
======
<Offset name="color_modifier_part">0x70</Offset>
<Offset name="caste_bodypart_vector">0x51C</Offset>
<Offset name="caste_color_modifiers">0xACC</Offset>
<Offset name="color_modifier_part">0x70</Offset>
<Offset name="caste_attributes">0x654</Offset>
Body Parts
==========