Windows fixes

develop
Petr Mrázek 2010-04-10 05:48:50 +02:00
parent 887f1942cc
commit e2a7d9e639
4 changed files with 8 additions and 8 deletions

@ -181,7 +181,7 @@ namespace DFHack
DFWindow * getWindow();
int getPID();
// get module index by name and version. bool 1 = error
bool getModuleIndex (const char * name, const uint32_t version, uint32_t & OUTPUT) {return false;};
bool getModuleIndex (const char * name, const uint32_t version, uint32_t & OUTPUT) { OUTPUT=0; return false;};
// get the SHM start if available
char * getSHMStart (void){return 0;};
// set a SHM command and wait for a response
@ -306,7 +306,7 @@ namespace DFHack
DFWindow * getWindow();
int getPID();
// get module index by name and version. bool 1 = error
bool getModuleIndex (const char * name, const uint32_t version, uint32_t & OUTPUT) {return false;};
bool getModuleIndex (const char * name, const uint32_t version, uint32_t & OUTPUT) {OUTPUT=0; return false;};
// get the SHM start if available
char * getSHMStart (void){return 0;};
bool SetAndWait (uint32_t state){return false;};

@ -14,7 +14,7 @@ namespace DFHack
constr_boulder = 4,
constr_logs = 5,
};
#pragma pack(1)
struct t_construction
{
//0
@ -22,7 +22,7 @@ namespace DFHack
uint16_t y;
// 4
uint16_t z;
e_construction_base type :16; // 4 = 'rough'
uint16_t form; // e_construction_base
// 8
uint16_t unk_8; // = -1 in many cases
uint16_t mat_type;

@ -60,7 +60,7 @@ int main (int numargs, const char ** args)
{
printf("Construction %d/%d/%d @ 0x%x\n", con.x, con.y, con.z,con.origin);
// inorganic stuff - we can recognize that
printf("Material: form %d, type %d, index %d\n",con.type, con.mat_type, con.mat_idx);
printf("Material: form %d, type %d, index %d\n",con.form, con.mat_type, con.mat_idx);
string matstr = "unknown";
if(con.mat_type == 0)
{
@ -68,7 +68,7 @@ int main (int numargs, const char ** args)
matstr = inorganics[con.mat_idx].id;
else matstr = "inorganic";
}
switch(con.type)
switch(con.form)
{
case constr_bar:
printf("It is made of %s bars!\n",matstr.c_str());

@ -56,8 +56,8 @@ int main (int numargs, const char ** args)
if(cx == con.x && cy == con.y && cz == con.z)
{
printf("Construction %d/%d/%d @ 0x%x - Material %d %d\n", con.x, con.y, con.z,con.origin, con.mat_type, con.mat_idx);
printf("Material form: %d ", con.type);
if(con.type == 4)
printf("Material form: %d ", con.form);
if(con.form == 4)
{
printf("It is rough.");
}