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

Base of the five loading-tip screens. More...

#include <metmultitipsbasescreen.h>

Inheritance diagram for MetMultiTipsBaseScreen:
Collaboration diagram for MetMultiTipsBaseScreen:

Public Member Functions

virtual ~MetMultiTipsBaseScreen ()
virtual void EnterAndShow ()
 Show the numbered title, enter, and select the tips help layout.
virtual void BeginExit ()
 Exit the title screen and begin the exit.
virtual void HandleCommand (const MetScreenCommand *pCommand)
 Leave the page.
virtual void PlayHighSound (int nSelector)
virtual void PlayCycleLeftSound (int nSelector)
virtual void PlayCycleRightSound (int nSelector)
virtual void OnEnterFinished ()
 Post the first help prompt.
virtual void OnExitFinished ()
 Push the page the recorded choice leads to.
Public Member Functions inherited from MetScreen
 MetScreen (MetRenderer *pRenderer, int nPriority, const HxStr &name, const HxStr &directory, const HxStr &file)
 Construct a screen and start its container load.
virtual ~MetScreen ()
 Unregister from the renderer and release the container.
void DeliverCommand (const MetScreenCommand *pCommand)
 Play the sound one navigation command calls for and then act on the command.
void UpdateAnimationFrame (float flTime)
 Drive the frame of whichever animation is running and run the idle hook when none is.
void UpdateFrame (float flTime)
 Advance one screen by one frame.
virtual void PushNamedScreen (const HxStr &name)
 Bring one named screen onto the renderer's screen stack.
virtual void ActivateNamedPanel (const HxStr &name)
 Make one named screen the renderer's active panel.
virtual void OnPanelActivated ()
 Act on this screen having become the renderer's active panel.
virtual void ExitScreenByName (const HxStr &name)
 Start one named screen's exit animation.
virtual void OnUnusedHook ()
 Do nothing.
virtual void OnKeyboardDismissed ()
 Take control back after the keyboard screen has finished.
virtual void OnDrawPass ()
 Contribute to the renderer's draw pass.
virtual void OnDestroying ()
 Release what the screen acquired, ahead of the rest of destruction.
virtual int PollContainerLoad ()
 Advance this screen's container load and resolve its views once the load finishes.
virtual void OnMsgScreenDismissed (const HxStr &name, int nChoice)
 Act on the choice the user made in a message dialogue.
virtual void OnMsgScreenShown (const HxStr &name)
 Act on a message dialogue becoming visible.
virtual void SetShowing (int nShowing)
 Show or hide the view and every drawable the container loaded.
virtual void BeginContainerLoad (const HxStr &directory, const HxStr &file)
 Intern a container load under this screen's container name and enqueue it.
virtual void PlaySlideSound (int nSelector)
 Play the sound that accompanies sliding between screens.
virtual void PlayLeaveSound (int nSelector)
 Play the sound that accompanies departing a screen.
virtual void PlayErrorSound (int nSelector)
 Play the sound that accompanies a rejected input.
virtual void UpdateIdle (float flTime)
 Advance whatever the screen updates once per frame while it is idle.
virtual void UpdateIdleAnimation (float flTime)
 Advance whatever the screen animates while it is neither entering nor exiting.
virtual void StartRepeatingSound (float flStartTime, float flInterval, Rnd::Button *pButton, int nCycles)
 Start alternating one button between its states 2 and 1.
virtual void UpdateRepeatingSound (float flTime)
 Advance the alternation that StartRepeatingSound() started.
virtual void OnRepeatingSoundFinished (Rnd::Button *pButton)
 Act on the alternation that StartRepeatingSound() started having finished.
virtual void StartEnterAnimation (float flTime)
 Rewind the enter animation and record the time it starts at.
virtual void UpdateEnterAnimation (float flTime)
 Drive the enter animation and finish it once it passes its end.
virtual void StartExitAnimation (float flTime)
 Record the time the exit animation starts at.
virtual void UpdateExitAnimation (float flTime)
 Drive the exit animation and hide the screen once it passes its end.
virtual void Draw ()
 Draw the view.
virtual void ResolveContainerViews ()
 Resolve the three views the container produced and hide the screen.
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.

Protected Types

