resonance 1.0.1
Loading...
Searching...
No Matches
metmemcardloadscreen.h
Go to the documentation of this file.
1#pragma once
2
3#include <vector>
4
8#include "rnd/object.h"
9
10namespace Rnd {
11class Button;
12class Text;
13class View;
14} // namespace Rnd
15
40public:
52 MetMemCardLoadScreen(MetRenderer *pRenderer, int nPriority);
53
59
69 static MetMemCardLoadScreen *New(MetRenderer *pRenderer, int nPriority);
70
80 static void OpenPicker(MetMemCardPickerUser *pUser);
81
93 void Present(MetMemCardPickerUser *pUser, bool bShowNow);
94
105 virtual void EnterAndShow();
106
117 virtual void HandleCommand(const MetScreenCommand *pCommand);
118
128 virtual void OnRepeatingSoundFinished(Rnd::Button *pButton);
129
138 virtual void OnEnterFinished();
139
149 virtual void OnExitFinished();
150
160 virtual void ResolveContainerViews();
161
171 virtual void PlaySlideSound(int nSelector);
172
181 virtual void PlayHighSound(int) {
182 }
183
193 virtual void PlayCycleLeftSound(int nSelector);
194
204 virtual void PlayCycleRightSound(int nSelector);
205
214 virtual void StartDetect();
215
225 virtual void OnNoCard();
226
236 virtual void OnDetectFinished();
237
238#ifdef VIDEO_STANDARD_PAL
249 virtual void OnMsgScreenDismissed(const HxStr &name, int nChoice);
250
259 virtual void ShowFormatCheck(const MemcardConnectState &slot);
260#endif
261
262private:
271 void ShowCards();
272
281 void ShowSelection();
282
291 void RefreshCards();
292
301 void UpdateArrows();
302
303 Rnd::Button *mLeftArrow; // +0xa4
304 Rnd::Button *mRightArrow; // +0xa8
305 Rnd::Text *mAvailableText; // +0xac
306 Rnd::Text *mSlotNumberText; // +0xb0
307 Rnd::View *mInfoView; // +0xb4
308 // The constructor and the destructors are the only routines that touch either vector, and the
309 // element type is not recovered.
310 std::vector<Rnd::Object *> mUnusedObjects1; // +0xb8
311 std::vector<Rnd::Object *> mUnusedObjects2; // +0xc4
312 int mSelected; // +0xd0, the index into mCards
313 int mUnused; // +0xd4, zeroed by the constructor and never read
314#ifdef VIDEO_STANDARD_PAL
315 // MetFrontEndState::mUsingMemcard as EnterAndShow() found it. The constructor does not set it.
316 int mUsingMemcardOnEnter; // +0xd8
317#endif
318 std::vector<MemcardConnectState> mCards; // +0xd8, +0xdc in the European release
319 MetMemCardPickerUser *mPickerUser; // +0xe4, +0xe8 in the European release
320};
321
323 static_cast<MetMemCardLoadScreen *>(FindScreenByName(HxStr("MetMemCardLoadScreen")))
324 ->Present(pUser, true);
325}
Heap-allocated NUL-terminated string.
Definition hxstr.h:41
virtual void OnNoCard()
Report that the card in port 1 is missing.
virtual void OnEnterFinished()
Show the help text and select the mc_opt preset once the enter animation has finished.
virtual void OnDetectFinished()
Refresh the card list and bring the screen up.
virtual void PlayHighSound(int)
Play nothing.
Definition metmemcardloadscreen.h:181
virtual ~MetMemCardLoadScreen()
void Present(MetMemCardPickerUser *pUser, bool bShowNow)
Record the requester, then either bring the screen up at once or hide it and probe.
virtual void OnRepeatingSoundFinished(Rnd::Button *pButton)
Step the selection once an arrow's alternation has finished, and show it.
MetMemCardLoadScreen(MetRenderer *pRenderer, int nPriority)
Construct the screen.
virtual void StartDetect()
Show the detection notice, register the screen with the renderer, and run the base probe.
virtual void OnExitFinished()
Bring up the next screen once this one has exited.
virtual void PlayCycleLeftSound(int nSelector)
Play the cycle-left sound while at least two cards are listed.
virtual void EnterAndShow()
Hide the screen, then probe again after MetConfigOptionsButtonsScreen or list the cards.
virtual void HandleCommand(const MetScreenCommand *pCommand)
Start an arrow's alternation, choose the card, back out, or probe again.
static void OpenPicker(MetMemCardPickerUser *pUser)
Bring up the registered card picker on behalf of a requester.
Definition metmemcardloadscreen.h:322
static MetMemCardLoadScreen * New(MetRenderer *pRenderer, int nPriority)
Build the screen on the heap.
virtual void ResolveContainerViews()
Resolve the base views, the two arrows, the two card texts, and the information view,...
virtual void PlayCycleRightSound(int nSelector)
Play the cycle-right sound under the same condition as PlayCycleLeftSound().
virtual void PlaySlideSound(int nSelector)
Play the slide sound while at least one card is listed.
Mix-in for a screen that receives the outcome of the memory-card picker.
Definition metmemcardpickeruser.h:31
virtual void OnMsgScreenDismissed(const HxStr &name, int nChoice)
Act on the player's response to one of the probe's dialogues.
MetMemDetectScreen(MetRenderer *pRenderer, int nPriority, const HxStr &name, const HxStr &directory, const HxStr &file)
Construct the detector.
Front-end renderer that owns the screen stack and drives every MetScreen.
Definition metrenderer.h:68
static MetScreen * FindScreenByName(const HxStr &name)
Resolve one screen by its registry key.
Selectable widget, as one mesh and one text run plus a palette for each.
Definition button.h:39
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
What one card slot reports about itself, and the memory-card location the front end stores.
Definition memcardconnectstate.h:21
One navigation command delivered to a screen.
Definition metscreen.h:46