3#if !defined(_WIN32) || defined(_WIN64)
4 #error "Mods should be built targeting 32-bit windows (x86) (same target as +R)"
10#define GEARLOADER_VERSION "0.1.0"
11#define GEARLOADER_VERSION_NUM 0x000100
12#define GEARLOADER_VERSION_SEM_VER {0,1,0}
28 if (a->major - b->major != 0) {
29 return a->major - b->major;
31 if (a->minor - b->minor != 0) {
32 return a->minor - b->minor;
34 return a->patchNum - b->patchNum;
37typedef enum GearLoaderLogLevel {
38 GEARLOADER_LOG_LEVEL_DEBUG,
39 GEARLOADER_LOG_LEVEL_INFO,
40 GEARLOADER_LOG_LEVEL_WARN,
41 GEARLOADER_LOG_LEVEL_ERR,
42 GEARLOADER_LOG_LEVEL_VERBOSE
48typedef struct GearLoaderContext GearLoaderContext;
73 GearLoaderContext* ctx,
75 const char* versionConstraint,
97 GearLoaderContext* ctx,
115 uint32_t __stdcall (*
Log)(
116 GearLoaderContext* ctx,
122 #define GEARLOADER_EXPORT extern "C" __declspec(dllexport)
124 #define GEARLOADER_EXPORT __declspec(dllexport)
126#define GEARLOADER_CALL __cdecl
129typedef void (GEARLOADER_CALL *ModInitFunc)(GearLoaderContext* ctx,
GearLoaderApi* api);
Definition gearLoader_c.h:50
int32_t __stdcall(* RetrieveModApi)(GearLoaderContext *ctx, const char *name, const char *versionConstraint, const void **pApi, SemanticVersion *retrievedVersion)
Retrieves an exported API of another loaded mod.
Definition gearLoader_c.h:72
uint32_t __stdcall(* Log)(GearLoaderContext *ctx, uint32_t logLevel, const char *str)
Logs the given string to the GearLoader.log file.
Definition gearLoader_c.h:115
uint32_t size
The size of this struct.
Definition gearLoader_c.h:52
uint32_t version
The version of this struct's layout.
Definition gearLoader_c.h:54
int32_t __stdcall(* RegisterApi)(GearLoaderContext *ctx, const void *api, const char *name, SemanticVersion version)
Registers an API with the mod loader.
Definition gearLoader_c.h:96
Definition gearLoader_c.h:21