Added playground folder for quick hacks
parent
e26b6269f1
commit
863eb2546f
@ -0,0 +1,11 @@
|
||||
# don't use this file directly. use the one in the root folder of the project
|
||||
|
||||
# this is required to ensure we use the right configuration for the system.
|
||||
IF(UNIX)
|
||||
add_definitions(-DLINUX_BUILD)
|
||||
ENDIF(UNIX)
|
||||
|
||||
# for trying out some 'stuff'
|
||||
ADD_EXECUTABLE(dftest test.cpp)
|
||||
TARGET_LINK_LIBRARIES(dftest dfhack)
|
||||
|
@ -0,0 +1,52 @@
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
#include <climits>
|
||||
#include <integers.h>
|
||||
#include <vector>
|
||||
#include <sstream>
|
||||
#include <ctime>
|
||||
#include <cstdio>
|
||||
using namespace std;
|
||||
|
||||
#include <DFGlobal.h>
|
||||
#include <DFTypes.h>
|
||||
#include <DFContextManager.h>
|
||||
#include <DFContext.h>
|
||||
#include <DFProcess.h>
|
||||
#include <DFMemInfo.h>
|
||||
#include <DFVector.h>
|
||||
#include <DFTypes.h>
|
||||
#include <modules/Materials.h>
|
||||
#include <modules/Position.h>
|
||||
#include <modules/Maps.h>
|
||||
#include <modules/Constructions.h>
|
||||
#include <DFMiscUtils.h>
|
||||
#include <DFTileTypes.h>
|
||||
|
||||
using namespace DFHack;
|
||||
int main (int numargs, const char ** args)
|
||||
{
|
||||
DFHack::ContextManager DFMgr("Memory.xml");
|
||||
DFHack::Context * DF;
|
||||
try
|
||||
{
|
||||
DF = DFMgr.getSingleContext();
|
||||
DF->Attach();
|
||||
}
|
||||
catch (exception& e)
|
||||
{
|
||||
cerr << e.what() << endl;
|
||||
#ifndef LINUX_BUILD
|
||||
cin.ignore();
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
|
||||
// DO STUFF HERE
|
||||
|
||||
#ifndef LINUX_BUILD
|
||||
cout << "Done. Press any key to continue" << endl;
|
||||
cin.ignore();
|
||||
#endif
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue