|
GearLoader 1.1.0
Mod loader for GGXXACPR
|
Public Member Functions | |
| void | RenderCockpitFontText (std::string text, int32_t x, int32_t y, float z, uint8_t alpha, float size) |
| Draws text to the screen during battle using the game's text glyph system. | |
| void | RenderMenuText (const char *text, int32_t x, int32_t y, float z, float alpha, int32_t *animCounter, int32_t animSpeed, bool ignoreSpriteMask, uint32_t color) |
| Draws text to the screen such as the text seen in pause menus. | |
| void | RenderMenuTextCenterAligned (const char *text, int32_t x, int32_t y, float z, float alpha, uint32_t color, bool ignoreSpriteMask) |
| Draws centered aligned text to the screen. | |
| void | RenderPopUpText (int32_t playerIndex, std::string text) |
| A higher level text rendering function that triggers a text popup animation in-game (e.g. COUNTER HIT / RECOVERY). | |
| bool | PlayCommonSoundEffect (uint32_t id) |
| Plays a sound effect. | |
| void | DrawSprite (GGXXACPR_DrawSpriteParams *params, bool ignoreSpriteMask) |
| Draws a sprite to the screen. | |
| void | DrawArrowSprite (DrawArrowSpriteDirection direction, int32_t x, int32_t y, int32_t z, uint32_t alpha) |
| DrawSprite wrapper function that draws an arrow sprite. | |
| void | DrawTriStrip (ggxxacpr::ColorVertex *vertices, uint32_t numVertices) |
| Draws a triangle strip primitive. | |
| void | DrawQuad (int32_t left, int32_t top, int32_t right, int32_t bottom, int32_t z, uint32_t color) |
| Draws a quad to the screen. | |
| void | 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 | GetActiveCommandGrabId (ggxxacpr::Player player) |
| If the given player currently has an active command grab, returns its command grab id, else return 0. | |
| Public Member Functions inherited from BaseMod::ApiWrapper< BaseMod_NativeFunctionsApi > | |
| bool | VersionError () |
| bool | IsValid () |
| const BaseMod_NativeFunctionsApi * | GetCApi () |
Additional Inherited Members | |
| Protected Attributes inherited from BaseMod::ApiWrapper< BaseMod_NativeFunctionsApi > | |
| const BaseMod_NativeFunctionsApi * | _ref |
|
inline |
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. |
|
inline |
Draws a quad 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).
| 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) |
|
inline |
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. |
|
inline |
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. |
|
inline |
If the given player currently has an active command grab, returns its command grab id, else return 0.
|
inline |
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. |
|
inline |
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 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. |
|
inline |
Draws text to the screen during battle using the game's text glyph system.
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). |
|
inline |
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 | If true, ignores color and alpha params and draws as fully opaque white text. |
| color | The color of the text string (0xRRGGBB) |
|
inline |
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 | If true, ignores color and alpha params and draws as fully opaque white text. |
|
inline |
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. |