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

End-of-game button row shown after a solo win. More...

#include <metsolowinscreen.h>

Inheritance diagram for MetSoloWinScreen:
Collaboration diagram for MetSoloWinScreen:

Public Member Functions

 MetSoloWinScreen (MetRenderer *pRenderer, int nPriority)
 Construct the screen.
virtual ~MetSoloWinScreen ()
virtual void EnterAndShow ()
 Build the three buttons, title the screen, and push the three companion panels.
virtual void HandleCommand (const MetScreenCommand *pCommand)
 Route one command to the button ring or to the selection.
virtual void PlayLeaveSound (int nSelector)
 Play no leave sound.
virtual void PlayCycleLeftSound (int nSelector)
 Play no left cycle sound.
virtual void PlayCycleRightSound (int nSelector)
 Play no right cycle sound.
virtual void OnRepeatingSoundFinished (Rnd::Button *pButton)
 Exit the four companion screens and start this screen's exit animation.
virtual void OnEnterFinished ()
 Select the prompt layout with no back button and post the selected button's prompt.
virtual void OnExitFinished ()
 Commit the session result and go on to whichever screen the selection chose.
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 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 PlayHighSound (int nSelector)
 Play the sound that accompanies the emphasised selection.
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 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.
Public Member Functions inherited from MemcardUser
virtual ~MemcardUser ()
 Release the receiver.
virtual void OnConnectState (MemcardConnectState state, int nStatus)
 Report the state of one slot.
virtual void OnAllConnectStates ()
 Report that every slot has been enquired about.
virtual void OnMinimumSaveSpace (int nPortSlot, int nSpace)
 Report the space a save would need against the space a card has.
virtual void OnCardFormatted (int nPortSlot, int nStatus)
 Report a finished format.
virtual void OnCardUnformatted (int nPortSlot, int nStatus)
 Report a finished unformat.
virtual void OnPersonasSaved (int nPortSlot, int nStatus)
 Report a finished save of the FreQ roster.
virtual void OnRemixSaved (int nPortSlot, int nStatus)
 Report a finished save of one remix.
virtual void OnGlobalSettingsSaved (int nPortSlot, int nStatus)
 Report a finished save of the global settings.
virtual void OnJukeboxPlayListSaved (int nPortSlot, int nStatus)
 Report a finished save of a jukebox playlist.
virtual void OnRemixesListed (int nPortSlot, int nStatus)
 Report a finished listing of the saved remixes.
virtual void OnRemixLoaded (int nPortSlot, int nStatus)
 Report a finished load of one remix.
virtual void OnPersonasLoaded (int nPortSlot, int nStatus)
 Report a finished load of the FreQ roster.
virtual void OnGlobalSettingsLoaded (int nPortSlot, int nStatus)
 Report a finished load of the global settings.
virtual void OnJukeboxPlayListLoaded (int nPortSlot, int nStatus)
 Report a finished load of a jukebox playlist.
virtual void OnRemixDeleted (int nPortSlot, int nStatus)
 Report a finished deletion of one remix.
virtual void UnusedFirstReport (int nPortSlot, int nStatus)
 Do nothing.
virtual void UnusedSecondReport (int nPortSlot, int nStatus)
 Do nothing.
virtual void OnFileLoaded (int nStatus)
 Report a finished load of one file.
virtual void OnFileSaved (int nStatus)
 Report a finished save of one file.

Static Public Member Functions

static MetSoloWinScreen * New (MetRenderer *pRenderer, int nPriority)
 Allocate and construct the screen.
static void SetDifficultyUnlocked (int nUnlocked)
 Record on the registered solo win screen whether the finished stage unlocked a difficulty.
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.

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

End-of-game button row shown after a solo win.

Its RTTI descriptor is at 0x008ef190. It has two public non-virtual bases at fixed offsets, MetScreen at +0x00, and MemcardUser at +140.

The 39-entry primary vtable is at 0x0080ea80, the same length as the MetScreen table, so the class declares no virtual of its own.

The twenty-one-entry MemcardUser table at 0x0080e9d0 adjusts this by -140 in every entry. A diff against MemcardUser's own table at 0x007daf78 reads only the type function and the destructor as different, so the class overrides no memory-card report at all. It derives from the interface and implements none of it, which is faithful.

The constructor at 0x003b55a8 takes only the renderer and the load priority, and supplies egwb for the screen name, metagame/_Solo for the directory, and end_win_butts for the container.

The object is 0x98 bytes, which the allocation at 0x003b9bb4 fixes rather than the constructor's highest store.

The destructor is at 0x003b9ce8.

Nine entries of the primary table differ from the MetScreen table, which a diff of the two settles rather than the title each routine carries. Apart from the type function they are 1 0x003b9ce8 the destructor, 5 0x003b5968, 19 0x003b57a0, 21 0x003b9b90, 23 0x003b9b80, 24 0x003b9b88, 30 0x003b5f88, 33 0x003b9d80, and 36 0x003b6188. All eight behaviour slots are declared below.

Slots 21, 23, and 24 are two-instruction empty bodies at distinct addresses. Each is a genuine override rather than an inherited empty body, because MetScreen's own slot 21, 23, and 24 all play a named sound. The class therefore silences the leave sound and both cycle sounds.

Constructor & Destructor Documentation

◆ MetSoloWinScreen()

MetSoloWinScreen::MetSoloWinScreen ( MetRenderer * pRenderer,
int nPriority )

Construct the screen.

