develop
Petr Mrázek 2009-10-21 23:36:56 +00:00
parent 99f9c06796
commit c1299b0b7c
4 changed files with 8 additions and 8 deletions

@ -16,7 +16,7 @@ int main (void)
t_occupancy occupancies[256]; t_occupancy occupancies[256];
DFHackAPI *pDF = CreateDFHackAPI("Memory.xml"); DFHackAPI *pDF = CreateDFHackAPI("Memory.xml");
DFHackAPI &DF = *pDF; DFHackAPI &DF = *pDF;
if(!DF.Attach()) if(!DF.Attach())
{ {
cerr << "DF not found" << endl; cerr << "DF not found" << endl;
@ -47,6 +47,6 @@ int main (void)
} }
} }
} }
delete pDF; delete pDF;
return 0; return 0;
} }

@ -18,7 +18,7 @@ int main (void)
t_occupancy occupancies[16][16]; t_occupancy occupancies[16][16];
DFHackAPI *pDF = CreateDFHackAPI("Memory.xml"); DFHackAPI *pDF = CreateDFHackAPI("Memory.xml");
DFHackAPI &DF = *pDF; DFHackAPI &DF = *pDF;
if(!DF.Attach()) if(!DF.Attach())
{ {
cerr << "DF not found" << endl; cerr << "DF not found" << endl;
@ -47,6 +47,6 @@ int main (void)
} }
cout << num_blocks << " blocks read" << endl; cout << num_blocks << " blocks read" << endl;
cout << bytes_read / (1024 * 1024) << " MB" << endl; cout << bytes_read / (1024 * 1024) << " MB" << endl;
delete pDF; delete pDF;
return 0; return 0;
} }

@ -56,7 +56,7 @@ int main (int argc, const char* argv[])
// init the API // init the API
DFHackAPI *pDF = CreateDFHackAPI("Memory.xml"); DFHackAPI *pDF = CreateDFHackAPI("Memory.xml");
DFHackAPI &DF = *pDF; DFHackAPI &DF = *pDF;
// attach // attach
if(!DF.Attach()) if(!DF.Attach())
@ -174,6 +174,6 @@ int main (int argc, const char* argv[])
#ifndef LINUX_BUILD #ifndef LINUX_BUILD
cin.ignore(); cin.ignore();
#endif #endif
delete pDF; delete pDF;
return 0; return 0;
} }

@ -16,7 +16,7 @@ int main (void)
t_designation designations[256]; t_designation designations[256];
DFHackAPI *pDF = CreateDFHackAPI("Memory.xml"); DFHackAPI *pDF = CreateDFHackAPI("Memory.xml");
DFHackAPI &DF = *pDF; DFHackAPI &DF = *pDF;
if(!DF.Attach()) if(!DF.Attach())
{ {
cerr << "DF not found" << endl; cerr << "DF not found" << endl;
@ -47,6 +47,6 @@ int main (void)
} }
} }
} }
delete pDF; delete pDF;
return 0; return 0;
} }