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

Dialogue screen that writes the global settings to a memory card. More...

#include <metglobalsettingssaverscreen.h>

Inheritance diagram for MetGlobalSettingsSaverScreen:
Collaboration diagram for MetGlobalSettingsSaverScreen:

Public Member Functions

 MetGlobalSettingsSaverScreen (MetRenderer *pRenderer, int nPriority)
 Construct the settings-saver dialogue.
virtual ~MetGlobalSettingsSaverScreen ()
 Release the screen.
virtual void EnterAndShow ()
 Request the state of the recorded card.
virtual void BeginExit ()
 Remove the screen from the renderer, push every recorded return screen, and activate the first.
virtual void OnMsgScreenDismissed (const HxStr &name, int nChoice)
 Act on the choice made in one of this screen's dialogues.
virtual void PlayCycleLeftSound (int)
 Play nothing.
virtual void PlayCycleRightSound (int)
 Play nothing.
virtual void ResolveContainerViews ()
 Resolve the base views.
virtual void OnConnectState (MemcardConnectState state, int nStatus)
 Start the save on a formatted card, or raise the dialogue for an unformatted or absent one.
virtual void OnCardFormatted (int nPortSlot, int nStatus)
 Report the format result.
virtual void OnGlobalSettingsSaved (int nPortSlot, int nStatus)
 Report the save result.
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 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 HandleCommand (const MetScreenCommand *pCommand)
 Act on a navigation command.
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 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 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 OnExitFinished ()
 Act on the exit animation having finished.
virtual void Draw ()
 Draw the view.
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 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 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 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 MetGlobalSettingsSaverScreen * New (MetRenderer *pRenderer, int nPriority)
 Build the screen on the heap.
static void StartSave (const std::vector< HxStr > &screens)
 Hand the return screens to the registered saver and show it, or the screens themselves.
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

Dialogue screen that writes the global settings to a memory card.

Its RTTI descriptor is at 0x008eedc8. It has two public non-virtual bases at fixed offsets, MetScreen at +0x00 and MemcardUser at +140. The object is 0x9c bytes. Its primary 39-entry vtable is at 0x007f4b08, the same length as the MetScreen table, and the class declares no new virtual. The 21-entry MemcardUser table at 0x007f4a58 adjusts this by -140 in every entry it overrides.

Entering the screen requests the state of the card GlobalSettings records from the memory card manager. The card replies through the three MemcardUser overrides. Each raises a MetMsgScreen dialogue that this screen receives the choice of, and OnMsgScreenDismissed() retries, formats, or exits. Exiting brings back the screens StartSave() recorded.

The directory uses a capital S in the image, unlike the lowercase metagame/shared that the configuration screens use, and it is reproduced verbatim.

The translation unit spans 0x0027c2e0 to 0x00282468. Besides the members below, it has the type function at 0x00281f30, per-unit copies of MsgSink and MemcardUser routines, and template library emissions.

The primary slots that differ from the MetScreen table are 5, 9, 15, 23, 24, and 38. The MemcardUser slots that differ are 2, 5, and 9.

Constructor & Destructor Documentation

◆ MetGlobalSettingsSaverScreen()

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

Construct the settings-saver dialogue.

Supplies dlg for the screen name, metagame/Shared for the directory, and dialogue for the container.

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

◆ ~MetGlobalSettingsSaverScreen()

virtual MetGlobalSettingsSaverScreen::~MetGlobalSettingsSaverScreen ( )
virtual

Release the screen.

The body is empty.

Ghidra address:
NTSC-U/C: 0x0027c680
Ghidra address:
PAL: 0x00295400

Member Function Documentation

◆ New()

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

Build the screen on the heap.

The routine at 0x00385180 that creates every front-end screen is the caller.

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

◆ EnterAndShow()

virtual void MetGlobalSettingsSaverScreen::EnterAndShow ( )
virtual

Request the state of the recorded card.

The base routine does not run.

Slot 5.

Ghidra address:
NTSC-U/C: 0x00282088
Ghidra address:
PAL: 0x0029bde0

Reimplemented from MetScreen.

◆ BeginExit()

virtual void MetGlobalSettingsSaverScreen::BeginExit ( )
virtual

Remove the screen from the renderer, push every recorded return screen, and activate the first.

The base routine does not run.

Slot 9.

Ghidra address:
NTSC-U/C: 0x002820f8
Ghidra address:
PAL: 0x0029be00

Reimplemented from MetScreen.

◆ OnMsgScreenDismissed()

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

Act on the choice made in one of this screen's dialogues.

