#include #include #include #include #include #include using namespace std; #include #include void printSettlement(DFHack::API & DF, const DFHack::t_settlement & settlement, const vector< vector > &englishWords, const vector< vector > &foreignWords) { string genericName = DF.TranslateName(settlement.name,englishWords,foreignWords,true); string dwarfName = DF.TranslateName(settlement.name,englishWords,foreignWords,false); cout << dwarfName << " " << genericName << " " << "world x: " << settlement.world_x << " world y: " << settlement.world_y << " local_x: " << settlement.local_x1 << " local_y: " << settlement.local_y1 << " size: " << settlement.local_x2 - settlement.local_x1 << " by " << settlement.local_y2 - settlement.local_y1 << "\n"; } int main (int argc,const char* argv[]) { DFHack::API DF ("Memory.xml"); if(!DF.Attach()) { cerr << "DF not found" << endl; return 1; } DFHack::t_settlement current; uint32_t numSettlements; if(!DF.InitReadSettlements(numSettlements)) { cerr << "Could not read Settlements" << endl; return 1; } vector< vector > englishWords; vector< vector > foreignWords; if(!DF.InitReadNameTables(englishWords,foreignWords)) { cerr << "Can't get name tables" << endl; return 1; } cout << "Settlements\n"; /*for(uint32_t i =0;i