coastline 0.0.4
Loading...
Searching...
No Matches
hudcanvas.h File Reference
#include <common/render.h>
Include dependency graph for hudcanvas.h:

Go to the source code of this file.

Macros

#define GBI_OP_HUD_CANVAS   0xd8
 The display-list opcode that begins or ends a scaled HUD canvas.
#define GBI_OP_FULL_SCISSOR   0xd7
 The display-list opcode for a scissor rectangle with full-width coordinates.
#define GBI_OP_FULL_TEXTURE_RECTANGLE   0xd6
 The display-list opcode for a texture rectangle with full-width coordinates.

Functions

int GetHudCanvasWidth (void)
int GetHudCanvasHeight (void)
int GetHudCanvasX (int coordinate)
int GetHudCanvasY (int coordinate)
ViewportRect * BeginRaceHudCanvas (const ViewportRect *viewports)
 Record a scaled overlay without narrowing screen coordinates in legacy commands.
void EndRaceHudCanvas (void)
 End the overlay and restore framebuffer coordinates for subsequent display-list commands.

Macro Definition Documentation

◆ GBI_OP_HUD_CANVAS

#define GBI_OP_HUD_CANVAS   0xd8

The display-list opcode that begins or ends a scaled HUD canvas.

◆ GBI_OP_FULL_SCISSOR

#define GBI_OP_FULL_SCISSOR   0xd7

The display-list opcode for a scissor rectangle with full-width coordinates.

◆ GBI_OP_FULL_TEXTURE_RECTANGLE

#define GBI_OP_FULL_TEXTURE_RECTANGLE   0xd6

The display-list opcode for a texture rectangle with full-width coordinates.

Function Documentation

◆ GetHudCanvasWidth()

int GetHudCanvasWidth ( void )
Returns
The active HUD width, or the framebuffer width outside an overlay, in pixels.

◆ GetHudCanvasHeight()

int GetHudCanvasHeight ( void )
Returns
The active HUD height, or the framebuffer height outside an overlay, in pixels.

◆ GetHudCanvasX()

int GetHudCanvasX ( int coordinate)
Parameters
coordinateA horizontal framebuffer coordinate, in pixels.
Returns
The coordinate scaled into the current HUD canvas, rounded towards zero.

◆ GetHudCanvasY()

int GetHudCanvasY ( int coordinate)
Parameters
coordinateA vertical framebuffer coordinate, in pixels.
Returns
The coordinate scaled into the current HUD canvas, rounded towards zero.

◆ BeginRaceHudCanvas()

ViewportRect * BeginRaceHudCanvas ( const ViewportRect * viewports)

Record a scaled overlay without narrowing screen coordinates in legacy commands.

Parameters
viewportsThe framebuffer viewports, with g_dwNumViewports entries (at most four).
Returns
Shared canvas-space viewports, valid until the next call.

◆ EndRaceHudCanvas()

void EndRaceHudCanvas ( void )

End the overlay and restore framebuffer coordinates for subsequent display-list commands.