|
41 | 41 | static Config cfgLocal(#_guid); \ |
42 | 42 | Config* cfg = &cfgLocal; |
43 | 43 |
|
| 44 | +#define MYMODCFGNAME(_guid, _name, _version, _author, _cfgname) \ |
| 45 | + MYMOD(_guid, _name, _version, _author); \ |
| 46 | + static Config cfgLocal(#_cfgname); \ |
| 47 | + Config* cfg = &cfgLocal; |
| 48 | + |
44 | 49 | #define NEEDGAME(_pkg_name) \ |
45 | 50 | extern "C" const char* __INeedASpecificGame() {return #_pkg_name;} |
46 | 51 |
|
|
61 | 66 | {"", ""} }; \ |
62 | 67 | extern "C" ModInfoDependency* __GetDepsList() { return &g_listDependencies[0]; } |
63 | 68 |
|
| 69 | +/* Macros to stop forgetting stuff! */ |
| 70 | +#define ON_MOD_PRELOAD() \ |
| 71 | + extern "C" void OnModPreLoad() |
| 72 | + |
| 73 | +#define ON_MOD_LOAD() \ |
| 74 | + extern "C" void OnModLoad() |
| 75 | + |
| 76 | +#define ON_ALL_MODS_LOAD() \ |
| 77 | + extern "C" void OnAllModsLoaded() |
| 78 | + |
| 79 | +#define ON_MOD_UNLOAD() \ |
| 80 | + extern "C" void OnModUnload() /*Not guaranteed*/ |
| 81 | + |
| 82 | +#define ON_GAME_CRASH() \ |
| 83 | + extern "C" void OnGameCrash(const char* library, int sig, int code, uintptr_t libaddr, mcontext_t* mcontext) /*Not guaranteed*/ |
| 84 | + |
| 85 | +#define UPDATER_URL() \ |
| 86 | + extern "C" const char* OnUpdaterURLRequested() |
| 87 | + |
| 88 | +#define ON_NEW_INTERFACE() \ |
| 89 | + extern "C" void OnInterfaceAdded(const char* name, const void* ptr) |
| 90 | + |
64 | 91 |
|
65 | 92 |
|
66 | | -#define MINIMUM_MD5_BUF_SIZE 33 |
| 93 | +#define MINIMUM_MD5_BUF_SIZE ( 32 + 1 ) |
67 | 94 |
|
68 | 95 | struct MemChunk_t |
69 | 96 | { |
|
0 commit comments