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

Screen that assigns the controller buttons. More...

#include <metconfigcontrollerscreen.h>

Inheritance diagram for MetConfigControllerScreen:
Collaboration diagram for MetConfigControllerScreen:

Public Member Functions

 MetConfigControllerScreen (MetRenderer *pRenderer, int nPriority)
 Construct the controller configuration screen.
virtual ~MetConfigControllerScreen ()
virtual void EnterAndShow ()
 Select the first row, show the configured buttons, and enter.
virtual void BeginExit ()
 Hide every button highlight and begin the exit.
virtual void OnMsgScreenDismissed (const HxStr &name, int nChoice)
 Act on a dismissed dialogue.
virtual void HandleCommand (const MetScreenCommand *pCommand)
 Act on a command from the controller this screen configures.
virtual void PlaySlideSound (int nSelector)
 Play the slide sound for this screen's controller only.
virtual void PlayLeaveSound (int nSelector)
 Play the leave sound for this screen's controller only.
virtual void PlayHighSound (int nSelector)
 Play the emphasised-selection sound for this screen's controller only.
virtual void PlayCycleLeftSound (int nSelector)
 Play the cycle-left sound for this screen's controller only.
virtual void PlayCycleRightSound (int nSelector)
 Play the cycle-right sound for this screen's controller only.
virtual void OnEnterFinished ()
 Clear a duplicate of the selected row and highlight its button.
virtual void OnExitFinished ()
 Push the screens that follow this one.
virtual void ResolveContainerViews ()
 Resolve the rows, the two instruction texts, the button meshes, and the value texts.
Public Member Functions inherited from MetScreenMultiSoundBank
 MetScreenMultiSoundBank (MetRenderer *pRenderer, int nPriority, const HxStr &name, const HxStr &directory, const HxStr &file)
 Construct a screen that uses the multiplayer sound bank.
virtual ~MetScreenMultiSoundBank ()
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 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 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 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 MetConfigControllerScreen * 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 mControllerIndex
 Index of the controller this screen configures, from 0.
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

Screen that assigns the controller buttons.

Its RTTI descriptor is at 0x008efbf0. It has two public non-virtual bases at fixed offsets, MetScreenMultiSoundBank at +0x00 and MemcardUser at +140. New() allocates 0xd0 bytes. Its primary 39-entry vtable is at 0x007e9cd8, the same length as the MetScreen table, and the class declares no new virtual. The 21-entry MemcardUser table at 0x007e9c28 adjusts this by -140 in every entry.

The screen lists nine configuration rows, one per action, and each row shows one button code. The codes a through h are square, triangle, circle, cross, L1, L2, R1, and R2, and o marks a row with no button. The two analogue-stick rows show left analog stick or right analog stick instead. A button index is the code less a, with 8 and 9 for the two sticks, which is the index ControllerConfig::SetButton() takes.

Fourteen slots differ from the MetScreenMultiSoundBank table.

The translation unit's static initialiser at 0x002065a0 constructs the three button-name strings the rows compare against.

Constructor & Destructor Documentation

◆ MetConfigControllerScreen()

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

Construct the controller configuration screen.

The screen name is psx, the directory metagame/shared, and the container psx_config. The nine row keys are appended to MetScreen::mHelpKeys, and the names of the ten button meshes and nine value texts are recorded for ResolveContainerViews().

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

◆ ~MetConfigControllerScreen()

virtual MetConfigControllerScreen::~MetConfigControllerScreen ( )
virtual
Ghidra address:
NTSC-U/C: 0x002008e8
Ghidra address:
PAL: 0x00208cb0

Member Function Documentation

◆ New()

MetConfigControllerScreen * MetConfigControllerScreen::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: 0x00206828
Ghidra address:
PAL: 0x0020f6f0

◆ EnterAndShow()

virtual void MetConfigControllerScreen::EnterAndShow ( )
virtual

Select the first row, show the configured buttons, and enter.

The title reads the localised player label, the one-based controller number, and the localised options label. The help screen takes the first row's prompt and the cc_save_back layout when MetFrontEndState::mUsingMemcard is set, otherwise standard_title. The European release instead takes standard_title when MetFrontEndState::mReturnScreen is either solo pause screen, and cc_save_back otherwise.

Ghidra address:
NTSC-U/C: 0x00201478
Ghidra address:
PAL: 0x00209bd0

Reimplemented from MetScreen.

◆ BeginExit()

virtual void MetConfigControllerScreen::BeginExit ( )
virtual

Hide every button highlight and begin the exit.

Ghidra address:
NTSC-U/C: 0x002069a0
Ghidra address:
PAL: 0x0020f868

Reimplemented from MetScreen.

◆ OnMsgScreenDismissed()

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

Act on a dismissed dialogue.

