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

Tutorial screen. More...

#include <mettutorialscreen.h>

Inheritance diagram for MetTutorialScreen:
Collaboration diagram for MetTutorialScreen:

Public Member Functions

 MetTutorialScreen (MetRenderer *pRenderer, int nPriority)
 Construct the screen.
virtual ~MetTutorialScreen ()
virtual void EnterAndShow ()
 Push the companion screens on a first entry, select the first button, and enter.
virtual void HandleCommand (const MetScreenCommand *pCommand)
 Route one command to the button ring, the selection, or the exit.
virtual void PlayCycleLeftSound (int nSelector)
 Play no left cycle sound.
virtual void PlayCycleRightSound (int nSelector)
 Play no right cycle sound.
virtual void OnRepeatingSoundFinished (Rnd::Button *pButton)
 Record 2 in MetScreen::mExitChoice, exit the three companion screens, and start this screen's exit animation.
virtual void OnExitFinished ()
 Act on the exit recorded in MetScreen::mExitChoice once the exit animation has finished.
virtual void ResolveContainerViews ()
 Resolve the base views and add the two buttons.
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 MetTutorialScreen * 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

Tutorial screen.

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

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

The constructor at 0x003c7a88 takes only the renderer and the load priority, and supplies tut for the screen name, metagame/Shared for the directory, and tutorial for the container. It allocates the two-button ring and pushes the prompts tut_g and tut_r into MetScreen::mHelpKeys, one per button.

The object is 0x90 bytes, which the allocation in New() fixes.

The destructor is at 0x003cc230.

Apart from the type function and the destructor, the slots that differ from the MetScreen table are 5 0x003c82a0, 19 0x003c7f10, 23 0x003cc198, 24 0x003cc1a0, 30 0x003c84d8, 36 0x003c8678, 38 0x003c7d78.

Constructor & Destructor Documentation

◆ MetTutorialScreen()

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

Construct the screen.

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

◆ ~MetTutorialScreen()

virtual MetTutorialScreen::~MetTutorialScreen ( )
virtual
Ghidra address:
NTSC-U/C: 0x003cc230
Ghidra address:
PAL: 0x00403ac8

Member Function Documentation

◆ New()

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

Build the screen on the heap.

The object is allocated with the tag MsgSink. MetScreen::CreateFrontEndScreens() is the one caller.

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

◆ EnterAndShow()

virtual void MetTutorialScreen::EnterAndShow ( )
virtual

Push the companion screens on a first entry, select the first button, and enter.

Slot 5.

When MetFrontEndState::mPendingTransition is set, the body empties the return screen name, moves the flag into mLastTransition, pushes MetLeftGizmoScreen and MetHelpScreen, and records this screen as the renderer's active panel. Every entry then selects the first button, labels the screen from configuration code 0x269 under tutorial, and posts the selected button's prompt.

Ghidra address:
NTSC-U/C: 0x003c82a0
Ghidra address:
PAL: 0x003ff6e8

Reimplemented from MetScreen.

◆ HandleCommand()

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

Route one command to the button ring, the selection, or the exit.

Slot 19.

Commands 1 and 2 step the ring and post the selected button's prompt. Command 5 clears the prompt and the active panel and starts the selection alternating. Command 6 clears the prompt and the active panel, records 0 in MetScreen::mExitChoice, exits MetScreenTitleScreen and MetLeftGizmoScreen, and starts this screen's exit animation. Every other command is discarded.

Parameters
pCommandThe command to route.
Ghidra address:
NTSC-U/C: 0x003c7f10
Ghidra address:
PAL: 0x003ff2a0

Reimplemented from MetScreen.

◆ PlayCycleLeftSound()

virtual void MetTutorialScreen::PlayCycleLeftSound ( int nSelector)
virtual

Play no left cycle sound.

Slot 23.

Parameters
nSelectorThe controller index, which the body does not read.
Ghidra address:
NTSC-U/C: 0x003cc198
Ghidra address:
PAL: 0x00403a30

Reimplemented from MetScreen.

◆ PlayCycleRightSound()

virtual void MetTutorialScreen::PlayCycleRightSound ( int nSelector)
virtual

Play no right cycle sound.

Slot 24.

Parameters
nSelectorThe controller index, which the body does not read.
Ghidra address:
NTSC-U/C: 0x003cc1a0
Ghidra address:
PAL: 0x00403a38

Reimplemented from MetScreen.

◆ OnRepeatingSoundFinished()

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

Record 2 in MetScreen::mExitChoice, exit the three companion screens, and start this screen's exit animation.

Slot 30.

MetScreen slot 29 runs the slot once the selection has finished alternating. The companion screens are MetLeftGizmoScreen, MetScreenTitleScreen, and MetHelpScreen.

Parameters
pButtonThe button slot 29 finished with, which the body does not read.
Ghidra address:
NTSC-U/C: 0x003c84d8
Ghidra address:
PAL: 0x003ff998

Reimplemented from MetScreen.

◆ OnExitFinished()

virtual void MetTutorialScreen::OnExitFinished ( )
virtual

Act on the exit recorded in MetScreen::mExitChoice once the exit animation has finished.

Slot 36.

After the back command, the body pushes MetLeftGizmoSmallScreen, MetTopLogoScreen, and MetMainScreen and activates the main screen. After a button action, it starts a solo game on the first arena at the easiest difficulty, as the tutorial level in game mode for the first button and as tutorialrmx in jam mode for the second. It hangs a random FreQ maker identity in burn slot 0, makes that identity the one persona, records this screen as MetFrontEndState::mReturnScreen, and pushes and activates MetLoadGameScreen. The European release appends LocalizedAssetSuffix() to the level name.

Ghidra address:
NTSC-U/C: 0x003c8678
Ghidra address:
PAL: 0x003ffb98

Reimplemented from MetScreen.

◆ ResolveContainerViews()

virtual void MetTutorialScreen::ResolveContainerViews ( )
virtual

Resolve the base views and add the two buttons.

Slot 38.

The buttons are tut_01.but and tut_02.but, labelled from configuration code 0x258 under tut_g and tut_r.

Ghidra address:
NTSC-U/C: 0x003c7d78
Ghidra address:
PAL: 0x003ff098

Reimplemented from MetScreen.


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