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

Screen that creates a new FreQ, either from a pre-fab identity or from scratch. More...

#include <metfreqcreatescreen.h>

Inheritance diagram for MetFreqCreateScreen:
Collaboration diagram for MetFreqCreateScreen:

Public Member Functions

 MetFreqCreateScreen (MetRenderer *pRenderer, int nPriority)
 Construct the screen.
virtual ~MetFreqCreateScreen ()
 Delete the button list.
virtual void EnterAndShow ()
 Take the pre-fab list, select the first button, refresh the preview, set the title, bring up the left gizmo, and show the screen.
virtual void HandleCommand (const MetScreenCommand *pCommand)
 Step the buttons or the carousel, start the chosen button's alternation, or back out.
virtual void PlayCycleLeftSound (int nSelector)
 Play the base cycle-left sound while the first button is selected.
virtual void PlayCycleRightSound (int nSelector)
 Play the base cycle-right sound while the first button is selected.
virtual void OnRepeatingSoundFinished (Rnd::Button *pButton)
 Exit forwards once the chosen button's alternation has finished.
virtual void OnExitFinished ()
 Bring up the next screen once this one has exited.
virtual void ResolveContainerViews ()
 Resolve the base views and the two arrows, and add the two buttons with their help texts.
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 OnMsgScreenDismissed (const HxStr &name, int nChoice)
 Act on the choice the user made in a message dialogue.
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 MetFreqCreateScreen * 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 creates a new FreQ, either from a pre-fab identity or from scratch.

Its RTTI descriptor is at 0x00901aa0. It has MetScreen as its one public non-virtual base at offset 0.

The 39-entry primary vtable at 0x007f7808 is the same length as the MetScreen table, and the class declares no new virtual.

New() allocates 0xa4 bytes. The screen shows a carousel of the pre-fab identities beside two buttons, cf_prefab.but and cf_create.but. While the first button is selected, the left and right commands step the carousel and the selected identity is burned into cf_char.mat. Its layout and its behaviour follow MetLoadFreqBaseScreen closely, although it does not derive from that class.

The translation unit spans 0x0029c130 to 0x002a0e30. Besides the members below, it has the type function at 0x002a0a30, per-unit copies of MsgSink routines, and template library emissions.

Apart from the type function and the destructor, the slots that differ from the MetScreen table are 5, 19, 23, 24, 30, 36, and 38.

Constructor & Destructor Documentation

◆ MetFreqCreateScreen()

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

Construct the screen.

Supplies cf for the screen name, metagame/_Solo for the directory, and create_freq for the container, allocates the button list, waits for the FreQ maker assets, and resolves the first persona burn texture.

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

◆ ~MetFreqCreateScreen()

virtual MetFreqCreateScreen::~MetFreqCreateScreen ( )
virtual

Delete the button list.

Ghidra address:
NTSC-U/C: 0x002a0b08
Ghidra address:
PAL: 0x002be8a8

Member Function Documentation

◆ New()

MetFreqCreateScreen * MetFreqCreateScreen::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: 0x002a0a80
Ghidra address:
PAL: 0x002be820

◆ EnterAndShow()

virtual void MetFreqCreateScreen::EnterAndShow ( )
virtual

Take the pre-fab list, select the first button, refresh the preview, set the title, bring up the left gizmo, and show the screen.

Slot 5.

Ghidra address:
NTSC-U/C: 0x0029ccb8
Ghidra address:
PAL: 0x002ba6c0

Reimplemented from MetScreen.

◆ HandleCommand()

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

Step the buttons or the carousel, start the chosen button's alternation, or back out.

Slot 19. The left and right commands step the carousel only while the first button is selected, and each starts its arrow's alternation first.

Parameters
pCommandThe command.
Ghidra address:
NTSC-U/C: 0x0029c7a0
Ghidra address:
PAL: 0x002ba0f0

Reimplemented from MetScreen.

◆ PlayCycleLeftSound()

virtual void MetFreqCreateScreen::PlayCycleLeftSound ( int nSelector)
virtual

Play the base cycle-left sound while the first button is selected.

Slot 23.

Parameters
nSelectorPassed through to MetScreen::PlayCycleLeftSound().
Ghidra address:
NTSC-U/C: 0x002a0b88
Ghidra address:
PAL: 0x002be928

Reimplemented from MetScreen.

◆ PlayCycleRightSound()

virtual void MetFreqCreateScreen::PlayCycleRightSound ( int nSelector)
virtual

Play the base cycle-right sound while the first button is selected.

Slot 24.

Parameters
nSelectorPassed through to MetScreen::PlayCycleRightSound().
Ghidra address:
NTSC-U/C: 0x002a0bb8
Ghidra address:
PAL: 0x002be958

Reimplemented from MetScreen.

◆ OnRepeatingSoundFinished()

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

Exit forwards once the chosen button's alternation has finished.

Slot 30. An arrow's alternation is passed over.

Parameters
pButtonThe button whose alternation finished.
Ghidra address:
NTSC-U/C: 0x0029ce58
Ghidra address:
PAL: 0x002ba8b8

Reimplemented from MetScreen.

◆ OnExitFinished()

virtual void MetFreqCreateScreen::OnExitFinished ( )
virtual

Bring up the next screen once this one has exited.

Slot 36. After a back command MetLoadFreqScreen returns. Otherwise MetFreqCreateScreen is recorded in MetFrontEndState::mReturnScreen, the persona is marked new, the canvas takes the selected pre-fab for the first button or an empty persona for the second, the game manager's persona list is cleared, and the four FreQ maker screens come up with the buttons screen active. The button selection is cleared on both paths. After a back command the European release returns to MetLoadNewFreqScreen instead when the load list is empty.

Ghidra address:
NTSC-U/C: 0x0029cfa0
Ghidra address:
PAL: 0x002baa40

Reimplemented from MetScreen.

◆ ResolveContainerViews()

virtual void MetFreqCreateScreen::ResolveContainerViews ( )
virtual

Resolve the base views and the two arrows, and add the two buttons with their help texts.

Slot 38.

Ghidra address:
NTSC-U/C: 0x0029c330
Ghidra address:
PAL: 0x002b9bb8

Reimplemented from MetScreen.


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