resonance 1.0.1
Loading...
Searching...
No Matches
hudutil.h File Reference
#include "math/color.h"
#include "os/hxstr.h"
Include dependency graph for hudutil.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  PowerupType {
  kHudItemNone = -1 , kHudItemNeutralizer = 0 , kHudItemCrippler = 1 , kHudItemFreestyler = 2 ,
  kHudItemAutocatcher = 3 , kHudItemBumper = 4 , kHudItemVolume = 5 , kHudItemWah = 6 ,
  kHudItemStutter = 7 , kHudItemEcho = 8 , kHudItemFlange = 9 , kHudItemChorus = 10 ,
  kHudItemGuides = 11 , kHudItemMultiplier = 12
}
 Kinds of item the head-up display labels, in the order HudPowerupName() maps them. More...

Functions

HxStr HudPowerupName (int nKind)
 Report the display name of one item kind.
Color HudColorFromName (HxStr name)
 Report the colour of one player colour name.
HxStr NextHudName ()
 Produce the next unique object name of the form <hud%04d>.

Variables

int g_nHudNameCounter
 Count of names NextHudName() has produced.

Enumeration Type Documentation

◆ PowerupType

Kinds of item the head-up display labels, in the order HudPowerupName() maps them.

The first five are the powerups and the thirteenth is the multiplier, and HudPowerup selects a view for exactly those six. The seven between are the effect names the track display prints. The enumerator names follow the literals HudPowerupName() returns.

Enumerator
kHudItemNone 

No item. HudPowerup shows nothing.

kHudItemNeutralizer 

NEUTRALIZER.

kHudItemCrippler 

CRIPPLER.

kHudItemFreestyler 

FREESTYLER.

kHudItemAutocatcher 

AUTOCATCHER.

kHudItemBumper 

BUMPER.

kHudItemVolume 

Volume.

kHudItemWah 

Wah.

kHudItemStutter 

Stutter.

kHudItemEcho 

Echo.

kHudItemFlange 

Flange.

kHudItemChorus 

Chorus.

kHudItemGuides 

Guides.

kHudItemMultiplier 

MULTIPLIER.

Function Documentation

◆ HudPowerupName()

HxStr HudPowerupName ( int nKind)

Report the display name of one item kind.

Any value outside the thirteen kinds yields the empty string. The routine is a free function of the head-up display's translation unit. Its callers are the track display's effect labels and two of Overlay's message handlers. The title is inferred.

Parameters
nKindThe item kind.
Returns
The name.
Ghidra address:
NTSC-U/C: 0x00415ed8
Ghidra address:
PAL: 0x0044fa40

◆ HudColorFromName()

Color HudColorFromName ( HxStr name)

Report the colour of one player colour name.

green, red, yellow, purple, and null each select a fixed colour, and any other name selects cyan. Every result is opaque. The title is inferred.

Both callers copy the name into a temporary and pass its address, then release it after the call. That is the by-value convention for a class with a copy constructor.

Parameters
nameThe colour name, as a player records it.
Returns
The colour.
Ghidra address:
NTSC-U/C: 0x00416068
Ghidra address:
PAL: 0x0044fba0

◆ NextHudName()

HxStr NextHudName ( )

Produce the next unique object name of the form <hud%04d>.

Advances g_nHudNameCounter first, so the first name is <hud0001>. HudPosition's constructor inlines the body twice, and this copy has no caller. The title is inferred.

Returns
The name.
Ghidra address:
NTSC-U/C: 0x004298e8
Ghidra address:
PAL: 0x00464f28

Variable Documentation

◆ g_nHudNameCounter

int g_nHudNameCounter
extern

Count of names NextHudName() has produced.

Ghidra address:
NTSC-U/C: 0x006dfde8
Ghidra address:
PAL: 0x00723618