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

Button row of the FreQ maker. More...

#include <metfreqmakerbuttonsscreen.h>

Inheritance diagram for MetFreqMakerButtonsScreen:
Collaboration diagram for MetFreqMakerButtonsScreen:

Public Member Functions

 MetFreqMakerButtonsScreen (MetRenderer *pRenderer, int nPriority)
 Construct the screen.
virtual ~MetFreqMakerButtonsScreen ()
 Delete the button list.
virtual void EnterAndShow ()
 Select the first button, title the row for creating or editing, label the save button, and show the screen.
virtual int PollContainerLoad ()
 Report the container load finished once the FreQ maker assets and the directions and inventory containers are resident as well.
virtual void OnPanelActivated ()
 Enable the row again and show the page and directions of the selected button.
virtual void OnMsgScreenDismissed (const HxStr &name, int nChoice)
 Act on the save-before-leaving dialogue.
virtual void HandleCommand (const MetScreenCommand *pCommand)
 Step the selection, act on the selected button, or exit the FreQ maker.
virtual void PlayCycleLeftSound (int nSelector)
 Play nothing.
virtual void PlayCycleRightSound (int nSelector)
 Play nothing.
virtual void OnRepeatingSoundFinished (Rnd::Button *pButton)
 Hand the controls to the inventory once the chosen button's alternation has finished.
virtual void OnEnterFinished ()
 Show the page and directions of the selected button.
virtual void OnExitFinished ()
 Take the action recorded on the way out, once the screen has exited.
virtual void ResolveContainerViews ()
 Resolve the base views and add the nine buttons with their labels.
virtual void OnKeyboardTextEntered (const HxStr &text)
 Take the name the keyboard screen committed.
void SetEditing (int nEditing)
 Choose between editing an existing persona and creating a new one.
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 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 MetKBUser
virtual ~MetKBUser ()

Static Public Member Functions

static MetFreqMakerButtonsScreen * 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.

Public Attributes

int mNewPersona
 Non-zero while the persona under edit has not been saved before.
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.

Additional Inherited Members

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

Button row of the FreQ maker.

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

The 39-entry primary vtable at 0x007f1560 is the same length as the MetScreen table, and the class declares no new virtual. The three-entry MetKBUser table at 0x007f1540 adjusts this by -140 in every entry.

New() allocates 0xa0 bytes. The row lists nine buttons, randomise, the five part pages, edit, name, and save, and drives the canvas, directions, and inventory screens of the FreQ maker. The load-identity screens choose between editing an existing persona and creating a new one through SetEditing() and mNewPersona before they bring the row up.

The translation unit spans 0x00257968 to 0x0025e5a8. Besides the members below, it has the type function at 0x0025dfe8, per-unit copies of MsgSink and MetKBUser routines, and template library emissions.

Apart from the type function and the destructor, the slots that differ from the MetScreen table are 5, 7, 14, 15, 19, 23, 24, 30, 33, 36, and 38, and MetKBUser slot 2.

Constructor & Destructor Documentation

◆ MetFreqMakerButtonsScreen()

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

Construct the screen.

Supplies fm_buttons for the screen name, metagame/persona for the directory, and freq_maker_buttons for the container, allocates the button list, and starts in the edit mode with no pending action.

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

◆ ~MetFreqMakerButtonsScreen()

virtual MetFreqMakerButtonsScreen::~MetFreqMakerButtonsScreen ( )
virtual

Delete the button list.

Ghidra address:
NTSC-U/C: 0x0025e108
Ghidra address:
PAL: 0x00274358

Member Function Documentation

◆ New()

MetFreqMakerButtonsScreen * MetFreqMakerButtonsScreen::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: 0x0025e080
Ghidra address:
PAL: 0x002742d0

◆ EnterAndShow()

virtual void MetFreqMakerButtonsScreen::EnterAndShow ( )
virtual

Select the first button, title the row for creating or editing, label the save button, and show the screen.

Slot 5. The save button reads SAVE when MetFrontEndState::mUsingMemcard is set and DONE otherwise.

Ghidra address:
NTSC-U/C: 0x00258c80
Ghidra address:
PAL: 0x0026e8b8

Reimplemented from MetScreen.

◆ PollContainerLoad()

virtual int MetFreqMakerButtonsScreen::PollContainerLoad ( )
virtual

Report the container load finished once the FreQ maker assets and the directions and inventory containers are resident as well.

Slot 14. Every poll runs, and MetScreen::PollContainerLoad() runs a second time when all of them have finished.

Returns
Non-zero once every load has finished.
Ghidra address:
NTSC-U/C: 0x00259fa0
Ghidra address:
PAL: 0x0026ffc0

Reimplemented from MetScreen.

◆ OnPanelActivated()

virtual void MetFreqMakerButtonsScreen::OnPanelActivated ( )
virtual

Enable the row again and show the page and directions of the selected button.

Slot 7. Every button returns to state 0 and the selected button takes state 1.

