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

Screen that picks one of the pre-built FreQ identities. More...

#include <metloadprefabscreen.h>

Inheritance diagram for MetLoadPreFabScreen:
Collaboration diagram for MetLoadPreFabScreen:

Public Member Functions

 MetLoadPreFabScreen (MetRenderer *pRenderer, int nPriority)
 Construct the screen.
virtual ~MetLoadPreFabScreen ()
virtual void EnterAndShow ()
 Select the prompt layout and title, then show the screen.
virtual void OnMsgScreenDismissed (const HxStr &name, int nChoice)
 Return from the FreQ limit dialogue.
virtual void UpdateNameLabel ()
 Show the selected identity's name.
virtual void OnNameButton ()
 Play as the selected identity.
virtual void PrepareFreqMakerForSelection ()
 Hand the selected identity to the FreQ maker.
virtual void OnCreateButton ()
 Create an identity, unless the saved list is full.
virtual void AcquireIdentityList ()
 Offer the saved personas followed by the pre-fab identities.
virtual void BuildButtonList ()
 Build the name, edit, and create buttons and their prompts.
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 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.

Static Public Member Functions

static MetScreen * New (MetRenderer *pRenderer, int nPriority)
 Produce a pre-fab 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 picks one of the pre-built FreQ identities.

Its RTTI descriptor is at 0x008ef4f0. It has MetLoadFreqBaseScreen as its one public non-virtual base at offset 0. The object is 0xb0 bytes and the 47-entry vtable at 0x007f8c28 is the same length as the MetLoadFreqBaseScreen table, and the class declares no new virtual.

The constructor at 0x002a8a58 takes only the renderer and the load priority, runs the MetLoadFreqBaseScreen constructor at 0x00291e00, writes its vptr, and empties the one vector below. The destructor at 0x002ad450 restores the vptr, returns the vector buffer to the pool, runs the MetLoadFreqBaseScreen destructor, and releases the object with the tag MsgSink.

Ten slots differ from the MetLoadFreqBaseScreen table. Apart from the destructor and slot 41, PrepareFreqMakerForSelection(), they are 5 0x002a8aa0, 15 0x002a9b38, 39 0x002a8fe0, 40 0x002a94f0, 43 0x002a9710, 44 0x002a91b8, and 45 0x002a8b80.

Constructor & Destructor Documentation

◆ MetLoadPreFabScreen()

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

Construct the screen.

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

◆ ~MetLoadPreFabScreen()

virtual MetLoadPreFabScreen::~MetLoadPreFabScreen ( )
virtual
Ghidra address:
NTSC-U/C: 0x002ad450
Ghidra address:
PAL: 0x002cbd60

Member Function Documentation

◆ New()

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

Produce a pre-fab 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: 0x002ad3c8
Ghidra address:
PAL: 0x002cbcd8

◆ EnterAndShow()

virtual void MetLoadPreFabScreen::EnterAndShow ( )
virtual

Select the prompt layout and title, then show the screen.

Slot 5. The prompt layout is standard_title and the title pick_char.

Ghidra address:
NTSC-U/C: 0x002a8aa0
Ghidra address:
PAL: 0x002c6f18

Reimplemented from MetLoadFreqBaseScreen.

◆ OnMsgScreenDismissed()

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

Return from the FreQ limit dialogue.

Slot 15. Only the freq_limit dialogue is handled, whichever button closed it. The title is restored, and the help screen and this screen are pushed again.

Parameters
nameThe dialogue name.
nChoiceThe button that closed the dialogue, ignored.
Ghidra address:
NTSC-U/C: 0x002a9b38
Ghidra address:
PAL: 0x002c8270

Reimplemented from MetScreen.

◆ UpdateNameLabel()

virtual void MetLoadPreFabScreen::UpdateNameLabel ( )
virtual

Show the selected identity's name.

Slot 39. The name button shows the name, and the edit button shows pf_edit followed by it. The European release instead formats the name into its pf_edit text.

Ghidra address:
NTSC-U/C: 0x002a8fe0
Ghidra address:
PAL: 0x002c7580

Reimplemented from MetLoadFreqBaseScreen.

◆ OnNameButton()

virtual void MetLoadPreFabScreen::OnNameButton ( )
virtual

Play as the selected identity.

Slot 40. The identity becomes the game manager's only persona, and the left gizmo and mode select screens are pushed. Arriving at the screen in net mode is a fatal error.

Ghidra address:
NTSC-U/C: 0x002a94f0
Ghidra address:
PAL: 0x002c7b08

Reimplemented from MetLoadFreqBaseScreen.

◆ PrepareFreqMakerForSelection()

virtual void MetLoadPreFabScreen::PrepareFreqMakerForSelection ( )
virtual

Hand the selected identity to the FreQ maker.

Slot 41. An index inside MetPersonaData::savedList() is a saved persona and goes to MetFreqMakerCanvasScreen::LoadPersona(), and a later index is a pre-fab and goes to MetFreqMakerCanvasScreen::LoadPrefab() with no randomisation. The editing mode is then selected through MetFreqMakerButtonsScreen::SetEditing(), MetFreqMakerButtonsScreen::mNewPersona is cleared, and MetLoadPreFabScreen is recorded in MetFrontEndState::mReturnScreen.

Ghidra address:
NTSC-U/C: 0x002a9330
Ghidra address:
PAL: 0x002c78e8

Reimplemented from MetLoadFreqBaseScreen.

◆ OnCreateButton()

virtual void MetLoadPreFabScreen::OnCreateButton ( )
virtual

Create an identity, unless the saved list is full.

Slot 43. With eight saved personas the help screen departs and the freq_limit dialogue shows nomem_freq_limit. Otherwise MetLoadPreFabScreen is recorded in MetFrontEndState::mReturnScreen and MetLoadFreqBaseScreen::OnCreateButton() runs. The European release is slot 49, and it runs MetLoadFreqBaseScreen::OpenFreqMakerForCreate() through the vtable instead.

Ghidra address:
NTSC-U/C: 0x002a9710
Ghidra address:
PAL: 0x002c7d88

Reimplemented from MetLoadFreqBaseScreen.

◆ AcquireIdentityList()

virtual void MetLoadPreFabScreen::AcquireIdentityList ( )
virtual

Offer the saved personas followed by the pre-fab identities.

Slot 44. mIdentities is refilled and becomes the identity list.

Ghidra address:
NTSC-U/C: 0x002a91b8
Ghidra address:
PAL: 0x002c7770

Reimplemented from MetLoadFreqBaseScreen.

◆ BuildButtonList()

virtual void MetLoadPreFabScreen::BuildButtonList ( )
virtual

Build the name, edit, and create buttons and their prompts.

Slot 45. The name button has an empty label and the other two read pf_edit and pf_create. The name button is selected.

Ghidra address:
NTSC-U/C: 0x002a8b80
Ghidra address:
PAL: 0x002c7030

Reimplemented from MetLoadFreqBaseScreen.


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