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

Base of the four pause screens. More...

#include <metpausebasescreen.h>

Inheritance diagram for MetPauseBaseScreen:
Collaboration diagram for MetPauseBaseScreen:

Public Member Functions

 MetPauseBaseScreen (MetRenderer *pRenderer, int nPriority, const HxStr &name, const HxStr &directory, const HxStr &file)
 Construct the screen with an empty option list.
virtual ~MetPauseBaseScreen ()
virtual void EnterAndShow ()
 Copy each label in mOptionLabels to the option text at the same index, then enter.
virtual void OnMsgScreenDismissed (const HxStr &name, int nChoice)
 Act on the quit or restart confirmation.
virtual void HandleCommand (const MetScreenCommand *pCommand)
 Record the exit action for a command and begin the exit.
virtual void PlaySlideSound (int nSelector)
virtual void PlayLeaveSound (int nSelector)
virtual void PlayHighSound (int nSelector)
virtual void PlayCycleLeftSound (int nSelector)
virtual void PlayCycleRightSound (int nSelector)
virtual void OnExitFinished ()
 Act on the recorded exit action once the exit finishes.
virtual void PlayPauseSound (int nSelector)
 Play the multiplayer bank's slide sound.
Public Member Functions inherited from MetScreenMultiSoundBank
 MetScreenMultiSoundBank (MetRenderer *pRenderer, int nPriority, const HxStr &name, const HxStr &directory, const HxStr &file)
 Construct a screen that uses the multiplayer sound bank.
virtual ~MetScreenMultiSoundBank ()
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 BeginExit ()
 Start this screen's exit animation at the renderer's current time.
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 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 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 OnEnterFinished ()
 Act on the enter animation having finished.
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.

Static Public Member Functions

static MetPauseBaseScreen * New (MetRenderer *pRenderer, int nPriority, const HxStr &name, const HxStr &directory, const HxStr &file)
 Build the screen on the heap.
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.

Protected Types

enum  ExitAction {
  kExitNone = 0 , kExitResume = 1 , kExitQuit = 3 , kExitRestart = 4 ,
  kExitGameOptions = 5 , kExitController = 6
}
 The exit action HandleCommand() recorded. More...

Protected Attributes

int mExitAction
std::vector< HxStr > mOptionLabels
HxStr mReturnPanel
std::vector< Rnd::Text * > mOptionTexts
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

Additional Inherited Members

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 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.

Detailed Description

Base of the four pause screens.

Its RTTI descriptor is at 0x00902300. It has MetScreenMultiSoundBank as its one public non-virtual base at offset 0. The vtable is at 0x00802be8 and has 40 entries, one more than the MetScreen table, and the class declares exactly one new virtual at slot 39. New() allocates 0xb0 bytes.

Four classes derive from the class: MetPauseGameScreen, MetPauseMultiRemixScreen, MetPauseSoloGameScreen, and MetPauseSoloRemixScreen. Each passes its directory and container to the constructor and then records its class name in mReturnPanel, the panel a dismissed confirmation reactivates. A derived slot 38 resolves the option texts into mOptionTexts, and a derived slot 5 fills mOptionLabels with their labels before this class's slot 5 copies them across.

A command records the exit action in mExitAction and begins the exit. Slot 36 runs when the exit finishes and either requests confirmation of a quit or a restart or unpauses the game. Slot 15 acts on the confirmation.

Slots 20 through 24 are two-instruction jr ra stubs. A pause screen plays none of the five sounds its base swapped for the multiplayer bank. Slot 39 plays the bank's slide sound instead.

Member Enumeration Documentation

◆ ExitAction

The exit action HandleCommand() recorded.

+0x8c

Enumerator
kExitNone 

No command has arrived.

kExitResume 

Unpause the game.

kExitQuit 

Confirm, then quit the game.

kExitRestart 

Confirm, then restart the game.

kExitGameOptions 

Open the game options, recorded by the solo screens only.

kExitController 

Open the controller set-up, recorded by the solo screens only.

Constructor & Destructor Documentation

◆ MetPauseBaseScreen()

MetPauseBaseScreen::MetPauseBaseScreen ( MetRenderer * pRenderer,
int nPriority,
const HxStr & name,
const HxStr & directory,
const HxStr & file )

Construct the screen with an empty option list.

Parameters
pRendererThe front-end renderer this screen registers on.
nPriorityThe load priority.
nameThe screen name.
directoryThe directory the container loads from.
fileThe container name.
Ghidra address:
NTSC-U/C: 0x00317d40
Ghidra address:
PAL: 0x0033dc48

◆ ~MetPauseBaseScreen()

virtual MetPauseBaseScreen::~MetPauseBaseScreen ( )
virtual
Ghidra address:
NTSC-U/C: 0x00317e90
Ghidra address:
PAL: 0x0033ddb0

Member Function Documentation

