coastline 0.0.4
Loading...
Searching...
No Matches
hud.h File Reference

The display over a race: the dashboard, the times, the lap and place, the messages and the speed. More...

#include <PR/gbi.h>
#include <PR/ultratypes.h>
#include "common/render.h"
#include "common/texrect.h"
Include dependency graph for hud.h:

Go to the source code of this file.

Macros

#define DASHBOARD_VIEWS   2
 The views that keep their own dashboard.
#define DASHBOARD_PALETTE_COLORS   256
 The colors of a palette of the dashboard.

Functions

void RenderDashboardGauges (void)
 Draw the dashboard of the active vehicle: its face, its gear and its tachometer.
void StubDashboard (void)
 Does nothing.
void DrawLabelWithTime (const char *label, const char *color, f32 seconds, s32 x, s32 y)
 Draw a label with a time below it in minutes, seconds and hundredths.
void DrawRaceTimerHud (void)
 Draw the times the mode of play shows at the top right of a view.
void DrawLapCounterHud (void)
 Draw the lap at the top left of a view and the place at its bottom left.
void DrawHudMessage (void)
 Draw the message of the active vehicle in the middle of a view.
void DrawSpeedAndHudOverlay (void)
 Draw the whole display of a view: the dashboard and times unless the camera is on the bumper, the lap, place and message, and the speed.

Variables

s32 g_adwDashboardLoadedKey [DASHBOARD_VIEWS]
 The car and the night flag of the dashboard each view has loaded, the car in the low byte.
s32 g_adwDashboardLoadedGear [DASHBOARD_VIEWS]
 The gear cell each view has loaded.
Texture g_aDashboardTextures [DASHBOARD_VIEWS]
 The face of the dashboard of each view.
Texture g_aDashboardGearTextures [DASHBOARD_VIEWS]
 The cell of the dashboard of each view that shows the gear.
u16 g_aawDashboardPalettes [DASHBOARD_VIEWS][DASHBOARD_PALETTE_COLORS]
 The palette the dashboard of each view draws with.
u16 g_awDashboardBarPalette [DASHBOARD_PALETTE_COLORS]
 The palette of the dashboard as loaded, which the segments of a bar take their colors from.
Vtx g_aGaugeNeedleVerts [2][DASHBOARD_VIEWS][4]
 The needle of each view, for each frame buffer so a frame does not change one being drawn.
char g_szHudSpeedTextBuf [16]
 The text of the speed.
s32 g_bShowHudHelpText
 Whether the views draw the HUD and the help of the instant replay.

Detailed Description

The display over a race: the dashboard, the times, the lap and place, the messages and the speed.

Macro Definition Documentation

◆ DASHBOARD_VIEWS

#define DASHBOARD_VIEWS   2

The views that keep their own dashboard.

◆ DASHBOARD_PALETTE_COLORS

#define DASHBOARD_PALETTE_COLORS   256

The colors of a palette of the dashboard.

Function Documentation

◆ RenderDashboardGauges()

void RenderDashboardGauges ( void )

Draw the dashboard of the active vehicle: its face, its gear and its tachometer.

Ghidra address:
USA: 0x80237980
Ghidra address:
Asia: 0x802374D0
Ghidra address:
EUR: 0x80238e90
Ghidra address:
JPN: 0x80238990

◆ StubDashboard()

void StubDashboard ( void )

Does nothing.

Ghidra address:
USA: 0x8023870c
Ghidra address:
Asia: 0x8023825C
Ghidra address:
EUR: 0x80239c1c
Ghidra address:
JPN: 0x8023971c

◆ DrawLabelWithTime()

void DrawLabelWithTime ( const char * label,
const char * color,
f32 seconds,
s32 x,
s32 y )

Draw a label with a time below it in minutes, seconds and hundredths.

Parameters
labelThe label.
colorThe color code the time starts with.
secondsThe time in seconds.
xThe X coordinate of the label and the time.
yThe Y coordinate of the label.
Ghidra address:
USA: 0x80238714
Ghidra address:
Asia: 0x80238264
Ghidra address:
EUR: 0x80239c24
Ghidra address:
JPN: 0x80239724
Ghidra address:
BRD3D: 0x100171f0
Ghidra address:
BRGlide: 0x10014760

◆ DrawRaceTimerHud()

void DrawRaceTimerHud ( void )

Draw the times the mode of play shows at the top right of a view.

Ghidra address:
USA: 0x8023880c
Ghidra address:
Asia: 0x8023835C
Ghidra address:
EUR: 0x80239d1c
Ghidra address:
JPN: 0x8023981c