Parameters
pRendererThe front-end renderer this screen registers on.
nPriorityThe load priority.
Ghidra address:
NTSC-U/C: 0x003b55a8
Ghidra address:
PAL: 0x003e9c00

◆ ~MetSoloWinScreen()

virtual MetSoloWinScreen::~MetSoloWinScreen ( )
virtual
Ghidra address:
NTSC-U/C: 0x003b9ce8
Ghidra address:
PAL: 0x003ee6f8

Member Function Documentation

◆ New()

MetSoloWinScreen * MetSoloWinScreen::New ( MetRenderer * pRenderer,
int nPriority )
static

Allocate and construct the screen.

The 0x98-byte allocation is billed to the tag MsgSink. The routine that creates every front-end screen at 0x00385180 is its one caller.

Parameters
pRendererThe front-end renderer this screen registers on.
nPriorityThe load priority.
Returns
The new screen.
Ghidra address:
NTSC-U/C: 0x003b9b98
Ghidra address:
PAL: 0x003ee670

◆ EnterAndShow()

virtual void MetSoloWinScreen::EnterAndShow ( )
virtual

Build the three buttons, title the screen, and push the three companion panels.

Slot 5.

The prompt keys the buttons are labelled from are the same three strings the class pushes into MetScreen::mHelpKeys. The prompt the help screen displays for a button is therefore the key its label was looked up under rather than the label itself.

Ghidra address:
NTSC-U/C: 0x003b5968
Ghidra address:
PAL: 0x003ea068

Reimplemented from MetScreen.

◆ HandleCommand()

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

Route one command to the button ring or to the selection.

Slot 19.

Commands 1 and 2 step the ring and repost the prompt. Command 5 clears the active panel, starts the selection alternating, and clears the prompt. Every other command is discarded, including command 6, so the screen cannot be departed with the back button.

Parameters
pCommandThe command to route.
Ghidra address:
NTSC-U/C: 0x003b57a0
Ghidra address:
PAL: 0x003e9e60

Reimplemented from MetScreen.

◆ PlayLeaveSound()

virtual void MetSoloWinScreen::PlayLeaveSound ( int nSelector)
virtual

Play no leave sound.

Slot 21.

Parameters
nSelectorThe pad index of the command, which the body does not read.
Ghidra address:
NTSC-U/C: 0x003b9b90
Ghidra address:
PAL: 0x003ee668

Reimplemented from MetScreen.

◆ PlayCycleLeftSound()

virtual void MetSoloWinScreen::PlayCycleLeftSound ( int nSelector)
virtual

Play no left cycle sound.

Slot 23.

Parameters
nSelectorThe controller index, which the body does not read.
Ghidra address:
NTSC-U/C: 0x003b9b80
Ghidra address:
PAL: 0x003ee658

Reimplemented from MetScreen.

◆ PlayCycleRightSound()

virtual void MetSoloWinScreen::PlayCycleRightSound ( int nSelector)
virtual

Play no right cycle sound.

Slot 24.

Parameters
nSelectorThe controller index, which the body does not read.
Ghidra address:
NTSC-U/C: 0x003b9b88
Ghidra address:
PAL: 0x003ee660

Reimplemented from MetScreen.

◆ OnRepeatingSoundFinished()

virtual void MetSoloWinScreen::OnRepeatingSoundFinished ( Rnd::Button * pButton)
virtual

Exit the four companion screens and start this screen's exit animation.

Slot 30.

MetScreen slot 29 runs the slot once the selection has finished alternating, which is what pairs the button press with the departure. The Rnd::Object the slot receives is not read.

Parameters
pButtonThe button slot 29 finished with, which the body does not read.
Ghidra address:
NTSC-U/C: 0x003b5f88
Ghidra address:
PAL: 0x003ea7c8

Reimplemented from MetScreen.

◆ OnEnterFinished()

virtual void MetSoloWinScreen::OnEnterFinished ( )
virtual

Select the prompt layout with no back button and post the selected button's prompt.

Slot 33.

MetScreen slot 32 runs the slot once the enter animation has finished.

Ghidra address:
NTSC-U/C: 0x003b9d80
Ghidra address:
PAL: 0x003ee790

Reimplemented from MetScreen.

◆ OnExitFinished()

virtual void MetSoloWinScreen::OnExitFinished ( )
virtual

Commit the session result and go on to whichever screen the selection chose.

Slot 36.

MetScreen slot 35 runs the slot once the exit animation has finished. The renderer first resolves its arena view and runs its two empty hooks. A pending mDifficultyUnlocked is then cleared and committed by handing the game manager a copy of its GameParams with the difficulty raised by one. Selection 0 continues to MetSoloStagesScreen, selection 1 returns to MetMainScreen, and any other selection goes to MetLoadGameScreen after recording this screen's name in MetFrontEndState::mReturnScreen. Every path then clears the selection.

Ghidra address:
NTSC-U/C: 0x003b6188
Ghidra address:
PAL: 0x003eaa48

Reimplemented from MetScreen.

◆ SetDifficultyUnlocked()

void MetSoloWinScreen::SetDifficultyUnlocked ( int nUnlocked)
static

Record on the registered solo win screen whether the finished stage unlocked a difficulty.

The screen is resolved under the registry key MetSoloWinScreen and narrowed with dynamic_cast. The result is written through without a null test. MetStageFinishScreen slot 36 is the one caller.

Parameters
nUnlockedNon-zero when a difficulty was unlocked.
Ghidra address:
NTSC-U/C: 0x003b9c20
Ghidra address:
PAL: 0x003e9b18

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