|
|
@ -407,13 +407,25 @@ bool Core::Init()
|
|
|
|
vif = new DFHack::VersionInfoFactory(path);
|
|
|
|
vif = new DFHack::VersionInfoFactory(path);
|
|
|
|
p = new DFHack::Process(vif);
|
|
|
|
p = new DFHack::Process(vif);
|
|
|
|
vinfo = p->getDescriptor();
|
|
|
|
vinfo = p->getDescriptor();
|
|
|
|
// dump offsets to a file
|
|
|
|
|
|
|
|
std::ofstream dump("offsets.log");
|
|
|
|
if(!vinfo)
|
|
|
|
if(!dump.fail())
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
dump << vinfo->PrintOffsets();
|
|
|
|
cerr << "Couldn't retrieve version information.\n";
|
|
|
|
dump.close();
|
|
|
|
errorstate = true;
|
|
|
|
|
|
|
|
delete p;
|
|
|
|
|
|
|
|
p = NULL;
|
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!p->isIdentified())
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
cerr << "Couldn't identify this version of DF.\n";
|
|
|
|
|
|
|
|
errorstate = true;
|
|
|
|
|
|
|
|
delete p;
|
|
|
|
|
|
|
|
p = NULL;
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// init the console.
|
|
|
|
// init the console.
|
|
|
|
Gui * g = getGui();
|
|
|
|
Gui * g = getGui();
|
|
|
|
if(g->init)
|
|
|
|
if(g->init)
|
|
|
@ -426,13 +438,12 @@ bool Core::Init()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else con.init(false);
|
|
|
|
else con.init(false);
|
|
|
|
|
|
|
|
|
|
|
|
if (!p->isIdentified())
|
|
|
|
// dump offsets to a file
|
|
|
|
|
|
|
|
std::ofstream dump("offsets.log");
|
|
|
|
|
|
|
|
if(!dump.fail())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
con.printerr("Couldn't identify this version of DF.\n");
|
|
|
|
dump << vinfo->PrintOffsets();
|
|
|
|
errorstate = true;
|
|
|
|
dump.close();
|
|
|
|
delete p;
|
|
|
|
|
|
|
|
p = NULL;
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// create mutex for syncing with interactive tasks
|
|
|
|
// create mutex for syncing with interactive tasks
|
|
|
|