resonance 1.0.1
Loading...
Searching...
No Matches
metexpansionpakscreen.h
Go to the documentation of this file.
1#pragma once
2
3#include "met/discswap.h"
4#include "met/fadeuser.h"
5#include "met/metfade.h"
6#include "met/metscreen.h"
7
42public:
51 MetExpansionPakScreen(MetRenderer *pRenderer, int nPriority);
52
58
70 static MetExpansionPakScreen *New(MetRenderer *pRenderer, int nPriority);
71
82 virtual void OnFadeOutDone();
83
93 virtual void OnFadeInDone();
94
105 virtual void EnterAndShow();
106
117 virtual void BeginExit();
118
132 virtual void OnMsgScreenDismissed(const HxStr &name, int nChoice);
133
144 virtual void OnMsgScreenShown(const HxStr &name);
145
155 virtual void PlayCycleLeftSound(int) {
156 }
157
166 virtual void PlayCycleRightSound(int) {
167 }
168
182 virtual void UpdateIdle(float flTime);
183
194 virtual void ResolveContainerViews();
195
196private:
197 // The disc exchange. EnterAndShow() resets it, and UpdateIdle() drives it and stores
198 // each result as mState. +0x90
199 DiscSwap mDiscSwap;
200 // State of the dialogue. EnterAndShow() clears it and UpdateIdle() advances it through
201 // the DiscSwap::Step values and its own 0, 1, 8, and 13. +0xa8
202 int mState;
203 // Set by OnMsgScreenShown() for `expansion_prepare`. +0xac
204 int mPrepareShown;
205 // Set by OnMsgScreenShown() for `expansion_load`. +0xb0
206 int mLoadShown;
207 // Set by UpdateIdle() once the mount completes. UpdateIdle() returns at once while it is set.
208 // +0xb4
209 int mFinished;
210 // Set by UpdateIdle() after a failed swap. OnMsgScreenDismissed() then offers RETRY rather
211 // than CONTINUE. +0xb8
212 int mRetry;
213 // Set by UpdateIdle() once it has exited `MetMsgScreen` at the open tray. +0xbc
214 int mMsgScreenExited;
215 // The fade both fade routines and the per-frame tick address. The constructor allocates it,
216 // and the 0x2c-byte request and the constructor at `0x0016a1c8` are what identify the class.
217 // The member spelling matches MetLoadGameScreen and MetMemDetectStartup, which build one the
218 // same way. +0xc0
219 MetFade *mFade;
220};
Disc exchange that MetExpansionPakScreen runs to swap the game disc for the expansion disc.
Definition discswap.h:15
Mix-in for an object that takes part in a screen fade.
Definition fadeuser.h:28
Heap-allocated NUL-terminated string.
Definition hxstr.h:41
virtual void EnterAndShow()
Reset the state machine and start the fade in.
virtual ~MetExpansionPakScreen()
MetExpansionPakScreen(MetRenderer *pRenderer, int nPriority)
Construct the screen.
virtual void BeginExit()
Start the fade out.
virtual void UpdateIdle(float flTime)
Drive the dialogue state machine by one frame.
virtual void OnMsgScreenDismissed(const HxStr &name, int nChoice)
Advance the state machine once a message screen is dismissed.
virtual void PlayCycleLeftSound(int)
Silence the cycle-left sound.
Definition metexpansionpakscreen.h:155
static MetExpansionPakScreen * New(MetRenderer *pRenderer, int nPriority)
Build the screen on the heap.
virtual void PlayCycleRightSound(int)
Silence the cycle-right sound.
Definition metexpansionpakscreen.h:166
virtual void OnFadeOutDone()
Leave the screen once the fade out finishes.
virtual void OnFadeInDone()
Show the expansion_prepare dialogue once the fade in finishes.
virtual void ResolveContainerViews()
Resolve the container views.
virtual void OnMsgScreenShown(const HxStr &name)
Record which of the two message screens has appeared.
Driver of the full-screen metagame fade.
Definition metfade.h:29
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.