resonance 1.0.1
Loading...
Searching...
No Matches
metarenasscreen.h
Go to the documentation of this file.
1#pragma once
2
3#include <vector>
4
5#include "met/metscreen.h"
6#include "rnd/object.h"
7
8class MetButtonList;
10
11namespace Rnd {
12class Font;
13class Mat;
14class View;
15} // namespace Rnd
16
48class MetArenasScreen : public MetScreen {
49public:
58 MetArenasScreen(MetRenderer *pRenderer, int nPriority);
59
72 static MetArenasScreen *New(MetRenderer *pRenderer, int nPriority);
73
79
92 virtual void EnterAndShow();
93
107 virtual void HandleCommand(const MetScreenCommand *pCommand);
108
118 virtual void PlaySlideSound(int nSelector);
119
127 virtual void PlayCycleLeftSound(int nSelector);
128
136 virtual void PlayCycleRightSound(int nSelector);
137
150 virtual void UpdateIdle(float flTime);
151
165 virtual void OnRepeatingSoundFinished(Rnd::Button *pButton);
166
176 virtual void OnEnterFinished();
177
189 virtual void OnExitFinished();
190
202 virtual void ResolveContainerViews();
203
204private:
213 void UpdateScreenshot();
214
227 void SetupArenaButtons(int bUnlockAll);
228
229 // The arena button ring. The constructor allocates it and the destructor releases it. +0x8c
230 MetButtonList *mArenaButtons;
231 // The two arena screenshot textures. Slot 38 allocates it and the destructor releases it.
232 // +0x90
233 TexturePairRecord *mScreenshots;
234 // The index of the last button, the entry for no arena. +0x94
235 int mNoArenaIndex;
236 // The number of unlocked arenas. Every index below it is a selectable arena. +0x98
237 int mUnlockedCount;
238 // The screenshot material, `as_screenshot.mat`. +0x9c
239 Rnd::Mat *mScreenshotMat;
240 // The view the arena buttons are drawn through, `arena_butts.view`. +0xa0
241 Rnd::View *mButtonView;
242 // The unlocked palette, from `as_01.but`. +0xa4, +0xbc
243 std::vector<Rnd::Mat *> mUnlockedMats;
244 // The locked palette, from `as_02.but`. +0xb0, +0xc8
245 std::vector<Rnd::Mat *> mLockedMats;
246 std::vector<Rnd::Font *> mUnlockedFonts;
247 std::vector<Rnd::Font *> mLockedFonts;
248};
MetArenasScreen(MetRenderer *pRenderer, int nPriority)
Construct the screen.
virtual void PlaySlideSound(int nSelector)
Play the slide sound only for a selectable index.
virtual void EnterAndShow()
Title the screen from the session's mode and play mode, and show it.
virtual void UpdateIdle(float flTime)
Advance the arena screenshot pair and hand the current texture to the panel mesh.
static MetArenasScreen * New(MetRenderer *pRenderer, int nPriority)
Allocate and construct the screen.
virtual void ResolveContainerViews()
Resolve the arena buttons, the screenshot material, and the button view.
virtual void OnRepeatingSoundFinished(Rnd::Button *pButton)
Commit the chosen arena and depart, or activate the panel for a disabled entry.
virtual void PlayCycleRightSound(int nSelector)
Play no right cycle sound.
virtual ~MetArenasScreen()
virtual void OnExitFinished()
Go on to whichever screen the departure was for.
virtual void PlayCycleLeftSound(int nSelector)
Play no left cycle sound.
virtual void OnEnterFinished()
Post the first prompt.
virtual void HandleCommand(const MetScreenCommand *pCommand)
Route one command to the button ring, the selection, or the departure.
Ring of front-end buttons with one of them selected.
Definition metbuttonlist.h:34
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.
Selectable widget, as one mesh and one text run plus a palette for each.
Definition button.h:39
Glyph atlas, either a host font description or a grid of cells inside a material texture.
Definition font.h:59
Surface description a Rnd::Mesh draws with.
Definition mat.h:36
Root of a loadable scene.
Definition view.h:47
Pair of textures a screen alternates between, one shown while the other loads.
Definition texturepairrecord.h:30
The rendering engine.
Definition animhelper.h:3
One navigation command delivered to a screen.
Definition metscreen.h:46