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

Screen that lists the saved FreQs on a memory card, to copy one to the other card or delete one. More...

#include <metmcfreqdelscreen.h>

Inheritance diagram for MetMCFreqDelScreen:
Collaboration diagram for MetMCFreqDelScreen:

Public Member Functions

 MetMCFreqDelScreen (MetRenderer *pRenderer, int nPriority)
 Construct the screen.
virtual ~MetMCFreqDelScreen ()
 Delete the list and every listed persona.
virtual void EnterAndShow ()
 Hide the screen and mark the card's personas as due to load.
virtual void OnPanelActivated ()
 Show the loading notice and query the card, when a load is due.
virtual void OnMsgScreenDismissed (const HxStr &name, int nChoice)
 Act on the player's response to one of the screen's dialogues.
virtual void HandleCommand (const MetScreenCommand *pCommand)
 Scroll the list, back out, or start a copy or a deletion.
virtual void PlaySlideSound (int)
 Play nothing.
virtual void PlayCycleLeftSound (int)
 Play nothing.
virtual void PlayCycleRightSound (int)
 Play nothing.
virtual void OnExitFinished ()
 Confirm a copy or a deletion, or return to MetMemCardTypeScreen, once the screen has exited.
virtual void ResolveContainerViews ()
 Resolve the base views, title the two panels, and resolve the persona detail objects.
virtual void OnConnectState (MemcardConnectState state, int nStatus)
 Load the card's personas, or report that the card could not be read.
virtual void OnPersonasLoaded (int nPortSlot, int nStatus)
 Close the loading notice, report that the card has no FreQ, or report a failed load.
virtual int ProvideText (int nItem, int nColumn, Rnd::Text *pText, int nContext)
 Show the username of one persona of mPersonas.
virtual int ProvideMesh (int nItem, int nColumn, Rnd::Mesh *pMesh, int nContext)
 Leave the cell as it is.
void SetCardSlot (MemcardConnectState slot)
 Record the card the screen works on, and clear mLoadPending.
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 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 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 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 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 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.
Public Member Functions inherited from ListDataProvider
virtual ~ListDataProvider ()

Static Public Member Functions

static MetMCFreqDelScreen * New (MetRenderer *pRenderer, int nPriority)
 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.

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

Screen that lists the saved FreQs on a memory card, to copy one to the other card or delete one.

Its RTTI descriptor is at 0x00901ea0. It has four public non-virtual bases at fixed offsets, MetScreen at +0x00, MemcardUser at +140, ListDataProvider at +144, and MetMemCardPickerUser at +148. New() allocates 0xe8 bytes.

The 39-entry primary vtable is at 0x007fabe0, the same length as the MetScreen table, and the class declares no new virtual. The twenty-one-entry MemcardUser table at 0x007fab30 adjusts this by -140 in every entry, and the four-entry ListDataProvider table at 0x007fab08 by -144. The class emits no vtable for MetMemCardPickerUser and writes no vptr at +0x94.

MetMemCardTypeScreen hands the card over through SetCardSlot(). Activating the screen loads the card's personas, and the list then shows each one's username, face, and birthday. Command 7 offers to copy the selected FreQ to NextCardSlot() through MetPersonaSaverScreen::StartSave(), and command 8 offers to delete it through MetPersonaSaverScreen::StartDelete().

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

Constructor & Destructor Documentation

◆ MetMCFreqDelScreen()

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

Construct the screen.

Supplies mcfl for the screen name, metagame/Shared for the directory, and memcard_freq_load for the container, records the help text del_freq, and clears MetScreen::mShowsLoadedDrawables.

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

◆ ~MetMCFreqDelScreen()

virtual MetMCFreqDelScreen::~MetMCFreqDelScreen ( )
virtual

Delete the list and every listed persona.

Ghidra address:
NTSC-U/C: 0x002beca8
Ghidra address:
PAL: 0x002dea70

Member Function Documentation

◆ New()

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

Build the screen on the heap.

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

◆ EnterAndShow()

virtual void MetMCFreqDelScreen::EnterAndShow ( )
virtual

Hide the screen and mark the card's personas as due to load.

Slot 5.

Ghidra address:
NTSC-U/C: 0x002c5be8
Ghidra address:
PAL: 0x002e6358

Reimplemented from MetScreen.

◆ OnPanelActivated()

virtual void MetMCFreqDelScreen::OnPanelActivated ( )
virtual

Show the loading notice and query the card, when a load is due.

Slot 7.

Ghidra address:
NTSC-U/C: 0x002bf750
Ghidra address:
PAL: 0x002df6a8

Reimplemented from MetScreen.

◆ OnMsgScreenDismissed()

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

Act on the player's response to one of the screen's dialogues.

Slot 15. A confirmed okDelete or okCopy starts the deletion or the copy, and a refusal brings the list back. notifyloadfailed and no_freq_on_card return to MetMemCardTypeScreen. Any other dialogue shows the list.

