metaforce/Runtime/MP1/CPauseScreen.hpp

81 lines
2.7 KiB
C++
Raw Normal View History

2018-10-07 03:42:33 +00:00
#pragma once
2017-02-12 03:17:18 +00:00
2017-02-18 02:19:50 +00:00
#include "CInGameGuiManager.hpp"
2017-04-26 06:43:48 +00:00
#include "Editor/ProjectResourceFactoryBase.hpp"
#include "CPauseScreenBase.hpp"
2017-02-18 02:19:50 +00:00
2017-02-12 03:17:18 +00:00
namespace urde
{
2017-04-26 06:43:48 +00:00
class CDependencyGroup;
2017-02-12 03:17:18 +00:00
namespace MP1
{
class CPauseScreen
{
2017-04-26 06:43:48 +00:00
public:
enum class ESubScreen
2017-02-18 02:19:50 +00:00
{
2017-04-26 06:43:48 +00:00
LogBook,
Options,
Inventory,
2017-05-18 19:27:21 +00:00
ToGame,
ToMap
2017-02-18 02:19:50 +00:00
};
2017-04-26 06:43:48 +00:00
private:
2017-05-02 04:00:38 +00:00
ESubScreen x0_initialSubScreen;
2017-04-26 06:43:48 +00:00
u32 x4_ = 2;
2017-05-18 19:27:21 +00:00
ESubScreen x8_curSubscreen = ESubScreen::ToGame;
ESubScreen xc_nextSubscreen = ESubScreen::ToGame;
2017-05-04 18:56:20 +00:00
float x10_alphaInterp = 0.f;
2017-04-26 06:43:48 +00:00
TLockedToken<CStringTable> x14_strgPauseScreen;
const CDependencyGroup& x20_suitDgrp;
const CDependencyGroup& x24_ballDgrp;
TLockedToken<CGuiFrame> x28_pauseScreenInstructions;
CGuiFrame* x34_loadedPauseScreenInstructions = nullptr;
CGuiTextPane* x38_textpane_l1 = nullptr;
CGuiTextPane* x3c_textpane_r = nullptr;
CGuiTextPane* x40_textpane_a = nullptr;
2017-05-02 04:00:38 +00:00
CGuiTextPane* x44_textpane_b = nullptr;
2017-04-26 06:43:48 +00:00
CGuiTextPane* x48_textpane_return = nullptr;
CGuiTextPane* x4c_textpane_next = nullptr;
CGuiTextPane* x50_textpane_back = nullptr;
2017-08-13 05:26:14 +00:00
CAssetId x54_frmePauseScreenId;
2017-04-26 06:43:48 +00:00
u32 x58_frmePauseScreenBufSz;
std::unique_ptr<u8[]> x5c_frmePauseScreenBuf;
2017-10-27 10:10:32 +00:00
std::shared_ptr<IDvdRequest> x60_loadTok;
2017-05-02 04:00:38 +00:00
rstl::reserved_vector<std::unique_ptr<CGuiFrame>, 2> x64_frameInsts;
2017-04-26 06:43:48 +00:00
u32 x78_activeIdx = 0;
rstl::reserved_vector<std::unique_ptr<CPauseScreenBase>, 2> x7c_screens;
bool x90_resourcesLoaded = false;
2017-05-02 04:00:38 +00:00
bool x91_initialTransition = true;
2017-04-26 06:43:48 +00:00
2017-05-02 04:00:38 +00:00
std::unique_ptr<CPauseScreenBase> BuildPauseSubScreen(ESubScreen subscreen,
const CStateManager& mgr,
CGuiFrame& frame) const;
void StartTransition(float time, const CStateManager& mgr, ESubScreen subscreen, int);
bool CheckLoadComplete(const CStateManager& mgr);
void InitializeFrameGlue();
bool InputEnabled() const;
static ESubScreen GetPreviousSubscreen(ESubScreen screen);
static ESubScreen GetNextSubscreen(ESubScreen screen);
void TransitionComplete();
2017-02-12 03:17:18 +00:00
public:
2017-05-02 04:00:38 +00:00
CPauseScreen(ESubScreen subscreen, const CDependencyGroup& suitDgrp, const CDependencyGroup& ballDgrp);
2018-05-08 05:10:24 +00:00
~CPauseScreen();
2017-04-26 06:43:48 +00:00
void ProcessControllerInput(const CStateManager& mgr, const CFinalInput& input);
2017-05-02 04:00:38 +00:00
void Update(float dt, const CStateManager& mgr, CRandom16& rand, CArchitectureQueue& archQueue);
2017-04-26 06:43:48 +00:00
void PreDraw();
2017-05-02 04:00:38 +00:00
void Draw();
bool IsLoaded() const { return x90_resourcesLoaded; }
2017-05-18 19:27:21 +00:00
bool ShouldSwitchToMapScreen() const;
bool ShouldSwitchToInGame() const;
2017-05-21 16:01:04 +00:00
bool IsTransitioning() const { return x8_curSubscreen != xc_nextSubscreen; }
float GetHelmetCamYOff() const;
2017-02-12 03:17:18 +00:00
};
}
}