4#define BASEMOD_NAME "baseMod"
5#define BASEMOD_API_VERSION "1.1.0"
6#define BASEMOD_API_VERSION_NUM 0x010100
7#define BASEMOD_CALL __stdcall
15#include "gearLoader/ggxxacpr_c.h"
22typedef enum BM_DrawArrowSpriteDirection {
27 BM_DASD_UP_LEFT = 0x10,
28 BM_DASD_UP_RIGHT = 0x20,
29 BM_DASD_DOWN_LEFT = 0x40,
30 BM_DASD_DOWN_RIGHT = 0x80,
31} BM_DrawArrowSpriteDirection;
32typedef enum BM_DrawScrollArrowFlags {
37} BM_DrawScrollArrowFlags;
88 void BASEMOD_CALL (*
RenderMenuText)(
const char* text, int32_t x, int32_t y,
float z,
89 float alpha, int32_t* animCounter, int32_t animSpeed, int32_t ignoreSpriteMask, uint32_t color);
107 float z,
float alpha, uint32_t color, int32_t ignoreSpriteMask);
148 void BASEMOD_CALL (*
DrawArrowSprite)(uint32_t directionFlag, int32_t x, int32_t y, int32_t z, uint32_t alpha);
179 void BASEMOD_CALL (*
DrawQuad)(int32_t left, int32_t top, int32_t right, int32_t bottom, int32_t z, uint32_t color);
198 uint32_t BASEMOD_CALL (*
RegisterSprites)(uint32_t spriteId,
void* textureDataArray, uint32_t count);
208typedef enum BM_PushboxDimensionArrayType {
209 BM_PD_STANDING_WIDTH,
210 BM_PD_STANDING_HEIGHT_AC,
211 BM_PD_STANDING_HEIGHT_PR,
212 BM_PD_CROUCHING_WIDTH,
213 BM_PD_CROUCHING_HEIGHT,
214 BM_PD_AIRBORNE_WIDTH,
215 BM_PD_AIRBORNE_HEIGHT,
216} BM_PushboxDimensionArrayType;
217typedef enum BM_ThrowRangeArrayType {
220 BM_TR_AIR_HORIZONTAL_AC,
221 BM_TR_AIR_HORIZONTAL_PR,
224} BM_ThrowRangeArrayType;
371typedef uint32_t BaseMod_HookId;
372typedef struct BaseMod_HookContext BaseMod_HookContext;
378 uint32_t wMsgFilterMax;
385typedef void BASEMOD_CALL (*BaseMod_PeekMessageHook)(
void* userData,
const BaseMod_HookContext* ctx,
const BaseMod_PeekMessageInfo* info);
388typedef struct BaseMod_GameUpdateInfo BaseMod_GameUpdateInfo;
390typedef void BASEMOD_CALL (*BaseMod_GameUpdateHook)(
void* userData,
const BaseMod_HookContext* ctx,
const BaseMod_GameUpdateInfo* info);
396typedef void BASEMOD_CALL (*BaseMod_DrawHook)(
void* userData,
const BaseMod_HookContext* ctx,
const BaseMod_DrawInfo* info);
402typedef void BASEMOD_CALL (*BaseMod_SaveGameHook)(
void* userData,
const BaseMod_HookContext* ctx,
const BaseMod_SaveGameInfo* info);
432 BaseMod_HookId BASEMOD_CALL (*
AfterPeekMessage)(BaseMod_PeekMessageHook hookFn,
void* userData);
443 BaseMod_HookId BASEMOD_CALL (*
BeforeGameUpdate)(BaseMod_GameUpdateHook hookFn,
void* userData);
455 BaseMod_HookId BASEMOD_CALL (*
AfterGameUpdate)(BaseMod_GameUpdateHook hookFn,
void* userData);
466 BaseMod_HookId BASEMOD_CALL (*
BeforeEndScene)(BaseMod_DrawHook hookFn,
void* userData);
479 BaseMod_HookId BASEMOD_CALL (*
BeforePresent)(BaseMod_DrawHook hookFn,
void* userData);
491 BaseMod_HookId BASEMOD_CALL (*
AfterSaveGame)(BaseMod_SaveGameHook hookFn,
void* userData);
495typedef void (BASEMOD_CALL *BM_MenuAction)();
496typedef void (BASEMOD_CALL *BM_ValueChangeCallback)(int32_t value);
611 void BASEMOD_CALL (*
DrawEnumSettingUI)(
const char* label, int32_t xOffset, int32_t y, int32_t isSelected);
624 void BASEMOD_CALL (*
DrawGaugeSettingUI)(int32_t currentValue, int32_t y, int32_t isSelected, int32_t maxValue);
Root struct for the base mod API.
Definition baseMod_c.h:698
uint32_t size
The size of the struct in bytes.
Definition baseMod_c.h:700
const struct BaseMod_GameDataApi * GameData
Curated access to game data.
Definition baseMod_c.h:713
const struct BaseMod_NativeFunctionsApi * NativeFunctions
API for invoking native game functions.
Definition baseMod_c.h:711
const struct BaseMod_ModMenuApi * ModMenu
Add options to the mod menu.
Definition baseMod_c.h:717
uint32_t version
the API version.
Definition baseMod_c.h:709
const struct BaseMod_HookApi * Hooks
Function hooking manager.
Definition baseMod_c.h:715
Definition baseMod_c.h:226
uint16_t *BASEMOD_CALL(* GetPushboxDimensionArray)(int32_t type)
Returns a pointer to the push box array specified by the type parameter.
Definition baseMod_c.h:239
uint16_t *BASEMOD_CALL(* GetCommandGrabRangeArray)()
Returns a pointer to the command throw range array.
Definition baseMod_c.h:263
int16_t *BASEMOD_CALL(* GetPushboxAirborneOffsetArray)(int32_t gameVer)
Returns a pointer to the game's airborne pushbox offset array.
Definition baseMod_c.h:249
int16_t *BASEMOD_CALL(* GetThrowRangeArray)(int32_t type)
Returns a pointer to the throw range array specified by the type parameter.
Definition baseMod_c.h:257
uint32_t version
The API version.
Definition baseMod_c.h:230
uint32_t size
The size of the struct in bytes.
Definition baseMod_c.h:228
Definition baseMod_c.h:392
void * device
include d3d9.h and cast to IDirect3DDevice9*.
Definition baseMod_c.h:394
Definition baseMod_c.h:266
void *BASEMOD_CALL(* GetD3D9Device)()
Returns the D3D9 device pointer.
Definition baseMod_c.h:327
uint32_t size
The size of the struct in bytes.
Definition baseMod_c.h:268
const struct BaseMod_CharDataApi * CharacterData
API for accessing static character data.
Definition baseMod_c.h:275
uint32_t BASEMOD_CALL(* GetGlobalThrowFlags)()
Gets raw throw detection info.
Definition baseMod_c.h:352
int32_t BASEMOD_CALL(* GetJobMode)()
Returns the current job mode, see enum GGXXACPR_JobMode. This variable determines what scene the game...
Definition baseMod_c.h:309
uint32_t BASEMOD_CALL(* GetMainMenuSelection)()
Enum GGXXACPR_MainMenuItem. Returns the game mode selected from the main menu.
Definition baseMod_c.h:320
uint32_t BASEMOD_CALL(* GetViewWidth)()
Returns the current view width.
Definition baseMod_c.h:337
int32_t BASEMOD_CALL(* IsInGame)()
returns a non-zero value if the game is on the battle screen.
Definition baseMod_c.h:304
uint32_t version
The API version.
Definition baseMod_c.h:270
uint32_t BASEMOD_CALL(* GetGameModeFeatureFlags)()
See enum GGXXACPR_GameModeFeatureFlags. Returns the current game mode feature flags.
Definition baseMod_c.h:313
GGXXACPR_LocaleState *BASEMOD_CALL(* GetLocaleState)()
Gets a pointer to the game's locale state. see GGXXACPR_LocaleState.
Definition baseMod_c.h:368
GGXXACPR_Entity *BASEMOD_CALL(* GetPlayer)(int playerIndex)
Gets player data.
Definition baseMod_c.h:288
int32_t *BASEMOD_CALL(* GetPauseDisplayState)()
Gets a pointer to the pause display state global variable.
Definition baseMod_c.h:364
uint32_t BASEMOD_CALL(* GetViewHeight)()
Returns the current view height.
Definition baseMod_c.h:341
GGXXACPR_PlayerInput *BASEMOD_CALL(* GetPlayerInputStructArr)()
Gets a pointer to the player input struct array. See GGXXACPR_PlayerInput.
Definition baseMod_c.h:296
GGXXACPR_Camera *BASEMOD_CALL(* GetCamera)()
Gets camera data.
Definition baseMod_c.h:300
int32_t *BASEMOD_CALL(* GetPauseState)()
Gets a pointer to the pause state global variable.
Definition baseMod_c.h:358
uint32_t BASEMOD_CALL(* GetGameVersion)()
Gets the current game version. See enum GGXXACPR_GameVersion.
Definition baseMod_c.h:333
GGXXACPR_Entity *BASEMOD_CALL(* GetRootEntity)()
Returns a pointer to the root entity.
Definition baseMod_c.h:348
Adds callbacks to managed function hooks.
Definition baseMod_c.h:405
BaseMod_HookId BASEMOD_CALL(* BeforeEndScene)(BaseMod_DrawHook hookFn, void *userData)
Registers a hook to run before the call to IDirect3DDevice9::EndScene.
Definition baseMod_c.h:466
uint32_t version
The API version.
Definition baseMod_c.h:409
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 IDirect3D...
Definition baseMod_c.h:479
uint32_t BASEMOD_CALL(* RemoveHook)(BaseMod_HookId id)
Removes a hook from the registry.
Definition baseMod_c.h:417
uint32_t size
The size of the struct in bytes.
Definition baseMod_c.h:407
BaseMod_HookId BASEMOD_CALL(* BeforeGameUpdate)(BaseMod_GameUpdateHook hookFn, void *userData)
Registers a hook to run before the game state updates.
Definition baseMod_c.h:443
BaseMod_HookId BASEMOD_CALL(* AfterGameUpdate)(BaseMod_GameUpdateHook hookFn, void *userData)
Registers a hook to run after the game state updates.
Definition baseMod_c.h:455
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 select...
Definition baseMod_c.h:491
BaseMod_HookId BASEMOD_CALL(* AfterPeekMessage)(BaseMod_PeekMessageHook hookFn, void *userData)
Registers a callback to the PeekMessage hook.
Definition baseMod_c.h:432
Definition baseMod_c.h:39
uint32_t BASEMOD_CALL(* PlayCommonSoundEffect)(uint32_t id)
Plays a sound effect.
Definition baseMod_c.h:126
void BASEMOD_CALL(* RenderPopUpText)(int32_t playerIndex, const char *text)
A higher level text rendering function that triggers a text popup animation in-game (e....
Definition baseMod_c.h:114
uint32_t BASEMOD_CALL(* RegisterSprites)(uint32_t spriteId, void *textureDataArray, uint32_t count)
Registers sprite data to a spriteId to later be rendered with BaseMod_NativeFunctionsApi::DrawSprite.
Definition baseMod_c.h:198
void BASEMOD_CALL(* DrawArrowSprite)(uint32_t directionFlag, int32_t x, int32_t y, int32_t z, uint32_t alpha)
DrawSprite wrapper function that draws an arrow sprite.
Definition baseMod_c.h:148
void BASEMOD_CALL(* RenderMenuTextCenterAligned)(const char *text, int32_t x, int32_t y, float z, float alpha, uint32_t color, int32_t ignoreSpriteMask)
Draws centered aligned text to the screen.
Definition baseMod_c.h:106
uint32_t size
The size of the struct in bytes.
Definition baseMod_c.h:41
uint32_t version
The API version.
Definition baseMod_c.h:43
void BASEMOD_CALL(* DrawQuad)(int32_t left, int32_t top, int32_t right, int32_t bottom, int32_t z, uint32_t color)
Draws a rectangle to the screen.
Definition baseMod_c.h:179
void BASEMOD_CALL(* DrawSprite)(GGXXACPR_DrawSpriteParams *params, int32_t ignoreSpriteMask)
Draws a sprite to the screen.
Definition baseMod_c.h:137
void BASEMOD_CALL(* RenderMenuText)(const char *text, int32_t x, int32_t y, float z, float alpha, int32_t *animCounter, int32_t animSpeed, int32_t ignoreSpriteMask, uint32_t color)
Draws text to the screen such as the text seen in pause menus.
Definition baseMod_c.h:88
void BASEMOD_CALL(* RenderCockpitFontText)(const char *text, int32_t x, int32_t y, float z, uint8_t alpha, float size)
Draws cockpit font text to the screen.
Definition baseMod_c.h:66
void BASEMOD_CALL(* DrawTriStrip)(GGXXACPR_ColorVertex *vertices, uint32_t numVertices)
Draws a triangle strip primitive.
Definition baseMod_c.h:159
uint32_t BASEMOD_CALL(* GetActiveCommandGrabId)(GGXXACPR_Entity *player)
If the given player currently has an active command grab, returns its command grab id,...
Definition baseMod_c.h:204
Definition baseMod_c.h:374
uint32_t wMsgFilterMin
HWND from WinDef.h
Definition baseMod_c.h:377
void * hWnd
MSG from winuser.h
Definition baseMod_c.h:376
Definition baseMod_c.h:381
Reserved.
Definition baseMod_c.h:398
void * saveFileStruct
Pointer to an undocumented save file structure.
Definition baseMod_c.h:400
Definition ggxxacpr_c.h:593
Definition ggxxacpr_c.h:1237
Definition ggxxacpr_c.h:1245
Definition ggxxacpr_c.h:1045
Definition ggxxacpr_c.h:468