diff options
| author | Petr Mrázek | 2012-02-11 18:48:17 +0100 |
|---|---|---|
| committer | Petr Mrázek | 2012-02-11 18:48:17 +0100 |
| commit | 8527547cbe050cb0b5e50c162354f1eb069a554a (patch) | |
| tree | 19165341f455a79f01745e1bcd2c70b7e8183058 /library/DataStatics.cpp | |
| parent | aee5efe7c0d0cdf784fb8bdb445cc233435d47dd (diff) | |
| parent | f469fab1e6e419ff26655bc3fe9868653dc0f0f0 (diff) | |
| download | dfhack-8527547cbe050cb0b5e50c162354f1eb069a554a.tar.gz dfhack-8527547cbe050cb0b5e50c162354f1eb069a554a.tar.bz2 dfhack-8527547cbe050cb0b5e50c162354f1eb069a554a.tar.xz | |
Merge branch 'master' into purge
Conflicts:
library/DataDefs.cpp
Diffstat (limited to 'library/DataStatics.cpp')
| -rw-r--r-- | library/DataStatics.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/library/DataStatics.cpp b/library/DataStatics.cpp index f47c0fe0..5ccabb7e 100644 --- a/library/DataStatics.cpp +++ b/library/DataStatics.cpp @@ -1,6 +1,7 @@ #include "Internal.h" #include "DataDefs.h" #include "MiscUtils.h" +#include "VersionInfo.h" #include "df/world.h" #include "df/world_data.h" @@ -13,6 +14,13 @@ namespace { inline T &_toref(T *&p) { return *p; } } +#define INIT_GLOBAL_FUNCTION_PREFIX \ + DFHack::VersionInfo *global_table_ = DFHack::Core::getInstance().vinfo; \ + void * tmp_; + +#define INIT_GLOBAL_FUNCTION_ITEM(type,name) \ + if (global_table_->getAddress(#name,tmp_)) name = (type*)tmp_; + // Instantiate all the static objects #include "df/static.inc" #include "df/static.enums.inc" |
