Skip to content
Browse files

Windows fixes

  • Loading branch information...
1 parent 887f194 commit e2a7d9e639620fef5034dbc034a6166987a6e4da @peterix peterix committed Apr 10, 2010
View
4 dfhack/include/DFProcess.h
@@ -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;};
View
4 dfhack/include/modules/Constructions.h
@@ -14,15 +14,15 @@ namespace DFHack
constr_boulder = 4,
constr_logs = 5,
};
-
+ #pragma pack(1)
struct t_construction
{
//0
uint16_t x;
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;
View
4 examples/construction_dump.cpp
@@ -60,15 +60,15 @@ 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)
{
if(con.mat_idx != 0xffffffff)
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());
View
4 examples/veccheck.cpp
@@ -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.");
}

0 comments on commit e2a7d9e

Please sign in to comment.
Something went wrong with that request. Please try again.