◆ DrawLapCounterHud()

void DrawLapCounterHud ( void )

Draw the lap at the top left of a view and the place at its bottom left.

Ghidra address:
USA: 0x80238ab8
Ghidra address:
Asia: 0x80238608
Ghidra address:
EUR: 0x80239fc8
Ghidra address:
JPN: 0x80239ac8

◆ DrawHudMessage()

void DrawHudMessage ( void )

Draw the message of the active vehicle in the middle of a view.

Ghidra address:
USA: 0x80238dd4
Ghidra address:
Asia: 0x80238924
Ghidra address:
EUR: 0x8023a2e4
Ghidra address:
JPN: 0x80239de4

◆ DrawSpeedAndHudOverlay()

void DrawSpeedAndHudOverlay ( void )

Draw the whole display of a view: the dashboard and times unless the camera is on the bumper, the lap, place and message, and the speed.

Ghidra address:
USA: 0x80238f30
Ghidra address:
Asia: 0x80238A80
Ghidra address:
EUR: 0x8023a440
Ghidra address:
JPN: 0x80239f40

Variable Documentation

◆ g_adwDashboardLoadedKey

s32 g_adwDashboardLoadedKey[DASHBOARD_VIEWS]
extern

The car and the night flag of the dashboard each view has loaded, the car in the low byte.

Ghidra address:
USA: 0x8028c790
Ghidra address:
Asia: 0x8028C2E0
Ghidra address:
EUR: 0x8028eef0
Ghidra address:
JPN: 0x8028e940

◆ g_adwDashboardLoadedGear

s32 g_adwDashboardLoadedGear[DASHBOARD_VIEWS]
extern

The gear cell each view has loaded.

Ghidra address:
USA: 0x8028c798
Ghidra address:
Asia: 0x8028C2E8
Ghidra address:
EUR: 0x8028eef8
Ghidra address:
JPN: 0x8028e948

◆ g_aDashboardTextures

Texture g_aDashboardTextures[DASHBOARD_VIEWS]
extern

The face of the dashboard of each view.

Ghidra address:
USA: 0x8028c7a8
Ghidra address:
Asia: 0x8028C2F8
Ghidra address:
EUR: 0x8028ef08
Ghidra address:
JPN: 0x8028e958

◆ g_aDashboardGearTextures

Texture g_aDashboardGearTextures[DASHBOARD_VIEWS]
extern

The cell of the dashboard of each view that shows the gear.

Ghidra address:
USA: 0x8028c7d0
Ghidra address:
Asia: 0x8028C320
Ghidra address:
EUR: 0x8028ef30
Ghidra address:
JPN: 0x8028e980

◆ g_aawDashboardPalettes

u16 g_aawDashboardPalettes[DASHBOARD_VIEWS][DASHBOARD_PALETTE_COLORS]
extern

The palette the dashboard of each view draws with.

Ghidra address:
USA: 0x80361530
Ghidra address:
Asia: 0x80360FE0
Ghidra address:
EUR: 0x80363a30
Ghidra address:
JPN: 0x803626a0

◆ g_awDashboardBarPalette

u16 g_awDashboardBarPalette[DASHBOARD_PALETTE_COLORS]
extern

The palette of the dashboard as loaded, which the segments of a bar take their colors from.

Ghidra address:
USA: 0x80361930
Ghidra address:
Asia: 0x803613E0
Ghidra address:
EUR: 0x80363e30
Ghidra address:
JPN: 0x80362aa0

◆ g_aGaugeNeedleVerts

Vtx g_aGaugeNeedleVerts[2][DASHBOARD_VIEWS][4]
extern

The needle of each view, for each frame buffer so a frame does not change one being drawn.

Ghidra address:
USA: 0x80361b30
Ghidra address:
Asia: 0x803615E0
Ghidra address:
EUR: 0x80364030
Ghidra address:
JPN: 0x80362ca0

◆ g_szHudSpeedTextBuf

char g_szHudSpeedTextBuf[16]
extern

The text of the speed.

Ghidra address:
USA: 0x80361c30
Ghidra address:
Asia: 0x803616E0
Ghidra address:
EUR: 0x80364130
Ghidra address:
JPN: 0x80362da0
Ghidra address:
BRD3D: 0x104b0320

◆ g_bShowHudHelpText

s32 g_bShowHudHelpText
extern

Whether the views draw the HUD and the help of the instant replay.

Ghidra address:
USA: 0x8028aa6c
Ghidra address:
Asia: 0x8028A5BC
Ghidra address:
EUR: 0x8028cc74
Ghidra address:
JPN: 0x8028c744