resonance 1.0.1
Loading...
Searching...
No Matches
metlogoscreen.h
Go to the documentation of this file.
1#pragma once
2
3#include <vector>
4
5#ifdef VIDEO_STANDARD_PAL
6#include "met/fadeuser.h"
7#include "met/metfade.h"
8#endif
9#include "met/metscreen.h"
10
11class Message;
12
13namespace Rnd {
14class Text;
15class View;
16} // namespace Rnd
17
45#ifdef VIDEO_STANDARD_PAL
46class MetLogoScreen : public MetScreen, public FadeUser {
47#else
48class MetLogoScreen : public MetScreen {
49#endif
50public:
63 MetLogoScreen(MetRenderer *pRenderer, int nPriority);
64
71 virtual ~MetLogoScreen();
72
84 static MetLogoScreen *New(MetRenderer *pRenderer, int nPriority);
85
94 virtual void EnterAndShow();
95
106 virtual void HandleCommand(const MetScreenCommand *pCommand);
107
116 virtual void PlaySlideSound(int) {
117 }
118
127 virtual void PlayLeaveSound(int) {
128 }
129
138 virtual void PlayHighSound(int) {
139 }
140
149 virtual void PlayCycleLeftSound(int) {
150 }
151
160 virtual void PlayCycleRightSound(int) {
161 }
162
174 virtual void UpdateIdle(float flTime);
175
185 virtual void UpdateIdleAnimation(float flTime);
186
197 virtual void OnEnterFinished();
198
210 virtual void OnExitFinished();
211
223 virtual void ResolveContainerViews();
224
225protected:
236 virtual void DispatchPriv(Message *pMsg);
237
238#ifdef VIDEO_STANDARD_PAL
246 virtual void OnFadeOutDone() {
247 }
248
256 virtual void OnFadeInDone();
257#endif
258
259private:
268 static void RecordUnlock();
269
270 // Toggles the start text every 120 frames and sets the wave view's frame. Slots 26 and 27 both
271 // expand it. No out-of-line copy is emitted.
272 void UpdateBlink(float flTime);
273
274 Rnd::Text *mStartText; // +0x8c
275 float mBlinkTime; // +0x90, the time of the next toggle, or 0 while idle
276 Rnd::View *mWaveView; // +0x94
277 std::vector<Rnd::Text *> mLegalTexts; // +0x98
278 int mReserved; // +0xa4, never read or written
279 int mAttractEnabled; // +0xa8, from configuration code 0x26b
280 int mAttractDelaySeconds; // +0xac, from configuration code 0x26c
281 int mAttractStarted; // +0xb0
282 // The watchdog time of the last controller press, in nanoseconds. Starts at -1. +0xb8
283 long long mLastActivityNs;
284#ifdef VIDEO_STANDARD_PAL
285 // The fade that OnExitFinished() runs with mExitChoice at 0. +0xc0
286 MetFade *mFade;
287#endif
288};
Mix-in for an object that takes part in a screen fade.
Definition fadeuser.h:28
Base of every event the game passes between a MsgSource and a MsgSink.
Definition message.h:41
Driver of the full-screen metagame fade.
Definition metfade.h:29
Panel that draws the game logo and waits for the player to start.
Definition metlogoscreen.h:48
virtual ~MetLogoScreen()
Release the screen.
virtual void PlayHighSound(int)
Play nothing.
Definition metlogoscreen.h:138
virtual void OnEnterFinished()
Start the idle count and the blink, and play SND_MET_FREQUENCY, once the enter animation has finished...
virtual void PlayLeaveSound(int)
Play nothing.
Definition metlogoscreen.h:127
static MetLogoScreen * New(MetRenderer *pRenderer, int nPriority)
Build the screen on the heap.
virtual void OnExitFinished()
Bring up the attract mode or the main menu once the screen has exited, and hide the legal texts.
virtual void PlaySlideSound(int)
Play nothing.
Definition metlogoscreen.h:116
virtual void UpdateIdleAnimation(float flTime)
Blink the start text and play the wave.
virtual void PlayCycleLeftSound(int)
Play nothing.
Definition metlogoscreen.h:149
virtual void HandleCommand(const MetScreenCommand *pCommand)
Start the game on the select command or command 10.
virtual void UpdateIdle(float flTime)
Track the idle time for the attract mode, then blink the start text and play the wave.
MetLogoScreen(MetRenderer *pRenderer, int nPriority)
Construct the screen.
virtual void PlayCycleRightSound(int)
Play nothing.
Definition metlogoscreen.h:160
virtual void EnterAndShow()
Enter, and show the four legal texts.
virtual void DispatchPriv(Message *pMsg)
Record an unlock of the stages.
virtual void ResolveContainerViews()
Resolve the animation views, the container view, the start text, the wave view, the version text,...
Front-end renderer that owns the screen stack and drives every MetScreen.
Definition metrenderer.h:68
Base of every front-end screen.
Definition metscreen.h:212
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
Root of a loadable scene.
Definition view.h:47
The rendering engine.
Definition animhelper.h:3
One navigation command delivered to a screen.
Definition metscreen.h:46