|
GearLoader 1.1.0
Mod loader for GGXXACPR
|
Data Fields | |
| uint32_t | size |
| The size of the struct in bytes. | |
| uint32_t | version |
| The API version. | |
| 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. | |
| 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. | |
| 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. | |
| 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.g. COUNTER HIT / RECOVERY). | |
| uint32_t BASEMOD_CALL(* | PlayCommonSoundEffect )(uint32_t id) |
| Plays a sound effect. | |
| void BASEMOD_CALL(* | DrawSprite )(GGXXACPR_DrawSpriteParams *params, int32_t ignoreSpriteMask) |
| Draws a sprite to the screen. | |
| 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. | |
| void BASEMOD_CALL(* | DrawTriStrip )(GGXXACPR_ColorVertex *vertices, uint32_t numVertices) |
| Draws a triangle strip primitive. | |
| 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. | |
| 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. | |
| uint32_t BASEMOD_CALL(* | GetActiveCommandGrabId )(GGXXACPR_Entity *player) |
| If the given player currently has an active command grab, returns its command grab id, else return 0. | |
| void BASEMOD_CALL(* BaseMod_NativeFunctionsApi::DrawArrowSprite) (uint32_t directionFlag, int32_t x, int32_t y, int32_t z, uint32_t alpha) |
DrawSprite wrapper function that draws an arrow sprite.
| directionFlag | see enum BM_DrawArrowSpriteDirection |
| x | Internal resolution screen-space coordinate (640x480). Left edge is 0, right is 640. |
| y | Internal resolution screen-space coordinate (640x480). Top edge is 0, bottom is 480. |
| z | The draw order/depth buffer value. Lower values draw later / appear in front of other text and sprites. |
| alpha | Transparency value from 1 to 255, 1 being fully opaque. |
| void BASEMOD_CALL(* BaseMod_NativeFunctionsApi::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.
A simple helper function that calls constructs four vertices from the given parameters and passes them to DrawTriStrip. The edges of the quad are given in internal resolution screen space coordinates. The top left pixel is (0, 0) and the bottom right pixel is (640, 480).
This function should only be invoked in the context of the game's main scene, such as during a hook registered with BaseMod_Api::BeforeEndScene.
| left | edge position |
| top | edge position |
| right | edge position |
| bottom | edge position |
| z | The Z coordinate for each vertex |
| color | ARGB color value (i.e. D3DCOLOR from D3D9Types.h) |
| void BASEMOD_CALL(* BaseMod_NativeFunctionsApi::DrawSprite) (GGXXACPR_DrawSpriteParams *params, int32_t ignoreSpriteMask) |
Draws a sprite to the screen.
| params | Combined parameter struct |
| ignoreSpriteMask | A 4-byte boolean value. If a non-zero value is passed, ignores color and alpha params. |
| void BASEMOD_CALL(* BaseMod_NativeFunctionsApi::DrawTriStrip) (GGXXACPR_ColorVertex *vertices, uint32_t numVertices) |
Draws a triangle strip primitive.
The coordinates of the vertices are given in internal resolution screen space coordinates. The top left pixel is (0, 0) and the bottom right pixel is (640, 480).
| vertices | The vertices making up the triangle strip. |
| numVertices | The number of vertices. |
| uint32_t BASEMOD_CALL(* BaseMod_NativeFunctionsApi::PlayCommonSoundEffect) (uint32_t id) |
Plays a sound effect.
An internal array is indexed with the id parameter without validity checks. Invalid values can cause invalid memory access.
| id | The given id maps to the "COMMON SE" sound effect in the Sound menu. See github.com/youknow232/gearloader/tree/main/docs/SoundEffectIdMap.txt for the id mappings. |
| uint32_t BASEMOD_CALL(* BaseMod_NativeFunctionsApi::RegisterSprites) (uint32_t spriteId, void *textureDataArray, uint32_t count) |
Registers sprite data to a spriteId to later be rendered with BaseMod_NativeFunctionsApi::DrawSprite.
When registering multiple sprites, each sprite will be sequentially registered with spriteIds starting with the given spriteId parameter. Example: Registering 4 sprites at spriteId 100 registers ids 100,101,102,103.
See tutorial on registering and using custom sprites for more information.
| spriteId | The initial slot sprite data will be loaded into. |
| textureDataArray | The raw sprite data. |
| count | The number of sprites to register. If 0, sprites will be registered until a null pointer is found in the given array. |
| void BASEMOD_CALL(* BaseMod_NativeFunctionsApi::RenderCockpitFontText) (const char *text, int32_t x, int32_t y, float z, uint8_t alpha, float size) |
Draws cockpit font text to the screen.
The font drawn depends on the "Main Menu > Help & Options > Display & Audio Settings > Cockpit Font" setting. This function must be called before the game begins its drawing process. It is recommend to call this function in the AfterGameUpdate hook.
| text | A pointer to the text string to be displayed. The string format is a subset of ASCII. The character set is limited to upper case letters, numbers, and the following special symbols: "-+.!?/():&" The following characters map to additional special characters: ",~acegiwxyz" maps to "•±on•utabyx". '>' = END character from the highscore initials screen. "bdfh" = down/left/right/up arrows |
| x | Internal resolution screen-space coordinate (640x480). Left edge is 0, right is 640. |
| y | Internal resolution screen-space coordinate (640x480). Top edge is 0, bottom is 480. |
| z | The draw order/depth buffer value. Lower values draw later / appear in front of other text and sprites. |
| alpha | Transparency value [0-255]. |
| size | Scaling value, standard size is 1.0f which results in a text glyph of size 12x15px (internal resolution). |
| void BASEMOD_CALL(* BaseMod_NativeFunctionsApi::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.
This function must be called before the game begins its drawing process. It is recommend to call this function in the AfterGameUpdate hook. Max string size is 512 characters. This function can handle '
' characters.
| text | A pointer to the text string to be displayed. |
| x | Internal resolution screen-space coordinate (640x480). Left edge is 0, right is 640. |
| y | Internal resolution screen-space coordinate (640x480). Top edge is 0, bottom is 480. |
| z | The draw order/depth buffer value. Lower values draw later / appear in front of other text and sprites. |
| alpha | Transparency value from 0 to 1, 1 being fully opaque. |
| animCounter | Optional pointer to an animation counter. If defined, the text will perform a 'typewriter' animation drawing an additional letter at a time until fully rendered. One letter will be rendered per 128 units on this counter. When the animation is complete, this value will be set to -1 and will no longer increment. |
| animSpeed | The amount to increment the animCounter if it is defined. Set to 128 for 1 letter per frame. |
| ignoreSpriteMask | A 4-byte boolean value. If a non-zero value is passed, ignores color and alpha params and draws as fully opaque white text. |
| color | The color of the text string (0xRRGGBB) |
| void BASEMOD_CALL(* BaseMod_NativeFunctionsApi::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.
A wrapper of RenderMenuText that draws the text centered around the x parameter. y position is unchanged. This function handles multi-line strings but centers based on the longest line only (i.e. each line is NOT individually centered).
| text | A pointer to the text string to be displayed. |
| x | Internal resolution screen-space coordinate (640x480). Left edge is 0, right is 640. |
| y | Internal resolution screen-space coordinate (640x480). Top edge is 0, bottom is 480. |
| z | The draw order/depth buffer value. Lower values draw later / appear in front of other text and sprites. |
| alpha | Transparency value from 0 to 1, 1 being fully opaque. |
| color | The color of the text string (0xRRGGBB) |
| ignoreSpriteMask | A 4-byte boolean value. If a non-zero value is passed, ignores color and alpha params and draws as fully opaque white text. |
| void BASEMOD_CALL(* BaseMod_NativeFunctionsApi::RenderPopUpText) (int32_t playerIndex, const char *text) |
A higher level text rendering function that triggers a text popup animation in-game (e.g. COUNTER HIT / RECOVERY).
| playerIndex | Which side of the screen to display the pop up. |
| text | The text to be displayed. See RenderCockpitFontText for format and available characters. |