Ghidra address:
NTSC-U/C: 0x0025e1e0
Ghidra address:
PAL: 0x00274430

Reimplemented from MetScreen.

◆ OnMsgScreenDismissed()

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

Act on the save-before-leaving dialogue.

Slot 15. Only check_if_changed is handled. YES commits the persona on the canvas and saves it, returning to the screen MetFrontEndState::mReturnScreen records and the help screen. NO brings back those two screens without saving. The European release saves towards the mode, left gizmo, and help screens instead.

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

Reimplemented from MetScreen.

◆ HandleCommand()

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

Step the selection, act on the selected button, or exit the FreQ maker.

Slot 19. The two ring steps move the selection and show its page and directions. Select opens the keyboard for the name button, commits the persona and exits for the save button, randomises or mutates for the randomise button, and otherwise starts the chosen button's alternation. Back exits without saving.

Parameters
pCommandThe command.
Ghidra address:
NTSC-U/C: 0x002581c8
Ghidra address:
PAL: 0x0026db18

Reimplemented from MetScreen.

◆ PlayCycleLeftSound()

virtual void MetFreqMakerButtonsScreen::PlayCycleLeftSound ( int nSelector)
virtual

Play nothing.

Slot 23. The body is empty.

Parameters
nSelectorThe value the override compares against its own recorded selector.
Ghidra address:
NTSC-U/C: 0x0025e070
Ghidra address:
PAL: 0x002742c0

Reimplemented from MetScreen.

◆ PlayCycleRightSound()

virtual void MetFreqMakerButtonsScreen::PlayCycleRightSound ( int nSelector)
virtual

Play nothing.

Slot 24. The body is empty.

Parameters
nSelectorThe value the override compares against its own recorded selector.
Ghidra address:
NTSC-U/C: 0x0025e078
Ghidra address:
PAL: 0x002742c8

Reimplemented from MetScreen.

◆ OnRepeatingSoundFinished()

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

Hand the controls to the inventory once the chosen button's alternation has finished.

Slot 30. The inventory becomes the active panel, every button is disabled, and the chosen button stays in its pressed state.

Parameters
pButtonThe button whose alternation finished, which is not read.
Ghidra address:
NTSC-U/C: 0x00258f40
Ghidra address:
PAL: 0x0026ebf8

Reimplemented from MetScreen.

◆ OnEnterFinished()

virtual void MetFreqMakerButtonsScreen::OnEnterFinished ( )
virtual

Show the page and directions of the selected button.

Slot 33.

Ghidra address:
NTSC-U/C: 0x0025e1a0
Ghidra address:
PAL: 0x002743f0

Reimplemented from MetScreen.

◆ OnExitFinished()

virtual void MetFreqMakerButtonsScreen::OnExitFinished ( )
virtual

Take the action recorded on the way out, once the screen has exited.

Slot 36. The inventory pages are hidden first. After the save button the persona is saved and the mode screen, or the network portal in a network game, follows. After a back command the save-before-leaving dialogue is raised when a save is possible and the canvas is modified, and otherwise the screen MetFrontEndState::mReturnScreen records returns. The European release identifies the card slot of a save through FirstCardSlotName() and formats the dialogue text from the current language.

Ghidra address:
NTSC-U/C: 0x00259040
Ghidra address:
PAL: 0x0026ed18

Reimplemented from MetScreen.

◆ ResolveContainerViews()

virtual void MetFreqMakerButtonsScreen::ResolveContainerViews ( )
virtual

Resolve the base views and add the nine buttons with their labels.

Slot 38.

Ghidra address:
NTSC-U/C: 0x00257b70
Ghidra address:
PAL: 0x0026d320

Reimplemented from MetScreen.

◆ OnKeyboardTextEntered()

virtual void MetFreqMakerButtonsScreen::OnKeyboardTextEntered ( const HxStr & text)
virtual

Take the name the keyboard screen committed.

MetKBUser slot 2. A non-empty name goes to MetFreqMakerCanvasScreen::SetFreqName(), and this screen becomes the active panel again. An empty name does nothing.

Parameters
textThe name.
Ghidra address:
NTSC-U/C: 0x0025a108
Ghidra address:
PAL: 0x00270168

Implements MetKBUser.

◆ SetEditing()

void MetFreqMakerButtonsScreen::SetEditing ( int nEditing)

Choose between editing an existing persona and creating a new one.

Once the container is resident the randomise button is relabelled at once. The load-identity screens and MetLoadPreFabScreen call it before bringing the row up. The title is inferred.

Parameters
nEditing1 to edit, 0 to create.
Ghidra address:
NTSC-U/C: 0x0025e288
Ghidra address:
PAL: 0x002744d8

Member Data Documentation

◆ mNewPersona

int MetFreqMakerButtonsScreen::mNewPersona

Non-zero while the persona under edit has not been saved before.

MetLoadFreqBaseScreen sets it when creating and clears it when editing, and the save path passes it to MetPersonaSaverScreen::StartSave(). +0x98


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