wavelength 1.0.0
Loading...
Searching...
No Matches
MetaSongScreen Class Reference

The song menu. More...

#include <metasongscreen.h>

Inheritance diagram for MetaSongScreen:
Collaboration diagram for MetaSongScreen:

Public Member Functions

 ~MetaSongScreen () override=default
 Destroy the object.
 MetaSongScreen (DataArray *pData)
 Construct the screen from its script description.
bool DispatchPriv (Message *pMsg) override
 Route a chosen button, a focus change, the end of the entry, and a controller button, and pass on every other message.
void Poll (float fTime) override
 Advance the screen, the song preview, and the pending exit.
void Exit (UIScreen *pNextScreen, float fTime) override
 End the song preview and defer the exit until the preview went idle.
void Enter (UIScreen *pPrevScreen, float fTime) override
 Fill the song buttons of the chosen arena, focus a song, and show the arena scores.
const char * Title () override
 Report the title of the screen.
SongEntry FindSong (UIComponent *pButton)
 Report the song of a song button, 0<n> being the song n of the chosen arena.
void UpdatePreview (UIComponent *pButton, UIPanel *pPanel)
 Show the details of the song of a button that receives the focus in the s_g_sel_song_band panel.
void ShowPicture (bool bShowPicture)
 Show the band picture or the biography of the song.
void SetUpSongButton (SongEntry *pSong, int nIndex, bool bLocked)
 Fill the button, the score label, and the grade mesh of a song.
bool HandleSelect (UIComponentSelectMsg *pMsg)
 Start the game of the song chosen with the cross button.
bool HandleJoypad (JoypadInputMsg *pMsg)
 Practise the song with the focus with the square button, toggle the picture with the circle button, and go back to the arena menu with the triangle button.
bool HandleFocusChange (UIComponentFocusChangeMsg *pMsg)
 Show the details of the song that receives the focus.
bool HandleTransitionComplete (UITransitionCompleteMsg *pMsg)
 Show the details of the focused song once this screen has entered.
Public Member Functions inherited from FreqScreen
 FreqScreen (DataArray *pData)
 Construct a screen from its script description.
 ~FreqScreen () override
 Destroy the screen.
void Draw () override
 Draw what goes under each panel, then the panels.
virtual void PlayButtonSound (int nButton)
 Play the menu sound of a controller button.
bool HandleSelectStart (UIComponentSelectStartMsg *pMsg)
 Play the sound of the button that chooses a component.
bool HandleTransitionComplete (UITransitionCompleteMsg *pMsg)
 Choose the component the shortcuts section of the metagame configuration lists for the screen.
bool HandleJoypad (JoypadInputMsg *pMsg)
 Pass on a controller button of a controller the players use, and swallow any other.
Public Member Functions inherited from UIScreen
 UIScreen (DataArray *pData)
 Construct a screen from its script description.
 ~UIScreen () override
 Destroy the screen.
bool Dispatch (Message *pMsg) override
 Offer a message to the manager, then handle it here, then pass a navigation message on.
bool DispatchPriv (Message *pMsg) override
 Follow the transition of a pressed button or a chosen component.
virtual void Print (PrnStream &stream)
 Write a description of the screen, its panels, and its transitions.
void ClearTransitions ()
 Empty the transition table.
void AddTransition (const char *pszComponent, int nButton, const char *pszScreen)
 Append an entry to the transition table.
void AddPanel (UIPanel *pPanel)
 Add a panel to the screen.
bool HandleJoypad (JoypadInputMsg *pMsg)
 Follow the transition of a pressed controller button.
bool HandleSelect (UIComponentSelectMsg *pMsg)
 Follow the transition of a component chosen with the cross button.
void SetFocus (UIPanel *pPanel)
 Move the focus to a panel.
UIComponent * FindComponent (const char *pszName)
 Find a component on any of the screen's panels.
Transition * FindTransition (UIComponent *pComponent, bool bFail)
 Find the transition of a component.
Transition * FindTransition (int nButton, bool bFail)
 Find the transition of a controller button.
void Load ()
 Load the panels.
void Unload ()
 Unload the panels.
bool IsLoaded ()
 Report whether every panel has loaded.
const char * GetName () const
const char * GetGroup () const
UIPanel * GetFocusPanel () const
UIScreen * GetNextScreen () const
UIScreen * GetPrevScreen () const
const std::map< const char *, UIPanel *, StrLess > & GetPanels () const
Public Member Functions inherited from MsgSink
void * operator new (size_t nSize)
 Allocate a sink from the pool heaps under the tag "MsgSink".
