|
resonance 1.0.1
|
Head-up display the in-game renderer draws over the tunnel. More...
#include <overlay.h>


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 |
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.
| 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.
| pRenderer | The renderer that constructs this object. |
|
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.
|
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.
| pMsg | The message. |
Implements MsgSink.
| 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.
| flFrame | The song position, in MIDI ticks. |
| 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.
| 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.
| nTrack | The track. |
| nBar | The bar. |
| effects | The cell's effect mask. |
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.
| pOldLeader | The previous leader, or null. |
| pNewLeader | The new leader, or null. |
| HudPanel* Overlay::mPanel |