2011-12-24 03:51:58 -07:00
|
|
|
#include "Internal.h"
|
2011-12-31 04:48:42 -07:00
|
|
|
#include "DataDefs.h"
|
|
|
|
#include "MiscUtils.h"
|
2012-02-11 05:27:12 -07:00
|
|
|
#include "VersionInfo.h"
|
2011-12-24 05:22:10 -07:00
|
|
|
|
2011-12-31 04:48:42 -07:00
|
|
|
#include "df/world.h"
|
|
|
|
#include "df/world_data.h"
|
|
|
|
#include "df/ui.h"
|
2011-12-24 05:22:10 -07:00
|
|
|
|
|
|
|
namespace {
|
|
|
|
template<class T>
|
|
|
|
inline T &_toref(T &r) { return r; }
|
|
|
|
template<class T>
|
|
|
|
inline T &_toref(T *&p) { return *p; }
|
|
|
|
}
|
2011-12-24 03:51:58 -07:00
|
|
|
|
2012-02-11 05:27:12 -07:00
|
|
|
#define INIT_GLOBAL_FUNCTION_PREFIX \
|
|
|
|
DFHack::OffsetGroup *global_table_ = DFHack::Core::getInstance().vinfo->getGroup("global"); \
|
|
|
|
void * tmp_;
|
|
|
|
|
|
|
|
#define INIT_GLOBAL_FUNCTION_ITEM(type,name) \
|
|
|
|
if (global_table_->getSafeAddress(#name,tmp_)) name = (type*)tmp_;
|
|
|
|
|
2011-12-24 03:51:58 -07:00
|
|
|
// Instantiate all the static objects
|
2011-12-31 04:48:42 -07:00
|
|
|
#include "df/static.inc"
|
|
|
|
#include "df/static.enums.inc"
|