enum  Exit { kExitPrevious = 0 , kExitNext = 1 , kExitQuit = 2 }
 The exit a command recorded in MetScreen::mExitChoice. More...

Protected Member Functions

 MetMultiTipsBaseScreen (MetRenderer *pRenderer, int nPriority, const HxStr &name, const HxStr &file, int nPage, const HxStr &previous, const HxStr &next)
 Construct a tip page.
void ReturnToPlayerCount ()
 Return to the player-count screen.
Protected Member Functions inherited from MetScreen
virtual void DispatchPriv (Message *pMsg)
 Act on a message.
void ResolveAnimationViews ()
 Resolves the two animation views from the screen name and records the enter animation's end frame.

Additional Inherited Members

Static Public Member Functions inherited from MetScreen
static std::map< HxStr, MetContainerLoad * > & ContainerLoaderMap ()
 Shared table of container loads, interned under the container name.
static std::map< HxStr, MetScreenEntry > & ScreenRegistry ()
 Shared table of live screens, interned under the screen registry key.
static MetScreen * FindScreenByName (const HxStr &name)
 Resolve one screen by its registry key.
static MetScreen * FindEndScreen (MetRenderer *pRenderer, const HxStr &name)
 Resolve one end-of-game screen by its registry key, failing fatally when it is absent.
static void CreateMainMenuScreens (MetRenderer *pRenderer)
 Create the main-menu screens.
static void DestroyAllScreens ()
 Delete every registered screen and release every container loader.
static void CreateStartupScreens (MetRenderer *pRenderer)
 Create the four screens the front end needs before its containers have loaded.
static void CreateFrontEndScreens (MetRenderer *pRenderer)
 Create every remaining front-end screen, once.
static void DestroyCategory2Screens ()
 Delete and unregister every screen in category 2.
static void DestroyCategory1Screens ()
 Delete and unregister every screen in category 1.
static void DestroyNonDefaultScreens ()
 Delete and unregister every screen outside category 0, then rewind the rndMetLocAndNet zone.
static void PollContainerLoads ()
 Poll every container load that has not finished, and hide the drawables of each that does.
Public Attributes inherited from MetScreen
Rnd::View * mView
 The container's root view.
int mEnterPending
 Set when the screen was pushed before its container load finished.
int mActivatePending
 Set when the screen was activated as a panel before its container load finished.
float mRepeatScale
 Scale on the input auto-repeat interval.
Protected Attributes inherited from MetScreen
float mAnimEndFrame
float mEnterStartTime
MetRenderer * mRenderer
int mExitChoice
int mAcceptsCommands
Rnd::View * mEnterAnim
std::vector< HxStr > mHelpKeys
int mViewsUnresolved
int mPlaysCommandSounds
int mShowsLoadedDrawables

Detailed Description

Base of the five loading-tip screens.

Its RTTI descriptor is at 0x008ef920. It has MetScreen as its one public non-virtual base at offset 0. The 39-entry vtable is at 0x00801610, the same length as the MetScreen table, and the class declares no new virtual. The object is 0xa0 bytes, the size every child's New() requests.

Five classes derive from the class, MetMultiTips1Screen through MetMultiTips5Screen. Each child has an accessor-sized GetTypeInfo of its own at 0x0030d880, 0x0030da10, 0x0030dba0, 0x0030dd30, and 0x0030dec0.

The five children form a ring through the previous-page and next-page registry keys, and both ends of the ring lead to MetLocNumPlayersScreen. Every page loads from metagame/_Local and shows multi_tip_help as its help prompt.

Nine slots differ from the MetScreen table. Slots 22, 23, and 24 are two-instruction jr ra stubs, so this class silences three of the six MetScreen sounds by overriding them with an empty body.

Member Enumeration Documentation

◆ Exit

The exit a command recorded in MetScreen::mExitChoice.

Enumerator
kExitPrevious 

Back to the previous page.

kExitNext 

On to the next page.

kExitQuit 

Back to the player-count screen.

Constructor & Destructor Documentation

◆ ~MetMultiTipsBaseScreen()

virtual MetMultiTipsBaseScreen::~MetMultiTipsBaseScreen ( )
virtual
Ghidra address:
NTSC-U/C: 0x0030d710
Ghidra address:
PAL: 0x00333240

◆ MetMultiTipsBaseScreen()

