Add function to get the current working directory of the DF process, as well as offsets for the relative paths of the current tileset and color file, also created a simple program to dump those three things out
parent
294888f84a
commit
040f8f7b7a
@ -0,0 +1,32 @@
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
#include <DFHack.h>
|
||||
using namespace DFHack;
|
||||
|
||||
int main ()
|
||||
{
|
||||
DFHack::ContextManager DFMgr("Memory.xml");
|
||||
DFHack::Context *DF = DFMgr.getSingleContext();
|
||||
try
|
||||
{
|
||||
DF->Attach();
|
||||
}
|
||||
catch (exception& e)
|
||||
{
|
||||
cerr << e.what() << endl;
|
||||
#ifndef LINUX_BUILD
|
||||
cin.ignore();
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
DFHack::Process * Process = DF->getProcess();
|
||||
DFHack::Gui * gui = DF->getGui();
|
||||
cout << Process->getPath() << endl;
|
||||
cout << gui->ReadCurrentTileSetFilename() << "\n" << gui->ReadCurrentColorsFilename() << endl;
|
||||
#ifndef LINUX_BUILD
|
||||
cout << "Done. Press any key to continue" << endl;
|
||||
cin.ignore();
|
||||
#endif
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue