// Just show some position data #include #include #include #include #include #include using namespace std; #include #include #include #include #include #include int main (int numargs, const char ** args) { uint32_t addr; if (numargs == 2) { istringstream input (args[1],istringstream::in); input >> std::hex >> addr; } DFHack::API DF("Memory.xml"); try { DF.Attach(); } catch (exception& e) { cerr << e.what() << endl; #ifndef LINUX_BUILD cin.ignore(); #endif return 1; } DFHack::Process* p = DF.getProcess(); DFHack::memory_info* mem = DF.getMemoryInfo(); DFHack::Materials *Materials = DF.getMaterials(); cout << "----==== Inorganic ====----" << endl; vector matgloss; Materials->ReadInorganicMaterials (matgloss); for(uint32_t i = 0; i < matgloss.size();i++) { cout << i << ": " << matgloss[i].id << endl; } cout << endl << "----==== Organic ====----" << endl; vector organic; Materials->ReadOrganicMaterials (matgloss); for(uint32_t i = 0; i < matgloss.size();i++) { cout << i << ": " << matgloss[i].id << endl; } cout << endl << "----==== Organic - trees ====----" << endl; Materials->ReadWoodMaterials (matgloss); for(uint32_t i = 0; i < matgloss.size();i++) { cout << i << ": " << matgloss[i].id << endl; } cout << endl << "----==== Organic - plants ====----" << endl; Materials->ReadPlantMaterials (matgloss); for(uint32_t i = 0; i < matgloss.size();i++) { cout << i << ": " << matgloss[i].id << endl; } cout << endl << "----==== Creature types ====----" << endl; vector creature; Materials->ReadCreatureTypesEx (creature); for(uint32_t i = 0; i < creature.size();i++) { cout << i << ": " << creature[i].rawname << endl; vector & castes = creature[i].castes; for(uint32_t j = 0; j < castes.size();j++) { cout << " [" << castes[j].rawname << ":" << castes[j].singular << ":" << castes[j].plural << ":" << castes[j].adjective << "] "; cout << endl; } cout << endl; } #ifndef LINUX_BUILD cout << "Done. Press any key to continue" << endl; cin.ignore(); #endif return 0; }