|
GearLoader 1.1.0
Mod loader for GGXXACPR
|
Data Fields | |
| uint32_t | size |
| The size of this struct. | |
| uint32_t | version |
| The version of this struct's layout. | |
| 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. | |
| int32_t __stdcall(* | RegisterApi )(GearLoaderContext *ctx, const void *api, const char *name, SemanticVersion version) |
| Registers an API with the mod loader. | |
| uint32_t __stdcall(* | Log )(GearLoaderContext *ctx, uint32_t logLevel, const char *str) |
| Logs the given string to the GearLoader.log file. | |
| uint32_t __stdcall(* GearLoaderApi::Log) (GearLoaderContext *ctx, uint32_t logLevel, const char *str) |
Logs the given string to the GearLoader.log file.
Logs will be prefixed with a timestamp, a [DEBUG] label, and a [mod-name] label where "mod-name" is the calling mod's name provided in its config.json file.
| ctx | A context pointer owned and used by the mod loader. Simply forward this from the Init function's parameter of the same name. |
| logLevel | Enum GearLoaderLogLevel. Verbose calls only get logged when running with the -GearLoaderVerbose launch option. |
| str | The string to be logged. |
| int32_t __stdcall(* GearLoaderApi::RegisterApi) (GearLoaderContext *ctx, const void *api, const char *name, SemanticVersion version) |
Registers an API with the mod loader.
APIs are given by a generic pointer and expected to be reinterpreted by other mods that retrieve it. The registering mod still owns the underlying API struct and is expected to keep it alive for the duration of the application's lifetime. A mod may register multiple APIs differing by name and/or version. Registering a mod with the same name and version will not override the previous API and will result in an error.
| ctx | A context pointer owned and used by the mod loader. Simply forward this from the Init function's parameter of the same name. |
| api | A pointer the the API struct to be registered. |
| name | The name of the registered API. This same name will need to be passed to RetrieveModApi. |
| version | The version of the registered API. Used when resolving the version constraint passed to RetrieveModApi. |
| int32_t __stdcall(* GearLoaderApi::RetrieveModApi) (GearLoaderContext *ctx, const char *name, const char *versionConstraint, const void **pApi, SemanticVersion *retrievedVersion) |
Retrieves an exported API of another loaded mod.
To ensure the requested mod is installed and loaded, list it in your mod's config.json file.
| ctx | A context pointer owned and used by the mod loader. Simply forward this from the Init function's parameter of the same name. |
| name | The name of the requested API. |
| versionConstraint | A constraint on the API version to retrieve. Takes the form of "[operator][semanticVersion]" where operator may be any of ["<", "<=", "=", ">=", ">"]. Examples: ">=0.1.0" or "1.0.0" |
| pApi | A pointer to a pointer variable that receives the API pointer. |
| retrievedVersion | A pointer to a SemanticVersion structure that receives version information of the received version. |