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

Title bar shown above another screen. More...

#include <metscreentitlescreen.h>

Inheritance diagram for MetScreenTitleScreen:
Collaboration diagram for MetScreenTitleScreen:

Public Member Functions

 MetScreenTitleScreen (MetRenderer *pRenderer, int nPriority)
 Construct the screen.
virtual ~MetScreenTitleScreen ()
virtual void EnterAndShow ()
 Show the recorded title and then the screen.
virtual void BeginExit ()
 Start the exit.
virtual void OnEnterFinished ()
 Do nothing.
virtual void OnExitFinished ()
 Do nothing.
virtual void ResolveContainerViews ()
 Resolve the title text fst_title.txt into mTitleText.
void ApplyTitle (const HxStr &title)
 Record one title and push this screen.
void ReplaceTitleText (const HxStr &title)
 Record one title and set it on the title text.
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 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 HandleCommand (const MetScreenCommand *pCommand)
 Act on a navigation command.
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 PlayCycleLeftSound (int nSelector)
 Play the sound that accompanies cycling a value to the left.
virtual void PlayCycleRightSound (int nSelector)
 Play the sound that accompanies cycling a value to the right.
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.

Static Public Member Functions

static MetScreenTitleScreen * New (MetRenderer *pRenderer, int nPriority)
 Allocate and construct the screen.
static void SetTitle (const HxStr &title)
 Replace the shared screen title.
static void ReplaceTitle (const HxStr &title)
 Replace the shared screen title without showing the panel again.
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

Title bar shown above another screen.

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

The 39-entry primary vtable is at 0x0080bc40, the same length as the MetScreen table, so the class declares no virtual of its own.

The constructor at 0x00390e10 takes only the renderer and the load priority, and supplies fst for the screen name, metagame/shared for the directory, and screen_title for the container. It starts mTitle empty. The factory's 0x98-byte allocation fixes the size.

Apart from the type function and the destructor, the slots that differ from the MetScreen table are 5, 9, 33, 36, and 38, all declared below.

Constructor & Destructor Documentation

◆ MetScreenTitleScreen()

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

Construct the screen.

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

◆ ~MetScreenTitleScreen()

virtual MetScreenTitleScreen::~MetScreenTitleScreen ( )
virtual
Ghidra address:
NTSC-U/C: 0x00393fa0
Ghidra address:
PAL: 0x003c5a18

Member Function Documentation

◆ New()

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

Allocate and construct the screen.

The 0x98-byte allocation is billed to the tag MsgSink.

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

◆ EnterAndShow()

virtual void MetScreenTitleScreen::EnterAndShow ( )
virtual

Show the recorded title and then the screen.

Slot 5.

Ghidra address:
NTSC-U/C: 0x003940b8
Ghidra address:
PAL: 0x003c5b60

Reimplemented from MetScreen.

◆ BeginExit()

virtual void MetScreenTitleScreen::BeginExit ( )
virtual

Start the exit.

Slot 9.

The override runs MetScreen::BeginExit() and nothing else.

Ghidra address:
NTSC-U/C: 0x00394108
Ghidra address:
PAL: 0x003c5bb0

Reimplemented from MetScreen.

◆ OnEnterFinished()

virtual void MetScreenTitleScreen::OnEnterFinished ( )
virtual

Do nothing.

Slot 33.

Ghidra address:
NTSC-U/C: 0x00394100
Ghidra address:
PAL: 0x003c5ba8

Reimplemented from MetScreen.

◆ OnExitFinished()

virtual void MetScreenTitleScreen::OnExitFinished ( )
virtual

Do nothing.

Slot 36.

Ghidra address:
NTSC-U/C: 0x00394128
Ghidra address:
PAL: 0x003c5bd0

Reimplemented from MetScreen.

◆ ResolveContainerViews()

virtual void MetScreenTitleScreen::ResolveContainerViews ( )
virtual

Resolve the title text fst_title.txt into mTitleText.

Slot 38.

Runs the MetScreen slot 38 body first.

Ghidra address:
NTSC-U/C: 0x00390f88
Ghidra address:
PAL: 0x003c2ae8

Reimplemented from MetScreen.

◆ SetTitle()

void MetScreenTitleScreen::SetTitle ( const HxStr & title)
static

Replace the shared screen title.

The routine resolves the screen registered under the literal MetScreenTitleScreen, casts it to this class, and forwards to ApplyTitle(). The result is not tested for null. It is a static member rather than a free function, because it takes no receiver and vends exactly one class.

Parameters
titleThe title to display.
Ghidra address:
NTSC-U/C: 0x00393e00
Ghidra address:
PAL: 0x003c2728

◆ ApplyTitle()

void MetScreenTitleScreen::ApplyTitle ( const HxStr & title)

Record one title and push this screen.

The title is copied to mTitle and the screen registered as MetScreenTitleScreen is pushed, which shows it through EnterAndShow(). SetTitle() is the one caller.

Parameters
titleThe title to display.
Ghidra address:
NTSC-U/C: 0x00394010
Ghidra address:
PAL: 0x003c5a98

◆ ReplaceTitle()

void MetScreenTitleScreen::ReplaceTitle ( const HxStr & title)
static

Replace the shared screen title without showing the panel again.

The same lookup and cast as SetTitle(), forwarding to ReplaceTitleText() instead. MetRemixLoadScreen calls it when the button ring changes the catalogue. The name is inferred.

Parameters
titleThe title to display.
Ghidra address:
NTSC-U/C: 0x00393ed0
Ghidra address:
PAL: 0x003c2818

◆ ReplaceTitleText()

void MetScreenTitleScreen::ReplaceTitleText ( const HxStr & title)

Record one title and set it on the title text.

The title is copied to mTitle and set on mTitleText. Unlike ApplyTitle(), the screen is not pushed again. The name is inferred.

Parameters
titleThe title to display.
Ghidra address:
NTSC-U/C: 0x00394130
Ghidra address:
PAL: 0x003c5bd8

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