Parameters
nameThe message screen that was dismissed.
nChoiceThe chosen button, counted from zero.
Ghidra address:
NTSC-U/C: 0x002c0ad8
Ghidra address:
PAL: 0x002e0dc0

Reimplemented from MetScreen.

◆ HandleCommand()

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

Scroll the list, back out, or start a copy or a deletion.

Slot 19. The select command does nothing.

Parameters
pCommandThe command.
Ghidra address:
NTSC-U/C: 0x002bf3a8
Ghidra address:
PAL: 0x002df258

Reimplemented from MetScreen.

◆ PlaySlideSound()

virtual void MetMCFreqDelScreen::PlaySlideSound ( int )
inlinevirtual

Play nothing.

Slot 20. The body is empty.

Ghidra address:
NTSC-U/C: 0x002c5b58
Ghidra address:
PAL: 0x002e62c8

Reimplemented from MetScreen.

◆ PlayCycleLeftSound()

virtual void MetMCFreqDelScreen::PlayCycleLeftSound ( int )
inlinevirtual

Play nothing.

Slot 23. The body is empty.

Ghidra address:
NTSC-U/C: 0x002c5b48
Ghidra address:
PAL: 0x002e62b8

Reimplemented from MetScreen.

◆ PlayCycleRightSound()

virtual void MetMCFreqDelScreen::PlayCycleRightSound ( int )
inlinevirtual

Play nothing.

Slot 24. The body is empty.

Ghidra address:
NTSC-U/C: 0x002c5b50
Ghidra address:
PAL: 0x002e62c0

Reimplemented from MetScreen.

◆ OnExitFinished()

virtual void MetMCFreqDelScreen::OnExitFinished ( )
virtual

Confirm a copy or a deletion, or return to MetMemCardTypeScreen, once the screen has exited.

Slot 36.

Ghidra address:
NTSC-U/C: 0x002c01c0
Ghidra address:
PAL: 0x002e0310

Reimplemented from MetScreen.

◆ ResolveContainerViews()

virtual void MetMCFreqDelScreen::ResolveContainerViews ( )
virtual

Resolve the base views, title the two panels, and resolve the persona detail objects.

Slot 38.

Ghidra address:
NTSC-U/C: 0x002bee90
Ghidra address:
PAL: 0x002dec68

Reimplemented from MetScreen.

◆ OnConnectState()

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

Load the card's personas, or report that the card could not be read.

MemcardUser slot 2.

Parameters
stateThe card that was queried. The body does not read it.
nStatusThe result, 0 when the card is present.
Ghidra address:
NTSC-U/C: 0x002c1d10
Ghidra address:
PAL: 0x002e2310

Reimplemented from MemcardUser.

◆ OnPersonasLoaded()

virtual void MetMCFreqDelScreen::OnPersonasLoaded ( int nPortSlot,
int nStatus )
virtual

Close the loading notice, report that the card has no FreQ, or report a failed load.

MemcardUser slot 13. Statuses 0, 3, and 11 count as loaded, and nothing happens unless a load is due.

Parameters
nPortSlotThe card the personas came from. The body does not read it.
nStatusThe result.
Ghidra address:
NTSC-U/C: 0x002c1510
Ghidra address:
PAL: 0x002e19f8

Reimplemented from MemcardUser.

◆ ProvideText()

virtual int MetMCFreqDelScreen::ProvideText ( int nItem,
int nColumn,
Rnd::Text * pText,
int nContext )
virtual

Show the username of one persona of mPersonas.

An index past the end empties the text instead.

Parameters
nItemThe entry.
nColumnThe cell index. The body does not read it.
pTextThe cell.
nContextThe list context. The body does not read it.
Returns
Always 1.
Ghidra address:
NTSC-U/C: 0x002c5c28
Ghidra address:
PAL: 0x002e6398

Implements ListDataProvider.

◆ ProvideMesh()

virtual int MetMCFreqDelScreen::ProvideMesh ( int nItem,
int nColumn,
Rnd::Mesh * pMesh,
int nContext )
virtual

Leave the cell as it is.

Parameters
nItemThe row. The body does not read it.
nColumnThe cell index. The body does not read it.
pMeshThe cell. The body does not read it.
nContextThe list context. The body does not read it.
Returns
Always 1.
Ghidra address:
NTSC-U/C: 0x002c5b40
Ghidra address:
PAL: 0x002e62b0

Implements ListDataProvider.

◆ SetCardSlot()

void MetMCFreqDelScreen::SetCardSlot ( MemcardConnectState slot)

Record the card the screen works on, and clear mLoadPending.

MetMemCardTypeScreen's slot 36 is the caller. The title is inferred.

Parameters
slotThe card.
Ghidra address:
NTSC-U/C: 0x002c5d10
Ghidra address:
PAL: 0x002e64a0

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