Local, global features

develop
Petr Mrázek 2010-05-22 13:20:58 +02:00
parent 49531f0416
commit dc862e28d4
4 changed files with 22 additions and 15 deletions

@ -707,8 +707,8 @@ bool Maps::ReadLocalFeatures( std::map <planecoord, std::vector<t_feature *> > &
uint32_t sizeof_vec = mem->getHexValue("sizeof_vector");
const uint32_t sizeof_elem = 16;
const uint32_t offset_elem = 4;
const uint32_t main_mat_offset = 0x30;
const uint32_t sub_mat_offset = 0x34;
const uint32_t main_mat_offset = mem->getOffset("local_feature_mat"); // 0x30
const uint32_t sub_mat_offset = mem->getOffset("local_feature_submat"); // 0x34
local_features.clear();
@ -801,8 +801,8 @@ bool Maps::ReadGlobalFeatures( std::vector <t_feature> & features)
uint32_t global_feature_vector = mem->getAddress("global_feature_vector");
uint32_t global_feature_funcptr = mem->getOffset("global_feature_funcptr_");
const uint32_t main_mat_offset = 0x34;
const uint32_t sub_mat_offset = 0x38;
const uint32_t main_mat_offset = mem->getOffset("global_feature_mat"); // 0x34
const uint32_t sub_mat_offset = mem->getOffset("global_feature_submat"); // 0x38
DfVector<uint32_t> p_features (p,global_feature_vector);
features.clear();

@ -587,7 +587,7 @@ main(int argc, char *argv[])
pDF = 0;
finish(0);
}
/*
if(!Mats->ReadCreatureTypes())
{
error = "Can't read stone types.";

@ -1069,9 +1069,12 @@ size=212
WORLD + 0x54374
<Address name="global_feature_vector">0x16AF4FC</Address>
<Offset name= "global_feature_funcptr_">0x100</Offset>
<Offset name="global_feature_mat">0x34</Offset>
<Offset name="global_feature_submat">0x38</Offset>
WORLD + 0x54440
<Address name="local_feature_start_ptr">0x16AF5C8</Address>
<Offset name="local_feature_mat">0x30</Offset>
<Offset name="local_feature_submat">0x34</Offset>
<!--
map_data_map_x_offset 0x0058
map_data_map_y_offset 0x005A
@ -1634,7 +1637,7 @@ map_data_1b60_offset 0x1B9c
<!-- most probably a static object, because its parts are often
referenced as offset to this address *and* as addresses -->
<Address name="WORLD">0x0</Address> 0x0165B188
<Address name="WORLD">0x92D00C0</Address> 0x0165B188
Position and window dimensions
==============================
@ -1656,7 +1659,7 @@ map_data_1b60_offset 0x1B9c
-->
Map stuff
=========
<Address name="map_data">0x9322d20</Address>
<Address name="map_data">0x9322d20</Address> WORLD + 0x52C60
<Offset name="map_data_vein_vector">0x08</Offset>
<Offset name="map_data_feature_local">0x20</Offset>
<Offset name="map_data_feature_global">0x24</Offset>
@ -1670,11 +1673,15 @@ map_data_1b60_offset 0x1B9c
Map Features
============
WORLD + 0x54374
<Address name="global_feature_vector">0x16AF4FC</Address>
<Offset name= "global_feature_funcptr_">0x100</Offset>
WORLD + 0x54440
<Address name="local_feature_start_ptr">0x16AF5C8</Address>
WORLD + 0x5487C
<Address name="global_feature_vector">0x932493C</Address>
<Offset name= "global_feature_funcptr_">0x94</Offset>
<Offset name="global_feature_mat">0x28</Offset>
<Offset name="global_feature_submat">0x2C</Offset>
WORLD + 0x548F4
<Address name="local_feature_start_ptr">0x93249B4</Address>
<Offset name="local_feature_mat">0x24</Offset>
<Offset name="local_feature_submat">0x28</Offset>
* map size in blocks *
<Address name="x_count_block">0x9322d34</Address> 0x016ad738

@ -90,7 +90,7 @@ int main (int argc, const char* argv[])
return 1;
}
Maps->getSize(x_max,y_max,z_max);
/*
if(!Maps->ReadGlobalFeatures(global_features))
{
cerr << "Can't get global features." << endl;
@ -107,7 +107,7 @@ int main (int argc, const char* argv[])
cin.ignore();
#endif
return 1;
}*/
}
// get stone matgloss mapping
if(!Mats->ReadInorganicMaterials())
{