missingconfigvals makes this screen the active panel again. nomemcard records 0 in MetScreen::mExitChoice and begins the exit. The choice is not read.

Parameters
nameThe dialogue name.
nChoiceThe chosen button.
Ghidra address:
NTSC-U/C: 0x00206bb0
Ghidra address:
PAL: 0x0020f9f8

Reimplemented from MetScreen.

◆ HandleCommand()

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

Act on a command from the controller this screen configures.

A command from another pad is ignored. Previous and next clear a duplicate of the row being departed, move along the rows, and post the new row's prompt. Left and right cycle the selected row's button, or swap the two sticks on a stick row. Select stores the rows into GlobalSettings and exits, or shows missingconfigvals when a row has no button. Back exits without storing. Command 7 plays the slide sound and shows the default mapping.

Parameters
pCommandThe command.
Ghidra address:
NTSC-U/C: 0x00200ba8
Ghidra address:
PAL: 0x00208f98

Reimplemented from MetScreen.

◆ PlaySlideSound()

virtual void MetConfigControllerScreen::PlaySlideSound ( int nSelector)
virtual

Play the slide sound for this screen's controller only.

Parameters
nSelectorThe pad index of the command.
Ghidra address:
NTSC-U/C: 0x002068b0
Ghidra address:
PAL: 0x0020f778

Reimplemented from MetScreenMultiSoundBank.

◆ PlayLeaveSound()

virtual void MetConfigControllerScreen::PlayLeaveSound ( int nSelector)
virtual

Play the leave sound for this screen's controller only.

Parameters
nSelectorThe pad index of the command.
Ghidra address:
NTSC-U/C: 0x00206970
Ghidra address:
PAL: 0x0020f838

Reimplemented from MetScreenMultiSoundBank.

◆ PlayHighSound()

virtual void MetConfigControllerScreen::PlayHighSound ( int nSelector)
virtual

Play the emphasised-selection sound for this screen's controller only.

Parameters
nSelectorThe pad index of the command.
Ghidra address:
NTSC-U/C: 0x00206940
Ghidra address:
PAL: 0x0020f808

Reimplemented from MetScreenMultiSoundBank.

◆ PlayCycleLeftSound()

virtual void MetConfigControllerScreen::PlayCycleLeftSound ( int nSelector)
virtual

Play the cycle-left sound for this screen's controller only.

Parameters
nSelectorThe pad index of the command.
Ghidra address:
NTSC-U/C: 0x002068e0
Ghidra address:
PAL: 0x0020f7a8

Reimplemented from MetScreenMultiSoundBank.

◆ PlayCycleRightSound()

virtual void MetConfigControllerScreen::PlayCycleRightSound ( int nSelector)
virtual

Play the cycle-right sound for this screen's controller only.

Parameters
nSelectorThe pad index of the command.
Ghidra address:
NTSC-U/C: 0x00206910
Ghidra address:
PAL: 0x0020f7d8

Reimplemented from MetScreenMultiSoundBank.

◆ OnEnterFinished()

virtual void MetConfigControllerScreen::OnEnterFinished ( )
virtual

Clear a duplicate of the selected row and highlight its button.

Ghidra address:
NTSC-U/C: 0x002069d0
Ghidra address:
PAL: 0x0020f898

Reimplemented from MetScreen.

◆ OnExitFinished()

virtual void MetConfigControllerScreen::OnExitFinished ( )
virtual

Push the screens that follow this one.

Entered from the pause menu, the pause screen recorded in MetFrontEndState::mReturnScreen is pushed and activated again, and the record is cleared. MetFrontEndState::mSettingsDirty becomes 1 when MetFrontEndState::mUsingMemcard is 1 and the exit was not a cancel. Otherwise a cancel returns to MetConfigOptionsButtonsScreen and a store saves the global settings through MetGlobalSettingsSaverScreen.

Ghidra address:
NTSC-U/C: 0x00201790
Ghidra address:
PAL: 0x00209fa0

Reimplemented from MetScreen.

◆ ResolveContainerViews()

virtual void MetConfigControllerScreen::ResolveContainerViews ( )
virtual

Resolve the rows, the two instruction texts, the button meshes, and the value texts.

The instruction texts are not tested for null. The European release also fills the five action labels ahead of the instructions, and after them the two panel titles and the two stick rows' values.

Ghidra address:
NTSC-U/C: 0x001fff40
Ghidra address:
PAL: 0x00207618

Reimplemented from MetScreen.

Member Data Documentation

◆ mControllerIndex

int MetConfigControllerScreen::mControllerIndex

Index of the controller this screen configures, from 0.

The constructor writes 0. MetConfigOptionsButtonsScreen::OnExitFinished() writes its selected row here at 0x00208574 before pushing this screen, and the image has no setter to route that write through. +0xc8


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