|
|
@ -6,6 +6,7 @@
|
|
|
|
using namespace std;
|
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
|
|
|
|
#include <DFHack.h>
|
|
|
|
#include <DFHack.h>
|
|
|
|
|
|
|
|
#include <dfhack/modules/Gui.h>
|
|
|
|
|
|
|
|
|
|
|
|
struct hideblock
|
|
|
|
struct hideblock
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -37,6 +38,16 @@ int main (void)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
DFHack::Maps *Maps =DF->getMaps();
|
|
|
|
DFHack::Maps *Maps =DF->getMaps();
|
|
|
|
|
|
|
|
DFHack::Gui *Gui =DF->getGui();
|
|
|
|
|
|
|
|
// walk the map, save the hide bits, reveal.
|
|
|
|
|
|
|
|
cout << "Pausing..." << endl;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// horrible hack to make sure the pause is really set
|
|
|
|
|
|
|
|
Gui->SetPauseState(true);
|
|
|
|
|
|
|
|
DF->Resume();
|
|
|
|
|
|
|
|
usleep(100);
|
|
|
|
|
|
|
|
DF->Suspend();
|
|
|
|
|
|
|
|
|
|
|
|
// init the map
|
|
|
|
// init the map
|
|
|
|
if(!Maps->Start())
|
|
|
|
if(!Maps->Start())
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -46,11 +57,12 @@ int main (void)
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
return 1;
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cout << "Revealing, please wait..." << endl;
|
|
|
|
|
|
|
|
|
|
|
|
Maps->getSize(x_max,y_max,z_max);
|
|
|
|
Maps->getSize(x_max,y_max,z_max);
|
|
|
|
vector <hideblock> hidesaved;
|
|
|
|
vector <hideblock> hidesaved;
|
|
|
|
// walk the map, save the hide bits, reveal.
|
|
|
|
|
|
|
|
cout << "Revealing... please wait." << endl;
|
|
|
|
|
|
|
|
for(uint32_t x = 0; x< x_max;x++)
|
|
|
|
for(uint32_t x = 0; x< x_max;x++)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
for(uint32_t y = 0; y< y_max;y++)
|
|
|
|
for(uint32_t y = 0; y< y_max;y++)
|
|
|
@ -80,8 +92,10 @@ int main (void)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// FIXME: force game pause here!
|
|
|
|
// FIXME: force game pause here!
|
|
|
|
DF->Detach();
|
|
|
|
DF->Detach();
|
|
|
|
cout << "Map revealed. Close window/force exit to keep it that way." << endl;
|
|
|
|
cout << "Map revealed. The game has been paused for you." << endl;
|
|
|
|
cout << "Press any key to unreveal. Don't close DF or unpause in that case!" << endl;
|
|
|
|
cout << "Unpausing can unleash the forces of hell!" << endl << endl;
|
|
|
|
|
|
|
|
cout << "Press any key to unreveal." << endl;
|
|
|
|
|
|
|
|
cout << "Close to keep the map revealed." << endl;
|
|
|
|
cin.ignore();
|
|
|
|
cin.ignore();
|
|
|
|
cout << "Unrevealing... please wait." << endl;
|
|
|
|
cout << "Unrevealing... please wait." << endl;
|
|
|
|
// FIXME: do some consistency checks here!
|
|
|
|
// FIXME: do some consistency checks here!
|
|
|
|