Front end and flow of the whole game, from the start-up screens through a song and back.
More...
|
| enum | State {
kStateFrontEnd = 0
, kStateLoading = 1
, kStatePlaying = 2
, kStateLeaving = 3
,
kStateRestarting = 4
} |
| | Values of mState. More...
|
| enum | Event {
kEventNone = 0
, kEventStartGame = 1
, kEventReturnToFrontEnd = 2
, kEventLeaveGame = 3
,
kEventQuit = 4
} |
| | Values Update() reports. More...
|
| enum | LoadStage {
kLoadStageAlways = 0
, kLoadStageIntro = 1
, kLoadStageIntroAndFrontEnd = 2
, kLoadStageStartFxBanks = 3
,
kLoadStageFxBanks = 4
, kLoadStageArena = 5
, kLoadStageMusic = 6
, kLoadStageMusicBanks = 7
,
kLoadStageDone = 8
} |
| | Values of mLoadStage, the progress of the front end through its loads. More...
|
| enum | DialogType {
kDialogSoloWon = 0
, kDialogSoloLost = 1
, kDialogEndGame = 2
, kDialogPause = 5
,
kDialogNoController = 6
, kDialogTutorialEnd = 7
} |
| | Kinds of dialog ShowDialog() shows over a song. More...
|
| enum | UnlockEvent {
kUnlockEventNone = 0
, kUnlockEventBoss = 1
, kUnlockEventParts = 2
, kUnlockEventSong = 3
,
kUnlockEventSaveFreq = 5
, kUnlockEventSaveSettings = 6
, kUnlockEventFreestyleTip = 7
} |
| | The screens that follow a song, in the order QueueUnlocks() queues them. More...
|
| enum | DialogAction {
kDialogActionNone = 0
, kDialogActionQuit = 1
, kDialogActionPractice = 2
, kDialogActionResume = 3
,
kDialogActionEnd = 4
, kDialogActionContinue = 5
} |
| | Choices a dialog reports to its callback. More...
|
| typedef void(* | DialogCallback) (DialogAction action, void *pUserData) |
| | Routine a dialog reports the player's choice to.
|
|
| | Metagame () |
| | Construct the metagame in kStateFrontEnd with nothing loaded.
|
| | ~Metagame () override |
| | Destroy the metagame.
|
| void | ShowLoadingScreen () |
| | Load one of the four loading screens at random from metagame\loadingd.rnd and draw it.
|
| void | Init () |
| | Read the metagame configuration, start the front end, and register the script commands.
|
| void | Terminate () |
| | Unregister the script commands and release what Init() and the loads created.
|
| int | GetState () const |
| | Report mState.
|
| const char * | SelectedArenaName () |
| | Report the display name of the arena chosen last.
|
| const char * | ArenaName (const char *pszArena) |
| | Report the display name of an arena.
|
| void | EnterFrontEnd () |
| | Enter kStateFrontEnd.
|
| void | EnterLoading () |
| | Enter kStateLoading.
|
| void | EnterPlaying () |
| | Enter kStatePlaying.
|
| void | EnterLeaving () |
| | Enter kStateLeaving.
|
| void | EnterRestarting () |
| | Enter kStateRestarting.
|
| int | Update () |
| | Advance the front end by one frame and report the request it made.
|
| void | ShowBlankScreen () |
| | Show the blank screen unless a dialog is showing.
|
| void | SetHelpText (const char *pszText) |
| | Show a help text on the help panel.
|
| void | SetActionText (const char *pszText) |
| | Show a text of the buttons on the help panel.
|
| void | Draw () |
| | Draw the part of the front end that goes under the world, the arena scene.
|
| void | DrawOverlay () |
| | Draw the part of the front end that goes over the world.
|
| void | ShowUnlockedArenas () |
| | Show the arenas the player has unlocked on the arena scene.
|
| void | RecordCampaignResult () |
| | Record the result of a campaign song in the profile of the first player.
|
| void | QueueUnlocks () |
| | Queue the unlock screens of the items the last song unlocked.
|
| void | ShowDialog (DialogType type, DialogCallback pfnCallback, void *pUserData, int nPad) |
| | Show a dialog over the song and report the player's choice to a callback.
|
| void | ShowDialogToAll (DialogType type, DialogCallback pfnCallback, void *pUserData) |
| | Show a dialog over the song that listens to every controller.
|
| void | ShowEndGameScreens (DialogAction action) |
| | Show the screens that follow a song, from its result to the queued unlocks.
|
| void | AdvanceUnlocks () |
| | Show the next queued unlock screen, or finish the dialog once the queue is empty.
|
| void | SetSongScreenMix (bool bIdle) |
| | Switch the menu music of the song screen to mix 7 over 1920 ticks while no song clip plays, or to mix 9 over 500 ticks before a clip starts.
|
| bool | DispatchPriv (Message *pMsg) override |
| | Handle a message sent to the metagame.
|
| void | SetEvent (int nEvent) |
| | Set the Event that Update() reports next.
|
| Mix * | GetMusic () const |
| float | GetTickMs () const |
| float | GetSpeed () const |
| Gizmo * | GetGizmo () const |
| const char * | GetSelectedArena () const |
| void | SetSelectedArena (const char *pszArena) |
| | Choose an arena.
|
| const NetChatroomInfo & | GetChatroom () const |
| void | SetChatroom (const NetChatroomInfo &chatroom) |
| | Record the chat room this console joined.
|
| int | GetFreqsOnCard () const |
| void | SetFreqsOnCard (int bFreqsOnCard) |
| | Record whether the memory card check found saved Freqs.
|
| int | GetNetScreenPending () const |
| const char * | GetNetScreen () const |
| void | SetDialogAction (DialogAction action) |
| | Record the choice made in the dialog.
|
| void | SetReserved144 (int nValue) |
| | Set the field at +0x144, which is not yet identified.
|
| 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 () |
| virtual bool | Dispatch (Message *pMsg) |
| | Accept a message.
|
| 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.
|
| virtual bool | Dispatch (Message *msg) |
| | Handle a message.
|
Front end and flow of the whole game, from the start-up screens through a song and back.
The RTTI includes the name and records MsgSink as the one base. The vptr sits at offset 0. The one instance is TheMetagame.
The main loop drives it together with WorldMgr. Update() reports what the front end requested, and the main loop answers by moving WorldMgr and calling the matching Enter routine here.
At start-up the metagame walks through the stages of LoadStage. It loads the screen groups, shows the memory card check and the presented-by screen, loads the sound banks, the arena scene, and the menu music, plays the intro movie once the screens reach blank, and then moves the front end to pre_logo, which leads to the title.
Read the metagame configuration, start the front end, and register the script commands.
The screen classes are registered, the screen file is read, and the always group starts loading. The metagame listens to the front end, the controllers, and the keyboard.
- Ghidra address:
- NTSC-U/C: 0x00164650
- Ghidra address:
- PAL: 0x001674f0