Slot 15. The second button of mem_check and every button of an unrecognised dialogue exit. The second button of mem_format_check formats the first card and raises mem_format_go, and its first button retries. mem_format_done retries, and the first button of format_fail retries while the second exits. In the European release the first button of mem_format_check raises save_fail_no_format with RETRY and CONTINUE instead, whose buttons act as those of format_fail do.

Parameters
nameThe dialogue name.
nChoiceThe index of the button chosen.
Ghidra address:
NTSC-U/C: 0x0027dc70
Ghidra address:
PAL: 0x002973a8

Reimplemented from MetScreen.

◆ PlayCycleLeftSound()

virtual void MetGlobalSettingsSaverScreen::PlayCycleLeftSound ( int )
inlinevirtual

Play nothing.

Slot 23. Both overrides are two-instruction stubs.

Ghidra address:
NTSC-U/C: 0x00281fb0
Ghidra address:
PAL: 0x0029bbf8

Reimplemented from MetScreen.

◆ PlayCycleRightSound()

virtual void MetGlobalSettingsSaverScreen::PlayCycleRightSound ( int )
inlinevirtual

Play nothing.

Slot 24.

Ghidra address:
NTSC-U/C: 0x00281fb8
Ghidra address:
PAL: 0x0029bc00

Reimplemented from MetScreen.

◆ ResolveContainerViews()

virtual void MetGlobalSettingsSaverScreen::ResolveContainerViews ( )
virtual

Resolve the base views.

Slot 38. The body only forwards to MetScreen::ResolveContainerViews().

Ghidra address:
NTSC-U/C: 0x00282068
Ghidra address:
PAL: 0x0029bdc0

Reimplemented from MetScreen.

◆ OnConnectState()

virtual void MetGlobalSettingsSaverScreen::OnConnectState ( MemcardConnectState state,
int nStatus )
virtual

Start the save on a formatted card, or raise the dialogue for an unformatted or absent one.

MemcardUser slot 2. A formatted card receives the save task, and mem_save is raised with no buttons. An unformatted card raises mem_format_check with NO and YES, and a failed enquiry raises mem_check with RETRY and CONTINUE. The European release also raises mem_format_check for an enquiry that reports kMemcardStatusNotFormatted.

Parameters
stateThe card's state.
nStatusThe enquiry's MemcardStatus.
Ghidra address:
NTSC-U/C: 0x0027c7a8
Ghidra address:
PAL: 0x002956b8

Reimplemented from MemcardUser.

◆ OnCardFormatted()

virtual void MetGlobalSettingsSaverScreen::OnCardFormatted ( int nPortSlot,
int nStatus )
virtual

Report the format result.

MemcardUser slot 5. Success and an already formatted card raise mem_format_done through MetMsgScreen::ShowActive() with CONTINUE. Every other result raises format_fail with RETRY and CONTINUE.

Parameters
nPortSlotThe packed port and slot. The body does not read it.
nStatusThe format task's MemcardStatus.
Ghidra address:
NTSC-U/C: 0x0027d258
Ghidra address:
PAL: 0x00296800

Reimplemented from MemcardUser.

◆ OnGlobalSettingsSaved()

virtual void MetGlobalSettingsSaverScreen::OnGlobalSettingsSaved ( int nPortSlot,
int nStatus )
virtual

Report the save result.

MemcardUser slot 9. Success exits the dialogue screen. A full card, an unknown failure, and every other result raise mem_check with RETRY and CONTINUE and a matching text. In the European release the full-card text receives nKilobytes.

Parameters
nPortSlotThe packed port and slot. The body does not read it.
nStatusThe save task's MemcardStatus.
nKilobytesThe kilobytes the card lacked. European release only.
Ghidra address:
NTSC-U/C: 0x0027e080
Ghidra address:
PAL: 0x00297bc8

Reimplemented from MemcardUser.

◆ StartSave()

void MetGlobalSettingsSaverScreen::StartSave ( const std::vector< HxStr > & screens)
static

Hand the return screens to the registered saver and show it, or the screens themselves.

The saver is resolved under MetGlobalSettingsSaverScreen and narrowed with dynamic_cast, and the result is used without a null test. When MetFrontEndState::mUsingMemcard is set, the screen registered under MetSonyScreen pushes the saver. Otherwise it pushes every screen of the list and activates the first. Seven front-end screens call it, MetStageFinishScreen among them. The European release always pushes the saver.

Parameters
screensThe registry keys of the screens to return to.
Ghidra address:
NTSC-U/C: 0x0027c2e0
Ghidra address:
PAL: 0x00295010

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