coastline 0.0.4
Loading...
Searching...
No Matches
hud.h
Go to the documentation of this file.
1#ifndef COASTLINE_HUD_H
2#define COASTLINE_HUD_H
3
9
10#include <PR/gbi.h>
11#include <PR/ultratypes.h>
12
13#include "common/render.h"
14#include "common/texrect.h"
15#if TGR_BOSS_RALLY
16#include "common/vehiclefwd.h"
17#endif
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
24#define DASHBOARD_VIEWS 2
25
27#define DASHBOARD_PALETTE_COLORS 256
28
29#if TGR_BOSS_RALLY
36#endif /* TGR_BOSS_RALLY */
37
38#if TGR_PLATFORM == TGR_PLATFORM_N64
48
58
68
78
88
98#endif /* TGR_PLATFORM == TGR_PLATFORM_N64 */
99
100#if TGR_PLATFORM == TGR_PLATFORM_N64
110#endif /* TGR_PLATFORM == TGR_PLATFORM_N64 */
111
121#if TGR_BOSS_RALLY
122extern char g_szHudSpeedTextBuf[];
123#else
124extern char g_szHudSpeedTextBuf[16];
125#endif
126
127#if TGR_BOSS_RALLY
133extern s32 g_bHudShowSpeedometer;
140void RenderDashboardGauges(const ViewportRect *viewports);
141#else
151#endif /* TGR_BOSS_RALLY */
152
161void StubDashboard(void);
162
178void DrawLabelWithTime(const char *label, const char *color, f32 seconds, s32 x, s32 y);
179
180#if TGR_BOSS_RALLY
181
188extern s32 g_bHudShowLapTimes;
189
196void DrawLapTimeListHud(const ViewportRect *viewports);
197
204void DrawFormattedLapTimeText(const char *color, s32 lap, f32 seconds, s32 x, s32 y);
205
206#endif /* TGR_BOSS_RALLY */
207
208#if TGR_BOSS_RALLY
214extern s32 g_bHudShowLapCounter;
220extern s32 g_bHudShowRaceTimer;
226extern s32 g_bHudShowPosition;
232extern s32 g_bShowFpsCounter;
238void DrawFpsCounterOverlay(void);
245void DrawRaceTimerHud(const ViewportRect *viewports);
253void DrawLapCounterHud(const ViewportRect *viewports, const Vehicle *vehicles);
254#else
264
274#endif /* TGR_BOSS_RALLY */
275
276#if TGR_BOSS_RALLY
283void DrawHudMessage(const ViewportRect *viewports);
284#else
293void DrawHudMessage(void);
294#endif /* TGR_BOSS_RALLY */
295
296#if TGR_BOSS_RALLY
304void DrawSpeedAndHudOverlay(const ViewportRect *viewports, const Vehicle *vehicles);
305#else
316#endif /* TGR_BOSS_RALLY */
317
327
328#if TGR_BOSS_RALLY
334extern int g_bHudShowNetworkStandings;
335
341extern int g_bHideNetStandingsHud;
342
350void DrawNetworkRaceStandingsHud(const ViewportRect *viewport, const Vehicle *vehicles);
351
358extern const char *g_pszDebugOverlayMessage;
359
366extern float g_fDebugOverlayMessageTimer;
367
375void DrawDebugOverlayBanner(const ViewportRect *viewports);
376
384void TickDebugOverlayMessageTimer(void);
385
395long double ComputeTimeGapToLeader(const Vehicle *vehicles, int index);
396
406char *FormatGapToLeaderString(const Vehicle *vehicles, int index);
407#endif /* TGR_BOSS_RALLY */
408
409#ifdef __cplusplus
410}
411#endif
412
413#endif /* COASTLINE_HUD_H */
The state the renderer shares between the parts of a frame.
The graphics binary interface types the gu routines fill in for the RSP microcode.
s32 g_bShowHudHelpText
Whether the views draw the HUD and the help of the instant replay.
void StubDashboard(void)
Does nothing.
u16 g_awDashboardBarPalette[DASHBOARD_PALETTE_COLORS]
The palette of the dashboard as loaded, which the segments of a bar take their colors from.
s32 g_adwDashboardLoadedKey[DASHBOARD_VIEWS]
The car and the night flag of the dashboard each view has loaded, the car in the low byte.
void DrawSpeedAndHudOverlay(void)
Draw the whole display of a view: the dashboard and times unless the camera is on the bumper,...
void DrawRaceTimerHud(void)
Draw the times the mode of play shows at the top right of a view.
Texture g_aDashboardGearTextures[DASHBOARD_VIEWS]
The cell of the dashboard of each view that shows the gear.
Texture g_aDashboardTextures[DASHBOARD_VIEWS]
The face of the dashboard of each view.
u16 g_aawDashboardPalettes[DASHBOARD_VIEWS][DASHBOARD_PALETTE_COLORS]
The palette the dashboard of each view draws with.
void RenderDashboardGauges(void)
Draw the dashboard of the active vehicle: its face, its gear and its tachometer.
s32 g_adwDashboardLoadedGear[DASHBOARD_VIEWS]
The gear cell each view has loaded.
#define DASHBOARD_PALETTE_COLORS
The colors of a palette of the dashboard.
Definition hud.h:27
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.
char g_szHudSpeedTextBuf[16]
The text of the speed.
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.
void DrawHudMessage(void)
Draw the message of the active vehicle in the middle of a view.
#define DASHBOARD_VIEWS
The views that keep their own dashboard.
Definition hud.h:24
void DrawLapCounterHud(void)
Draw the lap at the top left of a view and the place at its bottom left.
A compressed texture of the cartridge and the memory it is loaded into.
Definition texrect.h:16
A vehicle.
Definition vehicle.h:143
The rectangle of the screen a view fills.
Definition render.h:134
The textures of the interface and their drawing as rectangles of the screen.
Integer and floating-point types of libultra.
float f32
Definition ultratypes.h:38
unsigned short u16
Definition ultratypes.h:19
int s32
Definition ultratypes.h:25
A vertex for the RSP, with a colour or with a normal.
Definition gbi.h:75