GearLoader 1.1.0
Mod loader for GGXXACPR
Loading...
Searching...
No Matches
BaseMod_HookApi Struct Reference

Adds callbacks to managed function hooks. More...

#include <baseMod_c.h>

Data Fields

uint32_t size
 The size of the struct in bytes.
uint32_t version
 The API version.
uint32_t BASEMOD_CALL(* RemoveHook )(BaseMod_HookId id)
 Removes a hook from the registry.
BaseMod_HookId BASEMOD_CALL(* AfterPeekMessage )(BaseMod_PeekMessageHook hookFn, void *userData)
 Registers a callback to the PeekMessage hook.
BaseMod_HookId BASEMOD_CALL(* BeforeGameUpdate )(BaseMod_GameUpdateHook hookFn, void *userData)
 Registers a hook to run before the game state updates.
BaseMod_HookId BASEMOD_CALL(* AfterGameUpdate )(BaseMod_GameUpdateHook hookFn, void *userData)
 Registers a hook to run after the game state updates.
BaseMod_HookId BASEMOD_CALL(* BeforeEndScene )(BaseMod_DrawHook hookFn, void *userData)
 Registers a hook to run before the call to IDirect3DDevice9::EndScene.
BaseMod_HookId BASEMOD_CALL(* BeforePresent )(BaseMod_DrawHook hookFn, void *userData)
 Registers a hook to run after the call to IDirect3DDevice9::EndScene but before the call to IDirect3DDevice9::Present.
BaseMod_HookId BASEMOD_CALL(* AfterSaveGame )(BaseMod_SaveGameHook hookFn, void *userData)
 Registers a hook to run when the game saves such as on "Saving..." auto saving screens Or when selecting the menu option: "Main Menu > HELP & OPTIONS > SAVE / LOAD > SAVE".

Detailed Description

Adds callbacks to managed function hooks.

Field Documentation

◆ AfterGameUpdate

BaseMod_HookId BASEMOD_CALL(* BaseMod_HookApi::AfterGameUpdate) (BaseMod_GameUpdateHook hookFn, void *userData)

Registers a hook to run after the game state updates.

Use this to read game state as soon as it updates or to overwrite the game state right after the game updates it.

Parameters
hookFnThe callback function, see type BaseMod_GameUpdateHook.
userDataA generic pointer to state data that will be forwarded to hookFn.
Returns
A hook id value that can be passed to RemoveHook.

◆ AfterPeekMessage

BaseMod_HookId BASEMOD_CALL(* BaseMod_HookApi::AfterPeekMessage) (BaseMod_PeekMessageHook hookFn, void *userData)

Registers a callback to the PeekMessage hook.

Use this to read windows message such as low level keyboard inputs. This hook is a call replacement and not a direct PeekMessage hook so callbacks are only called for messages retrieved by the game window. The parameters used to call PeekMessage are provided in the BaseMod_PeekMessageInfo parameter of BaseMod_PeekMessageHook.

Parameters
hookFnThe callback function, see BaseMod_PeekMessageHook.
userDataA generic pointer to state data that will be forwarded to hookFn.
Returns
A hook id value that can be passed to RemoveHook.

◆ AfterSaveGame

BaseMod_HookId BASEMOD_CALL(* BaseMod_HookApi::AfterSaveGame) (BaseMod_SaveGameHook hookFn, void *userData)

Registers a hook to run when the game saves such as on "Saving..." auto saving screens Or when selecting the menu option: "Main Menu > HELP & OPTIONS > SAVE / LOAD > SAVE".

Use this hook to trigger saving mod data.

Parameters
hookFnThe callback function, see type BaseMod_SaveGameHook.
userDataA generic pointer to state data that will be forwarded to hookFn.
Returns
A hook id value that can be passed to RemoveHook.

◆ BeforeEndScene

BaseMod_HookId BASEMOD_CALL(* BaseMod_HookApi::BeforeEndScene) (BaseMod_DrawHook hookFn, void *userData)

Registers a hook to run before the call to IDirect3DDevice9::EndScene.

Use this to add additional graphics logic to the game's main scene.

Parameters
hookFnThe callback function, see type BaseMod_DrawHook.
userDataA generic pointer to state data that will be forwarded to hookFn.
Returns
A hook id value that can be passed to RemoveHook.

◆ BeforeGameUpdate

BaseMod_HookId BASEMOD_CALL(* BaseMod_HookApi::BeforeGameUpdate) (BaseMod_GameUpdateHook hookFn, void *userData)

Registers a hook to run before the game state updates.

Use this to apply changes to the game state right before it runs an update.

Parameters
hookFnThe callback function, see type BaseMod_GameUpdateHook.
userDataA generic pointer to state data that will be forwarded to hookFn.
Returns
A hook id value that can be passed to RemoveHook.

◆ BeforePresent

BaseMod_HookId BASEMOD_CALL(* BaseMod_HookApi::BeforePresent) (BaseMod_DrawHook hookFn, void *userData)

Registers a hook to run after the call to IDirect3DDevice9::EndScene but before the call to IDirect3DDevice9::Present.

Use this to add a new scene to the current frame.

Parameters
hookFnThe callback function, see type BaseMod_DrawHook.
userDataA generic pointer to state data that will be forwarded to hookFn.
Returns
A hook id value that can be passed to RemoveHook.

◆ RemoveHook

uint32_t BASEMOD_CALL(* BaseMod_HookApi::RemoveHook) (BaseMod_HookId id)

Removes a hook from the registry.

Parameters
idThe BaseMod_HookId of the hook to be removed.
Returns
0 if no error, else an error code.

The documentation for this struct was generated from the following file: