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

Head-up display the in-game renderer draws over the tunnel. More...

#include <overlay.h>

Inheritance diagram for Overlay:
Collaboration diagram for Overlay:

Public Member Functions

 Overlay (Renderer *pRenderer)
 Build the display for the game about to start.
virtual ~Overlay ()
 Release every display object and clear g_pOverlay.
virtual void DispatchPriv (Message *pMsg)
 Act on one message the renderer sends on.
void SetFrame (float flFrame)
 Advance the display to one song position.
void Draw ()
 Draw the display.
void OnBarChanged (int nTrack, int nBar, BarStatusMsg::Effects effects)
 Update the track display for one bar whose state a BarStatusMsg changed.
void OnLeaderChanged (Player *pOldLeader, Player *pNewLeader)
 Move the leader marker from one player to another.
Public Member Functions inherited from MsgSink
void * operator new (size_t nSize)
 Allocate a sink from the tagged heap under the tag "MsgSink".
void operator delete (void *pBlock)
 Release a sink to the tagged heap.
virtual ~MsgSink ()
virtual void Dispatch (Message *pMsg)
 Accept a message.

Public Attributes

HudPanel * mPanel

Detailed Description

Head-up display the in-game renderer draws over the tunnel.

Its RTTI descriptor is at 0x008efd80. It has MsgSink as its one public base at offset 0. Its type function is at 0x00429580. The class sits in app/ beside Renderer, its one constructor caller. The table the constructor installs has this class's type function in slot 0.

The table at 0x008194a8 has four entries, the same length as MsgSink's table at 0x007ccc40, and the class therefore introduces no virtual. It overrides the destructor at slot 1 and DispatchPriv() at slot 3, and inherits MsgSink::Dispatch() at slot 2.

The object is 0x5c bytes, the size Renderer's constructor requests under the MsgSink tag at 0x0042c8cc. The destructor frees every badge with the scalar free and deletes every track display, then deletes the HudPanel (its implicit destructor inlined, then the scalar free), clears GfxDevice::mFeedbackEnabled, and releases the name and kind vectors.

Constructor & Destructor Documentation

◆ Overlay()

Overlay::Overlay ( Renderer * pRenderer)

Build the display for the game about to start.

Records the renderer, configuration code 0x3a1, the game mode, the play mode, and the last bar. The layout number is the count of world players with a slot, with three players using the four-player layout. The constructor sets g_hudLayoutName from it, swaps hud<n>.view into hud.view in place of the other layouts, runs the layout at mMsPerTick, and hides every layout child other than hud.cam and hud.env. It then builds one track display per player with a slot, one badge per player, the panel, and the name and kind of each of the level's eight tracks. A jukebox session shows the jukebox prompt, the song name, and the level caption, and snaps the assembly and letterbox animations. Otherwise the assembly animation starts. Jam mode pulses every badge icon. Records itself in g_pOverlay at the end.

Parameters
pRendererThe renderer that constructs this object.
Ghidra address:
NTSC-U/C: 0x0041c940
Ghidra address:
PAL: 0x004573a0

◆ ~Overlay()

virtual Overlay::~Overlay ( )
virtual

Release every display object and clear g_pOverlay.

Each track display goes through its deleting destructor at 0x0042aa18, and the panel's implicit destructor is inlined.

Ghidra address:
NTSC-U/C: 0x0041da00
Ghidra address:
PAL: 0x004588b0

Member Function Documentation

◆ DispatchPriv()

virtual void Overlay::DispatchPriv ( Message * pMsg)
virtual

Act on one message the renderer sends on.

Compares the identity against twenty-four registered message identities in a fixed order and runs one handler for each. A PowerupCountMsg is recognised and ignored.

Parameters
pMsgThe message.
Ghidra address:
NTSC-U/C: 0x004206e0
Ghidra address:
PAL: 0x0045ba00

Implements MsgSink.

◆ SetFrame()

void Overlay::SetFrame ( float flFrame)

Advance the display to one song position.

Renderer::Update() is the caller. The bar is the position divided by 1920 ticks, and a change of bar is recorded in mCurrentBar and relights every track display's effect lamps from the renderer's cell for the new bar. The time the text animations run against is the position scaled by mMsPerTick. While the game manager plays a recording back, the panel message shows the demo prompt. The title is inferred from the caller.

Parameters
flFrameThe song position, in MIDI ticks.
Ghidra address:
NTSC-U/C: 0x0041dd20
Ghidra address:
PAL: 0x00458bf0

◆ Draw()

void Overlay::Draw ( )

Draw the display.

Draws the win message over the frame feedback while its sequence runs, and does nothing otherwise. The title is inferred.

Ghidra address:
NTSC-U/C: 0x0042acb8
Ghidra address:
PAL: 0x004660d0

◆ OnBarChanged()

void Overlay::OnBarChanged ( int nTrack,
int nBar,
BarStatusMsg::Effects effects )

Update the track display for one bar whose state a BarStatusMsg changed.

Does nothing unless the bar is the current bar in mCurrentBar. Otherwise sets the effect lamps of every track display on that track from the value. The title is inferred.

Parameters
nTrackThe track.
nBarThe bar.
effectsThe cell's effect mask.
Ghidra address:
NTSC-U/C: 0x0042ad10
Ghidra address:
PAL: 0x00466128

◆ OnLeaderChanged()

void Overlay::OnLeaderChanged ( Player * pOldLeader,
Player * pNewLeader )

Move the leader marker from one player to another.

The score pulse moves to the new leader's badge, or hides when no player leads, and the new leader's FreQ icon pulses in place of the old leader's. The title is inferred.

Parameters
pOldLeaderThe previous leader, or null.
pNewLeaderThe new leader, or null.
Ghidra address:
NTSC-U/C: 0x0042ad98
Ghidra address:
PAL: 0x004661b0

Member Data Documentation

◆ mPanel

HudPanel* Overlay::mPanel

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