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

Publisher presentation screen shown at start-up. More...

#include <metsonyscreen.h>

Inheritance diagram for MetSonyScreen:
Collaboration diagram for MetSonyScreen:

Public Member Functions

 MetSonyScreen (MetRenderer *pRenderer, int nPriority)
 Construct the screen.
virtual ~MetSonyScreen ()
virtual void OnFadeOutDone ()
 Respond to a MetFade fade out having finished.
virtual void OnFadeInDone ()
 Respond to a MetFade fade in having finished.
virtual void PlaySlideSound (int nSelector)
 Play nothing.
virtual void PlayLeaveSound (int nSelector)
 Play nothing.
virtual void PlayHighSound (int nSelector)
 Play nothing.
virtual void PlayCycleLeftSound (int nSelector)
 Play nothing.
virtual void PlayCycleRightSound (int nSelector)
 Play nothing.
virtual void EnterAndShow ()
 Hide the screen and start the presentation clock.
virtual void UpdateIdle (float flTime)
 Step the fade and time the presentation.
virtual void OnExitFinished ()
 Play the intro movie once and hand the renderer on.
virtual void ResolveContainerViews ()
 Resolve the container objects and hide the screen.
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 HandleCommand (const MetScreenCommand *pCommand)
 Act on a navigation command.
virtual void PlayErrorSound (int nSelector)
 Play the sound that accompanies a rejected input.
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 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.
Public Member Functions inherited from FadeUser
virtual ~FadeUser ()

Static Public Member Functions

static MetSonyScreen * 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

Publisher presentation screen shown at start-up.

Its RTTI descriptor is at 0x008ef560. It has two public non-virtual bases at fixed offsets, MetScreen at +0x00, and FadeUser at +140.

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

The four-entry FadeUser table at 0x0080f1c0 adjusts this by -140 in every entry.

The constructor at 0x003ba0f8 takes only the renderer and the load priority, and supplies sony for the screen name, metagame/Shared for the directory, and sony_pres for the container. It writes +0x8c, which is the FadeUser vptr, clears the four members, and allocates mFade. The European release supplies esony for the screen name and esony_pres followed by LocalizedAssetSuffix() for the container.

The object is 0xa0 bytes, the size New() allocates.

The screen shows the publisher presentation for 480 frames after EnterAndShow(), fades out over 360 frames, and once the fade out has finished waits a further 480 frames and for the arena, the Freq Maker identities, and the end-game gizmo container before fading back in. Slot 36 then plays the intro movie once and hands the renderer on to the rest of the front end.

Apart from the type function and the destructor, the slots that differ from the MetScreen table are 5, 20 through 24, 26, 36, and 38, all declared below.

Constructor & Destructor Documentation

◆ MetSonyScreen()

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

Construct the screen.

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

◆ ~MetSonyScreen()

virtual MetSonyScreen::~MetSonyScreen ( )
virtual
Ghidra address:
NTSC-U/C: 0x003bd7a8
Ghidra address:
PAL: 0x003f24e0

Member Function Documentation

◆ New()

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

Build the screen on the heap.

MetScreen::CreateStartupScreens() registers this factory.

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

◆ OnFadeOutDone()

virtual void MetSonyScreen::OnFadeOutDone ( )
virtual

Respond to a MetFade fade out having finished.

FadeUser slot 2, through the FadeUser table entry that adjusts this by -140.

Ghidra address:
NTSC-U/C: 0x003bd908
Ghidra address:
PAL: 0x003f2640

Implements FadeUser.

◆ OnFadeInDone()

virtual void MetSonyScreen::OnFadeInDone ( )
virtual

Respond to a MetFade fade in having finished.

FadeUser slot 3, through the FadeUser table entry that adjusts this by -140.

Ghidra address:
NTSC-U/C: 0x003bd8b8
Ghidra address:
PAL: 0x003f25f0

Implements FadeUser.

◆ PlaySlideSound()

virtual void MetSonyScreen::PlaySlideSound ( int nSelector)
virtual

Play nothing.

Slot 20.

Parameters
nSelectorNot read.
Ghidra address:
NTSC-U/C: 0x003bd6f8
Ghidra address:
PAL: 0x003f2430

Reimplemented from MetScreen.

◆ PlayLeaveSound()

virtual void MetSonyScreen::PlayLeaveSound ( int nSelector)
virtual

Play nothing.

Slot 21.

Parameters
nSelectorNot read.
Ghidra address:
NTSC-U/C: 0x003bd700
Ghidra address:
PAL: 0x003f2438

Reimplemented from MetScreen.

◆ PlayHighSound()

virtual void MetSonyScreen::PlayHighSound ( int nSelector)
virtual

Play nothing.

Slot 22.

Parameters
nSelectorNot read.
Ghidra address:
NTSC-U/C: 0x003bd708
Ghidra address:
PAL: 0x003f2440

Reimplemented from MetScreen.

◆ PlayCycleLeftSound()

virtual void MetSonyScreen::PlayCycleLeftSound ( int nSelector)
virtual

Play nothing.

Slot 23.

Parameters
nSelectorNot read.
Ghidra address:
NTSC-U/C: 0x003bd710
Ghidra address:
PAL: 0x003f2448

Reimplemented from MetScreen.

◆ PlayCycleRightSound()

virtual void MetSonyScreen::PlayCycleRightSound ( int nSelector)
virtual

Play nothing.

Slot 24.

Parameters
nSelectorNot read.
Ghidra address:
NTSC-U/C: 0x003bd718
Ghidra address:
PAL: 0x003f2450

Reimplemented from MetScreen.

◆ EnterAndShow()

virtual void MetSonyScreen::EnterAndShow ( )
virtual

Hide the screen and start the presentation clock.

Slot 5.

Records mHidden and the renderer's current frame in mEnterTime. The MetScreen body is not run.

Ghidra address:
NTSC-U/C: 0x003bd868
Ghidra address:
PAL: 0x003f25a0

Reimplemented from MetScreen.

◆ UpdateIdle()

virtual void MetSonyScreen::UpdateIdle ( float flTime)
virtual

Step the fade and time the presentation.

Slot 26.

MetFade::Update() runs first. 480 frames after mEnterTime, the clock is cleared and a 360-frame fade out starts, and a still hidden screen is shown. 480 frames after mFadeOutDoneTime, once the arena load reports complete, the Freq Maker identities are loaded, and MetEndGameGizmoScreen reports its container loaded, the clock is cleared and a 360-frame fade in starts. The first time the fade in is due it is skipped once instead, through a flag at 0x006cc138.

Parameters
flTimeThe renderer's current frame.
Ghidra address:
NTSC-U/C: 0x003ba2f0
Ghidra address:
PAL: 0x003eef50

Reimplemented from MetScreen.

◆ OnExitFinished()

virtual void MetSonyScreen::OnExitFinished ( )
virtual

Play the intro movie once and hand the renderer on.

Slot 36.

Runs only while the flag at 0x006cc13c is set, and clears it. When IntroMovieEnabled() reports the movie wanted, the display memory is reset, the movie plays, and the display mode is initialised again. MetFrontEndState's return screen then becomes this screen, and Finish() runs.

Ghidra address:
NTSC-U/C: 0x003ba4c8
Ghidra address:
PAL: 0x003ef148

Reimplemented from MetScreen.

◆ ResolveContainerViews()

virtual void MetSonyScreen::ResolveContainerViews ( )
virtual

Resolve the container objects and hide the screen.

Slot 38.

Ghidra address:
NTSC-U/C: 0x003bd828
Ghidra address:
PAL: 0x003f2560

Reimplemented from MetScreen.


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