void operator delete (void *pBlock)
 Return a sink to the pool heaps.
virtual ~MsgSink ()
void * operator new (size_t size)
 Allocate from the main heap under the name MsgSink.
void operator delete (void *mem)
 Return memory to its heap.
virtual ~MsgSink ()
 Destroy the sink.

Static Public Member Functions

static UIScreen * New (DataArray *pData)
 Create a screen from its script description.
Static Public Member Functions inherited from FreqScreen
static UIScreen * New (DataArray *pData)
 Create a screen from its script description.
Static Public Member Functions inherited from UIScreen
static UIScreen * New (DataArray *pData)
 Create a screen from its script description.

Static Public Attributes

static constexpr int kNumSongButtons = 6
 The number of song buttons in the s_g_sel_song_band panel.

Additional Inherited Members

Public Attributes inherited from FreqScreen
Vector3 mGizmoOrig
Quat mGizmoRot
Protected Attributes inherited from UIScreen
const char * mName
const char * mGroup
std::map< const char *, UIPanel *, StrLess > mPanels
UIPanel * mFocusPanel
std::vector< Transition > mTransitions
UIScreen * mPrevScreen
UIScreen * mNextScreen
int mForceEntryExit

Detailed Description

The song menu.

It lists the songs of the chosen arena and starts the game of a song.

The RTTI records the class as deriving from FreqScreen. The object is 0xc0 bytes and its vtable is at 0x003ceb40. The metagame registers the class for the screen type meta_song_screen, and the front-end description's s_g_sel_song screen is one. The s_g_sel_song_band panel has the six song buttons 01 to 06, each with the label hi_<nn> of its best score, and the s_g_sel_song_pic panel shows the picture, the biography, and the clip of the song with the focus.

Exit() waits for the song preview to fade before the exit starts. The destructor at 0x0035dd20 is compiler-generated and has no declaration here.

Constructor & Destructor Documentation

◆ ~MetaSongScreen()

MetaSongScreen::~MetaSongScreen ( )
overridedefault

Destroy the object.

Ghidra address:
NTSC-U/C: 0x0035dd20
Ghidra address:
PAL: 0x003cbdf8

◆ MetaSongScreen()

MetaSongScreen::MetaSongScreen ( DataArray * pData)
explicit

Construct the screen from its script description.

Parameters
pDataThe script description.
Ghidra address:
NTSC-U/C: 0x00192690
Ghidra address:
PAL: 0x001999a8

Member Function Documentation

◆ New()

UIScreen * MetaSongScreen::New ( DataArray * pData)
inlinestatic

Create a screen from its script description.

The metagame registers the routine for the entry type meta_song_screen.

Parameters
pDataThe script description.
Returns
The new screen.
Ghidra address:
NTSC-U/C: 0x0035ddd8
Ghidra address:
PAL: 0x003cbeb8

◆ DispatchPriv()

bool MetaSongScreen::DispatchPriv ( Message * pMsg)
overridevirtual

Route a chosen button, a focus change, the end of the entry, and a controller button, and pass on every other message.

Parameters
pMsgThe message.
Returns
Whether the message was handled.
Ghidra address:
NTSC-U/C: 0x00193cd8
Ghidra address:
PAL: 0x0019b0e0

Reimplemented from FreqScreen.

◆ Poll()

void MetaSongScreen::Poll ( float fTime)
overridevirtual

Advance the screen, the song preview, and the pending exit.

A pending exit starts 100 milliseconds after the preview went idle. Otherwise a chosen clip starts once the picture of its band is placed, and the idle mix of the menu music starts three seconds after the preview went idle with no clip chosen.

Parameters
fTimeThe front-end time in milliseconds.
Ghidra address:
NTSC-U/C: 0x00192728
Ghidra address:
PAL: 0x00199a48

Reimplemented from UIScreen.

◆ Exit()

void MetaSongScreen::Exit ( UIScreen * pNextScreen,
float fTime )
overridevirtual

End the song preview and defer the exit until the preview went idle.

The menu music returns unless a song was chosen to play.

Parameters
pNextScreenThe screen to change to.
fTimeThe front-end time in milliseconds.
Ghidra address:
NTSC-U/C: 0x00194508

Reimplemented from FreqScreen.

◆ Enter()

void MetaSongScreen::Enter ( UIScreen * pPrevScreen,
float fTime )
overridevirtual

Fill the song buttons of the chosen arena, focus a song, and show the arena scores.

The focus rests on the first unlocked song the first player has not finished, or on 01. Buttons past the last song are disabled and hidden. A solo game outside the Tutorial arena shows the arena score and the score to beat.