◆ New()

MetPauseBaseScreen * MetPauseBaseScreen::New ( MetRenderer * pRenderer,
int nPriority,
const HxStr & name,
const HxStr & directory,
const HxStr & file )
static

Build the screen on the heap.

Parameters
pRendererThe front-end renderer the screen registers on.
nPriorityThe load priority.
nameThe screen name.
directoryThe directory the container loads from.
fileThe container name.
Returns
The new screen.
Ghidra address:
NTSC-U/C: 0x0031c038
Ghidra address:
PAL: 0x00342208

◆ EnterAndShow()

virtual void MetPauseBaseScreen::EnterAndShow ( )
virtual

Copy each label in mOptionLabels to the option text at the same index, then enter.

Slot 5.

Ghidra address:
NTSC-U/C: 0x00318278
Ghidra address:
PAL: 0x0033e200

Reimplemented from MetScreen.

Reimplemented in MetPauseGameScreen, MetPauseMultiRemixScreen, MetPauseSoloGameScreen, and MetPauseSoloRemixScreen.

◆ OnMsgScreenDismissed()

virtual void MetPauseBaseScreen::OnMsgScreenDismissed ( const HxStr & name,
int nChoice )
virtual

Act on the quit or restart confirmation.

Slot 15. The first button reactivates the pause panel. The second queues an UnpauseGameSystemMsg and then either records phase 4 in MetFrontEndState and runs GrooveWorld::PostQuit() for a quit, or runs GrooveWorld::PostRestart() for a restart.

Parameters
nameThe confirmation that was dismissed.
nChoiceThe button chosen.
Ghidra address:
NTSC-U/C: 0x00318b80
Ghidra address:
PAL: 0x0033ec70

Reimplemented from MetScreen.

◆ HandleCommand()

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

Record the exit action for a command and begin the exit.

Slot 19. Code 10 resumes and a back requests a quit. A select requests a restart, but only in game mode outside a net game, or in front-end phase 5. Each plays the bank's slide sound and clears the active panel first.

Parameters
pCommandThe command.
Ghidra address:
NTSC-U/C: 0x00318010
Ghidra address:
PAL: 0x0033df58

Reimplemented from MetScreen.

Reimplemented in MetPauseMultiRemixScreen, MetPauseSoloGameScreen, and MetPauseSoloRemixScreen.

◆ PlaySlideSound()

virtual void MetPauseBaseScreen::PlaySlideSound ( int nSelector)
virtual
Parameters
nSelectorThe value the override compares against its recorded selector.
Ghidra address:
NTSC-U/C: 0x0031bff0
Ghidra address:
PAL: 0x003421c0

Reimplemented from MetScreenMultiSoundBank.

◆ PlayLeaveSound()

virtual void MetPauseBaseScreen::PlayLeaveSound ( int nSelector)
virtual
Parameters
nSelectorThe pad index of the command. The body does not read it.
Ghidra address:
NTSC-U/C: 0x0031bff8
Ghidra address:
PAL: 0x003421c8

Reimplemented from MetScreenMultiSoundBank.

◆ PlayHighSound()

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

Reimplemented from MetScreenMultiSoundBank.

◆ PlayCycleLeftSound()

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

Reimplemented from MetScreenMultiSoundBank.

◆ PlayCycleRightSound()

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

Reimplemented from MetScreenMultiSoundBank.

◆ OnExitFinished()

virtual void MetPauseBaseScreen::OnExitFinished ( )
virtual

Act on the recorded exit action once the exit finishes.

Slot 36. A quit or a restart shows a two-button NO/YES confirmation through MetMsgScreen::Show() with this screen as the owner. Any other action queues an UnpauseGameSystemMsg. The European release looks the title, the text, and the button labels up in the current language.

Ghidra address:
NTSC-U/C: 0x00318418
Ghidra address:
PAL: 0x0033e3f0

Reimplemented from MetScreen.

Reimplemented in MetPauseSoloGameScreen, and MetPauseSoloRemixScreen.

◆ PlayPauseSound()

virtual void MetPauseBaseScreen::PlayPauseSound ( int nSelector)
virtual

Play the multiplayer bank's slide sound.

Slot 20 no longer plays it.

Slot 39, the one virtual this class declares. The name is inferred.

Parameters
nSelectorThe pad index of the command.
Ghidra address:
NTSC-U/C: 0x0031c018
Ghidra address:
PAL: 0x003421e8

Member Data Documentation

◆ mExitAction

int MetPauseBaseScreen::mExitAction
protected

◆ mOptionLabels

std::vector<HxStr> MetPauseBaseScreen::mOptionLabels
protected

◆ mReturnPanel

HxStr MetPauseBaseScreen::mReturnPanel
protected

◆ mOptionTexts

std::vector<Rnd::Text *> MetPauseBaseScreen::mOptionTexts
protected

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