resonance 1.0.1
Loading...
Searching...
No Matches
HudHighlight Class Reference

Highlight box of the head-up display, a quad whose corners glide to a target rectangle. More...

#include <hudhighlight.h>

Public Member Functions

 HudHighlight ()
 Resolve the box and its material and hide the box.
void MoveTo (float flLeft, float flTop, float flRight, float flBottom, float flDuration)
 Start moving the box's corners to a rectangle over a time.
void JumpTo (float flLeft, float flTop, float flRight, float flBottom)
 Put the box's corners on a rectangle at once.
void SetFrame (float flTime)
 Advance a move in progress and its fade.
void SetShowing (int nShowing)
 Show or hide the box.

Detailed Description

Highlight box of the head-up display, a quad whose corners glide to a target rectangle.

The class is not polymorphic and emits no RTTI. No descriptor, tag, or file path identifies it, and its name is inferred from the hilite_box objects it resolves. The head-up display panel embeds one at +0x90.

The box mesh has sixteen vertices in four corner groups of four. A move gives every group a constant horizontal speed that moves its first vertex to the target corner in the requested time, and moves the group vertically along the straight line from that vertex to the target. The box fades in over the same time.

Constructor & Destructor Documentation

◆ HudHighlight()

HudHighlight::HudHighlight ( )

Resolve the box and its material and hide the box.

Ghidra address:
NTSC-U/C: 0x00417170
Ghidra address:
PAL: 0x00450f10

Member Function Documentation

◆ MoveTo()

void HudHighlight::MoveTo ( float flLeft,
float flTop,
float flRight,
float flBottom,
float flDuration )

Start moving the box's corners to a rectangle over a time.

The move starts at the next SetFrame(), and the alpha starts from 0. The title is inferred.

Parameters
flLeftThe target left edge.
flTopThe target top edge.
flRightThe target right edge.
flBottomThe target bottom edge.
flDurationThe time the move takes, in the units SetFrame() receives.
Ghidra address:
NTSC-U/C: 0x00417388
Ghidra address:
PAL: 0x00451170

◆ JumpTo()

void HudHighlight::JumpTo ( float flLeft,
float flTop,
float flRight,
float flBottom )

Put the box's corners on a rectangle at once.

The title is inferred.

Parameters
flLeftThe left edge.
flTopThe top edge.
flRightThe right edge.
flBottomThe bottom edge.
Ghidra address:
NTSC-U/C: 0x00417570
Ghidra address:
PAL: 0x00451358

◆ SetFrame()

void HudHighlight::SetFrame ( float flTime)

Advance a move in progress and its fade.

The first call after MoveTo() records the start and the end time and does nothing else. Each later call moves the corners by the time elapsed since the previous call, stopping at the end time, and raises the alpha by the same share of the move, up to 1.

Parameters
flTimeThe current time.
Ghidra address:
NTSC-U/C: 0x00417690
Ghidra address:
PAL: 0x00451478

◆ SetShowing()

void HudHighlight::SetShowing ( int nShowing)

Show or hide the box.

The constructor is the one caller. The title is inferred.

Parameters
nShowingNon-zero to show.
Ghidra address:
NTSC-U/C: 0x00429d30
Ghidra address:
PAL: 0x00465370

The documentation for this class was generated from the following file: