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

Screen that loads a saved FreQ identity from a memory card. More...

#include <metloadfreqscreen.h>

Inheritance diagram for MetLoadFreqScreen:
Collaboration diagram for MetLoadFreqScreen:

Public Member Functions

 MetLoadFreqScreen (MetRenderer *pRenderer, int nPriority)
 Construct the screen.
virtual ~MetLoadFreqScreen ()
virtual void EnterAndShow ()
 Set the screen title and the prompt layout, then enter.
virtual void OnMsgScreenDismissed (const HxStr &name, int nChoice)
 Restore this screen after the FreQ-limit message is dismissed.
virtual void OnEnterFinished ()
 Play SND_MET_SELECTFREQ once the enter animation has finished.
virtual void UpdateNameLabel ()
 Write the selected username into the first button and the edit label into the second.
virtual void OnNameButton ()
 Commit the selected identity to the game manager and advance.
virtual void PrepareFreqMakerForSelection ()
 Hand the selected identity to the FreQ maker.
virtual void OnCreateButton ()
 Refuse a ninth identity, or create one.
virtual void AcquireIdentityList ()
 Take the identity list the memory-card path last read.
virtual void BuildButtonList ()
 Rebuild the button ring with labels on the second and third buttons.
Public Member Functions inherited from MetLoadFreqBaseScreen
 MetLoadFreqBaseScreen (MetRenderer *pRenderer, int nPriority)
 Construct the screen.
virtual ~MetLoadFreqBaseScreen ()
virtual void HandleCommand (const MetScreenCommand *pCommand)
 Act on one navigation command.
virtual void PlayCycleLeftSound (int nSelector)
 Play the cycle-left sound while the carousel is selected and has more than one entry.
virtual void PlayCycleRightSound (int nSelector)
 Play the cycle-right sound under the same two conditions as PlayCycleLeftSound().
virtual void OnRepeatingSoundFinished (Rnd::Button *pButton)
 Start the exit animation once the selected button has finished alternating.
virtual void OnExitFinished ()
 Act on the departure the exit animation has just finished.
virtual void ResolveContainerViews ()
 Resolve the two cycle arrows after the container load.
virtual void OnEditButton ()
 Act on the second button, whose prompt is cid_edit.
virtual void UpdateCycleArrows ()
 Show the two cycle arrows only while more than one identity exists.
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 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 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.
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 MetScreen * New (MetRenderer *pRenderer, int nPriority)
 Produce a load screen on the heap.
Static Public Member Functions inherited from MetLoadFreqBaseScreen
static MetScreen * New (MetRenderer *pRenderer, int nPriority)
 Produce a base load 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.

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 MetLoadFreqBaseScreen
void RefreshSelection ()
 Reapply the selected identity to the preview and the label.
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 MetLoadFreqBaseScreen
std::vector< MetPersonaData * > * mIdentityList
MetButtonList * mButtonList
int mSelectedIdentity
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

Screen that loads a saved FreQ identity from a memory card.

Its RTTI descriptor is at 0x00901f10. It has two public non-virtual bases at fixed offsets, MetLoadFreqBaseScreen at +0x00 and MemcardUser at +164. The object is 0xac bytes. The 47-entry primary vtable is at 0x007f6fc0 and the 21-entry MemcardUser table at 0x007f6f10 adjusts this by -164. The primary is the same length as the MetLoadFreqBaseScreen table, and the class declares no new virtual.

The constructor at 0x0029bcf0 takes only the renderer and the load priority, runs the MetLoadFreqBaseScreen constructor at 0x00291e00 (it supplies all three names), and writes its two vptrs and mFreqLimitPending. The destructor at 0x0029bd38 restores the primary vptr, restores the MemcardUser vptr to 0x007daf78, runs the MetLoadFreqBaseScreen destructor, and releases the object with the tag MsgSink.

Eleven slots differ from the MetLoadFreqBaseScreen table, and a diff of the two tables reads slots 1, 5, 15, 33, 39, 40, 41, 43, 44, and 45 apart from the type function.

Unlike the base, this screen labels the second and third buttons. BuildButtonList() looks both labels up through Script::QueryConfigString() under configuration code 0x258, passing the keys lf_edit and lf_create, and UpdateNameLabel() then appends the selected username to the lf_edit label so that the second button reads as an edit of a particular identity.

In the European release MetLoadFreqBaseScreen derives from MetMemDetectScreen, and this class has MetLoadFreqBaseScreen as its one base. The object is 0xbc bytes, the 54-entry primary vtable is at 0x0083aec0, and the MemcardUser table is at 0x0083ae10. The constructor is at 0x002b94b0 and the destructor at 0x002b94f0. The class does not override slot 15 and has no data member, and the refusals of OnCreateButton() move to MetLoadFreqBaseScreen.

Constructor & Destructor Documentation

◆ MetLoadFreqScreen()

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

Construct the screen.

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

◆ ~MetLoadFreqScreen()

virtual MetLoadFreqScreen::~MetLoadFreqScreen ( )
virtual
Ghidra address:
NTSC-U/C: 0x0029bd38
Ghidra address:
PAL: 0x002b94f0

Member Function Documentation

◆ New()

MetScreen * MetLoadFreqScreen::New ( MetRenderer * pRenderer,
int nPriority )
static

Produce a load screen on the heap.

The front end's screen factory at 0x00385180 is the caller.

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

◆ EnterAndShow()

virtual void MetLoadFreqScreen::EnterAndShow ( )
virtual

Set the screen title and the prompt layout, then enter.

Slot 5. The title comes from configuration code 0x269 under the key load_char, and the prompt layout is standard_title. The MetLoadFreqBaseScreen body then runs as a direct call.

Ghidra address:
NTSC-U/C: 0x00297448
Ghidra address:
PAL: 0x002b5530

Reimplemented from MetLoadFreqBaseScreen.

◆ OnMsgScreenDismissed()

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

Restore this screen after the FreQ-limit message is dismissed.

Slot 15. A message screen whose name is not freq_limit is ignored. The choice the user made is not read, and both responses restore the screen. The title is set again from the same configuration code EnterAndShow() uses.

Parameters
nameThe message screen that was dismissed.
nChoiceThe response. This override does not read it.
Ghidra address:
NTSC-U/C: 0x00298510

Reimplemented from MetScreen.

◆ OnEnterFinished()

virtual void MetLoadFreqScreen::OnEnterFinished ( )
virtual

Play SND_MET_SELECTFREQ once the enter animation has finished.

Slot 33.

Ghidra address:
NTSC-U/C: 0x0029bdc8
Ghidra address:
PAL: 0x002b9580

Reimplemented from MetScreen.

◆ UpdateNameLabel()

virtual void MetLoadFreqScreen::UpdateNameLabel ( )
virtual

Write the selected username into the first button and the edit label into the second.

Slot 39, and slot 45 in the European release. The first button is set exactly as the base sets it. The second takes the lf_edit label with the same username appended. The European release instead formats the username into the EDIT s text of the current language.

Ghidra address:
NTSC-U/C: 0x002976f8
Ghidra address:
PAL: 0x002b5878

Reimplemented from MetLoadFreqBaseScreen.

◆ OnNameButton()

virtual void MetLoadFreqScreen::OnNameButton ( )
virtual

Commit the selected identity to the game manager and advance.

Slot 40, and slot 46 in the European release. The game manager's persona list is cleared and the selected identity is added to it, then the game mode decides where the front end goes next, MetNetPortalScreen for mode 3 and MetModeScreen otherwise. MetLeftGizmoScreen is pushed ahead of either.

Ghidra address:
NTSC-U/C: 0x002978d0
Ghidra address:
PAL: 0x002b5a68

Reimplemented from MetLoadFreqBaseScreen.

◆ PrepareFreqMakerForSelection()

virtual void MetLoadFreqScreen::PrepareFreqMakerForSelection ( )
virtual

Hand the selected identity to the FreQ maker.

Slot 41, and slot 47 in the European release. The body resolves the canvas and buttons screens, passes the selected MetPersonaData to MetFreqMakerCanvasScreen::LoadPersona(), selects the editing mode through MetFreqMakerButtonsScreen::SetEditing(), clears MetFreqMakerButtonsScreen::mNewPersona, replaces the game manager's persona list with the selected identity, and records MetLoadFreqScreen in MetFrontEndState::mReturnScreen.

Ghidra address:
NTSC-U/C: 0x00297528
Ghidra address:
PAL: 0x002b5648

Reimplemented from MetLoadFreqBaseScreen.

◆ OnCreateButton()

virtual void MetLoadFreqScreen::OnCreateButton ( )
virtual

Refuse a ninth identity, or create one.

Slot 43. A list that already has eight or more identities is refused. The help screen is exited, and a message screen named freq_limit with one OK response shows the limit and the first card slot's name. A first card slot with fewer free clusters than GlobalSettings::mPersonaMinimumFreeClusters is refused the same way, with the freq_no_space text, the slot name, and that minimum. OnMsgScreenDismissed() restores this screen after either refusal. Otherwise MetFreqCreateScreen is pushed and activated.

The European release is slot 49. It records MetLoadFreqScreen in MetFrontEndState::mReturnScreen and runs the MetLoadFreqBaseScreen body as a direct call. Both refusals are made there.

Ghidra address:
NTSC-U/C: 0x00297c10
Ghidra address:
PAL: 0x002b95a0

Reimplemented from MetLoadFreqBaseScreen.

◆ AcquireIdentityList()

virtual void MetLoadFreqScreen::AcquireIdentityList ( )
virtual

Take the identity list the memory-card path last read.

Slot 44, and slot 51 in the European release.

Ghidra address:
NTSC-U/C: 0x0029bda0
Ghidra address:
PAL: 0x002b9558

Reimplemented from MetLoadFreqBaseScreen.

◆ BuildButtonList()

virtual void MetLoadFreqScreen::BuildButtonList ( )
virtual

Rebuild the button ring with labels on the second and third buttons.

Slot 45, and slot 52 in the European release. The first button takes an empty label, the second the lf_edit label, and the third the lf_create label. The three prompts are the same three the base appends.

Ghidra address:
NTSC-U/C: 0x00296fe8
Ghidra address:
PAL: 0x002b4fe0

Reimplemented from MetLoadFreqBaseScreen.


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