Icon of the power-up a player holds, with its name.
More...
#include <hudpowerup.h>
|
| | HudPowerup (int nIndex, RndView *pHudView) |
| | Construct an empty icon of a player.
|
| void | Reset () |
| | Empty the icon and move it out of sight at once.
|
| void | ShowPowerup (int nPowerup) |
| | Show the icon and the name of a power-up, or empty the icon.
|
| void | Poll (float fDelta, float fUnused, float fDeltaTicks) |
| | Advance the slide, and show the icon while it is not out of sight.
|
| void | UpdateSlide () |
| | Slide the icon into view when a power-up is held and the icon is enabled, and out of sight otherwise.
|
| void | SetEnabled (int nEnabled) |
|
| static constexpr float | kHiddenFrame = 480.0f |
| | The frame of the slide at which the icon is out of sight.
|
Icon of the power-up a player holds, with its name.
The class is not polymorphic and emits no RTTI. The object is 0x40 bytes. The icon slides out of sight while the player holds no power-up. In the tutorial the icon does not slide.
◆ Icon
The icons, the indices of mIcons.
| Enumerator |
|---|
| kIconAutocatcher | <hud> pup auto<n>.view.
|
| kIconSlowdown | <hud> pup slow<n>.view.
|
| kIconBumper | <hud> pup bump<n>.view.
|
| kIconCrippler | <hud> pup crip<n>.view.
|
| kIconFreestyle | <hud> pup free<n>.view.
|
| kIconMultiplier | <hud> pup mult<n>.view.
|
| kNumIcons | The number of icons.
|
◆ HudPowerup()
| HudPowerup::HudPowerup |
( |
int | nIndex, |
|
|
RndView * | pHudView ) |
Construct an empty icon of a player.
The scene objects are <hud> pup<n>.mesh, <hud> pup<n>.view, <hud> pup<n> name.txt, the six icon views, and the slide <hud> pup<n> hide.tnm. An online game uses the HUD1 objects and draws the icon into the letterboxed view of its player.
- Parameters
-
| nIndex | The number of the icon, from 0. |
| pHudView | The view of the head-up display. |
- Ghidra address:
- NTSC-U/C: 0x001bc730
- Ghidra address:
- PAL: 0x001c54d0
◆ Reset()
| void HudPowerup::Reset |
( |
| ) |
|
Empty the icon and move it out of sight at once.
- Ghidra address:
- NTSC-U/C: 0x001bcd68
- Ghidra address:
- PAL: 0x001c5b08
◆ ShowPowerup()
| void HudPowerup::ShowPowerup |
( |
int | nPowerup | ) |
|
Show the icon and the name of a power-up, or empty the icon.
- Parameters
-
- Ghidra address:
- NTSC-U/C: 0x001bcdb8
- Ghidra address:
- PAL: 0x001c5b58
◆ Poll()
| void HudPowerup::Poll |
( |
float | fDelta, |
|
|
float | fUnused, |
|
|
float | fDeltaTicks ) |
Advance the slide, and show the icon while it is not out of sight.
- Parameters
-
| fDelta | The time since the last poll, or 0 to take it from fDeltaTicks. |
| fUnused | Not read. |
| fDeltaTicks | The ticks since the last poll. |
- Ghidra address:
- NTSC-U/C: 0x001bcfb0
- Ghidra address:
- PAL: 0x001c5d50
◆ UpdateSlide()
| void HudPowerup::UpdateSlide |
( |
| ) |
|
Slide the icon into view when a power-up is held and the icon is enabled, and out of sight otherwise.
- Ghidra address:
- NTSC-U/C: 0x001bd038
- Ghidra address:
- PAL: 0x001c5dd8
◆ SetEnabled()
| void HudPowerup::SetEnabled |
( |
int | nEnabled | ) |
|
|
inline |
- Parameters
-
| nEnabled | Whether the icon may slide into view. |
◆ kHiddenFrame
| float HudPowerup::kHiddenFrame = 480.0f |
|
staticconstexpr |
The frame of the slide at which the icon is out of sight.
The documentation for this class was generated from the following file: