resonance 1.0.1
Loading...
Searching...
No Matches
metsolostagesscreen.h
Go to the documentation of this file.
1#pragma once
2
3#include <vector>
4
5#include "met/metscreen.h"
6#include "met/metsonglists.h"
8
9class CampaignStats;
10class MetButtonList;
11
12namespace Rnd {
13class Button;
14class Font;
15class Mat;
16class Mesh;
17class Tex;
18class Text;
19class TransAnim;
20class View;
21} // namespace Rnd
22
45public:
58 MetSoloStagesScreen(MetRenderer *pRenderer, int nPriority);
59
67
79 static MetSoloStagesScreen *New(MetRenderer *pRenderer, int nPriority);
80
102 virtual void EnterAndShow();
103
110 virtual void BeginExit();
111
125 virtual void HandleCommand(const MetScreenCommand *pCommand);
126
134 virtual void PlaySlideSound(int nSelector);
135
143 virtual void PlayCycleLeftSound(int nSelector);
144
152 virtual void PlayCycleRightSound(int nSelector);
153
166 virtual void UpdateIdle(float flTime);
167
179 virtual void OnRepeatingSoundFinished(Rnd::Button *pButton);
180
187 virtual void OnEnterFinished();
188
200 virtual void OnExitFinished();
201
211 virtual void ResolveContainerViews();
212
220
228
229private:
236 void BuildButtons();
237
244 void ClearLevelLists();
245
252 void RefreshStage();
253
260 int IsStageUnavailable(int nStage);
261
268 void ShowStageBonus(int nStage);
269
276 void ApplyStageStyles();
277
286 int IsLevelLocked(int nLevel);
287
297 void RefreshIndicators(int bStageLocked);
298
305 void ShowLevelTexts(int nShowing);
306
313 void ShowWarning(bool bShow);
314
321 void StyleLevel(int bStageLocked, const HxStr &levelName);
322
329 void ShowLevelDetails();
330
337 void UpdateArrows();
338
345 void LoadLevelTextures();
346
353 void StartScroll();
354
361 void RebuildLevelLists();
362
369 void UpdateSecretLevels(int bUnlockAll);
370
377 void SetUpStages(int bUnlockAll);
378
388 int IsStageBeaten(CampaignStats &stats, int nDifficulty, int nStage);
389
396 void ShowIndicators(int nShowing);
397
406 int IsStageSelectable(int nStage);
407
408 Rnd::Button *mLeftArrow; // +0x8c "ss_left_0%d.but" for the selected stage
409 Rnd::Button *mRightArrow; // +0x90 "ss_right_0%d.but" for the selected stage
410 Rnd::Text *mLabelText; // +0x94 "ss_label.txt"
411 Rnd::Text *mBioText; // +0x98 "ss_bio.txt"
412 Rnd::Text *mScoreText; // +0x9c "ss_score.txt"
413 Rnd::Text *mGenreText; // +0xa0 "ss_genre_bpm.txt"
414 Rnd::Text *mWarningText; // +0xa4 "ss_warning.txt"
415 Rnd::Text *mStageBonusText; // +0xa8 "ss_stage_bonus_val.txt"
416 Rnd::Text *mStageBeatText; // +0xac "ss_stage_beat_val.txt"
417 Rnd::View *mStageBonusGroup; // +0xb0 "stage_bonus_group.view"
418 Rnd::View *mTvView; // +0xb4 "sstv.view"
419 Rnd::TransAnim *mTvPanelAnim; // +0xb8 "stage_sel_tv_panel.tnm"
420 std::vector<Rnd::Mat *> mTvMats; // +0xbc The left and right television screens.
421 std::vector<Rnd::Mat *> mTvLogoMats; // +0xc8 The left and right television logos.
422 float mScrollLeftTime; // +0xd4 The frame a left scroll started, or zero.
423 float mScrollRightTime; // +0xd8 The frame a right scroll started, or zero.
424 Rnd::Tex *mTvLabelTex; // +0xdc The label the television shows.
425 Rnd::Tex *mNextTvLabelTex; // +0xe0 The label a scroll brings in.
426 // Cleared by slot 38 and never written again, so every reader shows no texture. +0xe4
427 Rnd::Tex *mBlankTex;
428 Rnd::Tex *mTvLogoTex; // +0xe8 The logo the television shows.
429 Rnd::Tex *mNextTvLogoTex; // +0xec The logo a scroll brings in.
430 int mUnusedFirst; // +0xf0 Cleared by slot 38, with no reader.
431 int mUnusedSecond; // +0xf4 Cleared by slot 38, with no reader.
432 // The status textures, locked, open, and won, from the three `lvlstate_*.bmp` bitmaps. +0xf8
433 std::vector<Rnd::Tex *> mLevelStateTexs;
434 std::vector<StatusSlot> mStatusSlots; // +0x104 The left and right status panels.
435 // 0 while idle, and 1 or 2 while a left or right scroll waits for its textures. +0x110
436 int mScrollDirection;
437 std::vector<Rnd::Mat *> mWonMats; // +0x114 Indicator materials for a won level.
438 std::vector<Rnd::Mat *> mOpenMats; // +0x120 Indicator materials for an open level.
439 std::vector<Rnd::Mat *> mLockedMats; // +0x12c Indicator materials for a locked level.
440 MetButtonList *mIndicatorList; // +0x138 "ss_ind_0%d.but", seven buttons
441 Rnd::View *mStageButtonsView; // +0x13c "stage_buts.view"
442 MetButtonList *mStageList; // +0x140 "ss_stage%d.but", six buttons
443 std::vector<ButtonStyle> mOpenStyles; // +0x144 The states of "ss_stage1.but".
444 std::vector<ButtonStyle> mClosedStyles; // +0x150 The states of "ss_stage2.but".
445 std::vector<Rnd::Mesh *> mStageWires; // +0x15c "ss_butt_wire_0%d.mesh"
446 std::vector<Rnd::Mesh *> mIndicatorWires; // +0x168 "ss_ind_wire_0%d.mesh"
447 std::vector<StageListEntry> mStageLevels[5]; // +0x174 The levels of stages 1 through 5.
448 std::vector<StageListEntry> mCustomLevels; // +0x1b0 Emptied and read, but never filled.
449 std::vector<StageListEntry> *mCurrentLevels; // +0x1bc The selected stage's list.
450 int mSelectedLevel[6]; // +0x1c0 The level recorded for each stage.
451 int mStageLocked[6]; // +0x1d8 Set for a stage that is not open.
452 int mUnlockAll; // +0x1f0 MetFrontEndState's `+0x14` at slot 5.
453 int mSecretUnlocked; // +0x1f4 Set once the first secret level is open.
454 int mSuperSecretUnlocked; // +0x1f8 Set once the second secret level is open.
455 TexturePairRecord mLogoPair; // +0x1fc
456 TexturePairRecord mLabelPair; // +0x22c
457};
Persisted progress across the whole campaign.
Definition campaignstats.h:35
Heap-allocated NUL-terminated string.
Definition hxstr.h:41
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.
virtual void EnterAndShow()
Rebuild the stages, caption the title, and show the screen.
virtual void PlaySlideSound(int nSelector)
Play the slide sound when the selected stage is selectable.
virtual void ResolveContainerViews()
Resolve the container objects.
virtual ~MetSoloStagesScreen()
Delete the two button lists and empty the level lists.
MetSoloStagesScreen(MetRenderer *pRenderer, int nPriority)
Construct the screen.
virtual void UpdateIdle(float flTime)
Swap in loaded textures and run the television scroll.
virtual void BeginExit()
Blank the television and exit.
virtual void OnExitFinished()
Push the next screens once the exit finishes.
virtual void PlayCycleRightSound(int nSelector)
Play the cycle-right sound when the selected stage is available.
virtual void HandleCommand(const MetScreenCommand *pCommand)
Move between stages, scroll the levels, or act on the selection.
virtual void OnRepeatingSoundFinished(Rnd::Button *pButton)
Finish a scroll or a selection once its button stops alternating.
virtual void OnEnterFinished()
Show the television and load the selected level's textures.
static MetSoloStagesScreen * New(MetRenderer *pRenderer, int nPriority)
Allocate and construct the screen.
virtual void PlayCycleLeftSound(int nSelector)
Play the cycle-left sound when the selected stage is available.
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
Indexed triangle mesh with one material.
Definition mesh.h:46
Texture, as a bitmap path plus the load state of its mip levels.
Definition tex.h:43
Run of text drawn as a quad per glyph.
Definition text.h:57
Animation that drives one transformable from three keyframe channels.
Definition transanim.h:49
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
Materials and fonts one stage-button state uses.
Definition metsolostagesscreen.h:216
Rnd::Mat * mMat
Definition metsolostagesscreen.h:217
Rnd::Font * mFont
Definition metsolostagesscreen.h:218
Status panel material and the mesh that shows it.
Definition metsolostagesscreen.h:224
Rnd::Mat * mMat
Definition metsolostagesscreen.h:225
Rnd::Mesh * mMesh
Definition metsolostagesscreen.h:226