resonance 1.0.1
Loading...
Searching...
No Matches
metloadgamescreen.h
Go to the documentation of this file.
1#pragma once
2
3#include "met/fadeuser.h"
4#include "met/metfade.h"
5#include "met/metscreen.h"
6
7namespace Rnd {
8class Text;
9} // namespace Rnd
10
42class MetLoadGameScreen : public MetScreen, public FadeUser {
43public:
52 MetLoadGameScreen(MetRenderer *pRenderer, int nPriority);
53
59
69 static MetScreen *New(MetRenderer *pRenderer, int nPriority);
70
80 virtual void EnterAndShow();
81
94 virtual void UpdateIdle(float flTime);
95
105 virtual void OnEnterFinished();
106
115 virtual void ResolveContainerViews();
116
127 virtual void AssignBurnSlots();
128
139 virtual void OnFadeInDone();
140
149 virtual void OnFadeOutDone();
150
160 virtual void PlaySlideSound(int) {
161 }
162
169 virtual void PlayLeaveSound(int) {
170 }
171
178 virtual void PlayHighSound(int) {
179 }
180
187 virtual void PlayCycleLeftSound(int) {
188 }
189
196 virtual void PlayCycleRightSound(int) {
197 }
198
199private:
208 void LoadNetLevel();
209
216 void LoadGameLevel();
217
224 void LoadTutorialLevel();
225
226 // NTSC-U/C: 0x0028d590, PAL: 0x002a9270
227 // Show the loading captions and start the enter animation. Outside a jukebox session,
228 // `loading.txt` shows `load_loading` and the event text shows `load_demo`, `load_tut`,
229 // `load_remix`, or `load_game` for an attract run, the tutorial, jam mode, or anything else.
230 // The win sequence is armed for a solo game on its last remaining level, and slot 39 runs. In a
231 // jukebox session the European release first logs the mode. A jukebox session that returns to
232 // `MetJukeboxEditPlaylistScreenDone` clears the return screen and shows `load_loading` and
233 // `load_jukebox`, and any other jukebox session blanks both texts. The name is inferred from
234 // the European release's log message.
235 void LLEnter();
236
237 // `event.txt`, which slot 38 resolves. Not written by the constructor. +0x90
238 Rnd::Text *mpEvent;
239 // Set while slot 26 polls the level load. +0x94
240 int mPolling;
241 // Set while slot 26 waits for mDeadlineNs. +0x98
242 int mWaiting;
243
244public:
253
254private:
255 // The watchdog time slot 26 waits for, in nanoseconds. +0xa0
256 long long mDeadlineNs;
257 // The fade driver, built from the renderer. +0xa8
258 MetFade *mFade;
259};
Mix-in for an object that takes part in a screen fade.
Definition fadeuser.h:28
Driver of the full-screen metagame fade.
Definition metfade.h:29
virtual void UpdateIdle(float flTime)
Wait for the music to fade, then load the level and fade in.
MetLoadGameScreen(MetRenderer *pRenderer, int nPriority)
Construct the screen.
virtual void OnEnterFinished()
Start fading the music and arm the wait.
virtual void EnterAndShow()
Show the loading captions and start the enter animation.
virtual ~MetLoadGameScreen()
virtual void PlayCycleRightSound(int)
Silence the cycle-right sound.
Definition metloadgamescreen.h:196
virtual void PlayLeaveSound(int)
Silence the leave sound.
Definition metloadgamescreen.h:169
virtual void AssignBurnSlots()
Assign the burn slots of the players about to play.
virtual void PlayHighSound(int)
Silence the high sound.
Definition metloadgamescreen.h:178
virtual void OnFadeOutDone()
Do nothing in the North American release, and run LLEnter() in the European release.
virtual void ResolveContainerViews()
Resolve event.txt into mpEvent.
static MetScreen * New(MetRenderer *pRenderer, int nPriority)
Produce a load screen on the heap.
virtual void PlaySlideSound(int)
Silence the slide sound.
Definition metloadgamescreen.h:160
int mDemoPlayback
Set while the screen loads the attract-mode demo rather than a played level.
Definition metloadgamescreen.h:252
virtual void PlayCycleLeftSound(int)
Silence the cycle-left sound.
Definition metloadgamescreen.h:187
virtual void OnFadeInDone()
Start the game once the fade out has finished.
Front-end renderer that owns the screen stack and drives every MetScreen.
Definition metrenderer.h:68
MetScreen(MetRenderer *pRenderer, int nPriority, const HxStr &name, const HxStr &directory, const HxStr &file)
Construct a screen and start its container load.
Run of text drawn as a quad per glyph.
Definition text.h:57
The rendering engine.
Definition animhelper.h:3