MetMultiTipsBaseScreen::MetMultiTipsBaseScreen ( MetRenderer * pRenderer,
int nPriority,
const HxStr & name,
const HxStr & file,
int nPage,
const HxStr & previous,
const HxStr & next )
protected

Construct a tip page.

Parameters
pRendererThe front-end renderer this screen registers on.
nPriorityThe load priority.
nameThe screen name.
fileThe container name, without the .rnd suffix.
nPageThe page number shown in the title, counted from 1.
previousThe registry key of the previous page.
nextThe registry key of the next page.
Ghidra address:
NTSC-U/C: 0x00306cd8
Ghidra address:
PAL: 0x0032b700

Member Function Documentation

◆ EnterAndShow()

virtual void MetMultiTipsBaseScreen::EnterAndShow ( )
virtual

Show the numbered title, enter, and select the tips help layout.

Slot 5. The title is the multi_tips title (code 0x269) followed by the page number. The MetScreen body runs between setting the title and selecting multi_tips_tab.

Ghidra address:
NTSC-U/C: 0x003070f0
Ghidra address:
PAL: 0x0032bbc8

Reimplemented from MetScreen.

◆ BeginExit()

virtual void MetMultiTipsBaseScreen::BeginExit ( )
virtual

Exit the title screen and begin the exit.

Slot 9.

Ghidra address:
NTSC-U/C: 0x0030d7d0
Ghidra address:
PAL: 0x00333328

Reimplemented from MetScreen.

◆ HandleCommand()

virtual void MetMultiTipsBaseScreen::HandleCommand ( const MetScreenCommand * pCommand)
virtual

Leave the page.

Slot 19. Select moves to the next page, back to the previous one, and command 8 returns to the player-count screen after playing the leave sound. Each clears the active panel, records its choice in MetScreen::mExitChoice, and begins the exit.

Parameters
pCommandThe command.
Ghidra address:
NTSC-U/C: 0x00306ee0
Ghidra address:
PAL: 0x0032b958

Reimplemented from MetScreen.

◆ PlayHighSound()

virtual void MetMultiTipsBaseScreen::PlayHighSound ( int nSelector)
virtual
Parameters
nSelectorThe value the override compares against its own recorded selector.
Ghidra address:
NTSC-U/C: 0x0030d7a0
Ghidra address:
PAL: 0x003332f8

Reimplemented from MetScreen.

◆ PlayCycleLeftSound()

virtual void MetMultiTipsBaseScreen::PlayCycleLeftSound ( int nSelector)
virtual
Parameters
nSelectorThe value the override compares against its own recorded selector.
Ghidra address:
NTSC-U/C: 0x0030d790
Ghidra address:
PAL: 0x003332e8

Reimplemented from MetScreen.

◆ PlayCycleRightSound()

virtual void MetMultiTipsBaseScreen::PlayCycleRightSound ( int nSelector)
virtual
Parameters
nSelectorThe value the override compares against its own recorded selector.
Ghidra address:
NTSC-U/C: 0x0030d798
Ghidra address:
PAL: 0x003332f0

Reimplemented from MetScreen.

◆ OnEnterFinished()

virtual void MetMultiTipsBaseScreen::OnEnterFinished ( )
virtual

Post the first help prompt.

Slot 33. Posts the first entry of MetScreen::mHelpKeys at the renderer's current time.

Ghidra address:
NTSC-U/C: 0x0030d7a8
Ghidra address:
PAL: 0x00333300

Reimplemented from MetScreen.

◆ OnExitFinished()

virtual void MetMultiTipsBaseScreen::OnExitFinished ( )
virtual

Push the page the recorded choice leads to.

Slot 36. A back pushes the previous page, a select the next page, and anything else returns to the player-count screen.

Ghidra address:
NTSC-U/C: 0x003072a0
Ghidra address:
PAL: 0x0032bde0

Reimplemented from MetScreen.

Reimplemented in MetMultiTips1Screen, and MetMultiTips5Screen.

◆ ReturnToPlayerCount()

void MetMultiTipsBaseScreen::ReturnToPlayerCount ( )
inlineprotected

Return to the player-count screen.

Inline. Slot 36 and the first and last pages' slot 36 overrides expand it. Pushes MetLeftGizmoScreen and MetLocNumPlayersScreen and activates the second.


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