Parameters
pPrevScreenThe screen this one replaces, or null.
fTimeThe front-end time in milliseconds.
Ghidra address:
NTSC-U/C: 0x00193da8
Ghidra address:
PAL: 0x0019b1b0

Reimplemented from FreqScreen.

◆ Title()

const char * MetaSongScreen::Title ( )
overridevirtual

Report the title of the screen.

The tutorial has the title training_select_TITLE. Otherwise the localised title receives the mode, the difficulty, and the arena.

Returns
The title.
Ghidra address:
NTSC-U/C: 0x00192a00
Ghidra address:
PAL: 0x00199d30

Reimplemented from FreqScreen.

◆ FindSong()

SongEntry MetaSongScreen::FindSong ( UIComponent * pButton)

Report the song of a song button, 0<n> being the song n of the chosen arena.

Parameters
pButtonThe button.
Returns
The song, or an entry with no data when the button names no song.
Ghidra address:
NTSC-U/C: 0x00192ac8
Ghidra address:
PAL: 0x00199df8

◆ UpdatePreview()

void MetaSongScreen::UpdatePreview ( UIComponent * pButton,
UIPanel * pPanel )

Show the details of the song of a button that receives the focus in the s_g_sel_song_band panel.

The biography, genre, and status texts, the band picture, the preview clip, the help texts, and the score label of the button are updated. A locked song shows why it is locked.

Parameters
pButtonThe button, or null.
pPanelThe panel of the button.
Ghidra address:
NTSC-U/C: 0x00192c88
Ghidra address:
PAL: 0x00199fb8

◆ ShowPicture()

void MetaSongScreen::ShowPicture ( bool bShowPicture)

Show the band picture or the biography of the song.

The two labels of the s_g_sel_song_pic panel swap to name the view that is not shown.

Parameters
bShowPictureWhether the picture shows rather than the biography.
Ghidra address:
NTSC-U/C: 0x00193510
Ghidra address:
PAL: 0x0019a918

◆ SetUpSongButton()

void MetaSongScreen::SetUpSongButton ( SongEntry * pSong,
int nIndex,
bool bLocked )

Fill the button, the score label, and the grade mesh of a song.

A song the first player finished in a solo game shows its best score and its grade. A locked song shows why it is locked.

Parameters
pSongThe song.
nIndexThe index of the song, from 0.
bLockedWhether the song is locked.
Ghidra address:
NTSC-U/C: 0x001937c8
Ghidra address:
PAL: 0x0019abd0

◆ HandleSelect()

bool MetaSongScreen::HandleSelect ( UIComponentSelectMsg * pMsg)

Start the game of the song chosen with the cross button.

A song of type 4 plays the tutorial with no arena. Any other song plays a game. A solo game then shows the tip of a power-up the player unlocked, or changes to pre_launchpad2launchseq, or to pre_solotut2launchseq for the tutorial. A game of other players changes to pre_multi2launchseq. A locked song is not started.

Parameters
pMsgThe message.
Returns
True while the exit is pending, otherwise the result of UIScreen::HandleSelect().
Ghidra address:
NTSC-U/C: 0x00194568
Ghidra address:
PAL: 0x0019b910

◆ HandleJoypad()

bool MetaSongScreen::HandleJoypad ( JoypadInputMsg * pMsg)

Practise the song with the focus with the square button, toggle the picture with the circle button, and go back to the arena menu with the triangle button.

Practice is open to a solo game only, and not to a locked song or the tutorial.

Parameters
pMsgThe message of the button.
Returns
True while the screen changes, otherwise the result of FreqScreen::HandleJoypad().
Ghidra address:
NTSC-U/C: 0x001947a0
Ghidra address:
PAL: 0x0019bb38

◆ HandleFocusChange()

bool MetaSongScreen::HandleFocusChange ( UIComponentFocusChangeMsg * pMsg)

Show the details of the song that receives the focus.

Parameters
pMsgThe message.
Returns
False.
Ghidra address:
NTSC-U/C: 0x00194b00
Ghidra address:
PAL: 0x0019bed0

◆ HandleTransitionComplete()

bool MetaSongScreen::HandleTransitionComplete ( UITransitionCompleteMsg * pMsg)

Show the details of the focused song once this screen has entered.

Parameters
pMsgThe message.
Returns
False.
Ghidra address:
NTSC-U/C: 0x00194b28
Ghidra address:
PAL: 0x0019bef8

Member Data Documentation

◆ kNumSongButtons

int MetaSongScreen::kNumSongButtons = 6
staticconstexpr

The number of song buttons in the s_g_sel_song_band panel.


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