mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 23:47:42 +00:00
Lots of CMFGame integration
This commit is contained in:
@@ -5,14 +5,13 @@
|
||||
#include "CRandom16.hpp"
|
||||
#include "CPlayerVisor.hpp"
|
||||
#include "CFaceplateDecoration.hpp"
|
||||
#include "CSamusHud.hpp"
|
||||
#include "CPauseScreen.hpp"
|
||||
#include "CSamusFaceReflection.hpp"
|
||||
#include "CMessageScreen.hpp"
|
||||
#include "CSaveGameScreen.hpp"
|
||||
#include "Camera/CCameraFilter.hpp"
|
||||
#include "CStateManager.hpp"
|
||||
#include "DataSpec/DNACommon/Tweaks/ITweakGui.hpp"
|
||||
#include "CInventoryScreen.hpp"
|
||||
|
||||
namespace urde
|
||||
{
|
||||
@@ -27,11 +26,19 @@ class CAutoMapper;
|
||||
|
||||
namespace MP1
|
||||
{
|
||||
class CPauseScreen;
|
||||
class CSamusHud;
|
||||
class CInventoryScreen;
|
||||
|
||||
enum class EInGameGuiState
|
||||
{
|
||||
Zero,
|
||||
One
|
||||
InGame,
|
||||
MapScreen,
|
||||
PauseGame,
|
||||
PauseLogBook,
|
||||
PauseSaveGame,
|
||||
PauseHUDMessage
|
||||
};
|
||||
|
||||
class CInGameGuiManager
|
||||
@@ -59,15 +66,17 @@ class CInGameGuiManager
|
||||
std::unique_ptr<CAutoMapper> x38_autoMapper;
|
||||
std::unique_ptr<CPauseScreen> x3c_pauseScreen;
|
||||
std::unique_ptr<CSamusFaceReflection> x40_samusReflection;
|
||||
std::unique_ptr<CMessageScreen> x44_;
|
||||
u32 x48_ = 0;
|
||||
std::unique_ptr<CMessageScreen> x44_messageScreen;
|
||||
std::unique_ptr<CInventoryScreen> x48_inventoryScreen;
|
||||
std::unique_ptr<CSaveGameScreen> x4c_saveUI;
|
||||
TLockedToken<CTexture> x50_deathDot;
|
||||
std::vector<TLockedToken<CDependencyGroup>> x5c_pauseScreenDGRPs;
|
||||
std::vector<TLockedToken<CDependencyGroup>> xc8_inGameGuiDGRPs;
|
||||
std::vector<u32> xd8_;
|
||||
std::vector<CToken> xe8_;
|
||||
std::vector<CToken> xe8_pauseResources;
|
||||
CCameraFilterPass xf8_camFilter;
|
||||
ResId x124_pauseGameHudMessage = -1;
|
||||
float x128_pauseGameHudTime = 0.f;
|
||||
std::list<CToken> x12c_;
|
||||
u32 x140_ = 0;
|
||||
CGuiWidget* x144_basewidget_automapper = nullptr;
|
||||
@@ -79,8 +88,8 @@ class CInGameGuiManager
|
||||
zeus::CQuaternion x170_camRotate;
|
||||
zeus::CVector3f x180_camOffset;
|
||||
zeus::CTransform x18c_camXf;
|
||||
u32 x1bc_ = 0;
|
||||
u32 x1c0_ = 0;
|
||||
EInGameGuiState x1bc_prevState = EInGameGuiState::Zero;
|
||||
EInGameGuiState x1c0_nextState = EInGameGuiState::Zero;
|
||||
SOnScreenTex x1c4_onScreenTex;
|
||||
float x1d8_ = 0.f;
|
||||
TLockedToken<CTexture> x1dc_onScreenTexTok; // Used to be heap-allocated
|
||||
@@ -97,8 +106,8 @@ class CInGameGuiManager
|
||||
{
|
||||
bool x1f8_24_ : 1;
|
||||
bool x1f8_25_ : 1;
|
||||
bool x1f8_26_ : 1;
|
||||
bool x1f8_27_ : 1;
|
||||
bool x1f8_26_deferTransition : 1;
|
||||
bool x1f8_27_inSaveUI : 1;
|
||||
};
|
||||
u32 _dummy = 0;
|
||||
};
|
||||
@@ -106,10 +115,26 @@ class CInGameGuiManager
|
||||
static std::vector<TLockedToken<CDependencyGroup>> LockPauseScreenDependencies();
|
||||
bool CheckDGRPLoadComplete() const;
|
||||
void BeginStateTransition(EInGameGuiState state, CStateManager& stateMgr);
|
||||
void EnsureStates(CStateManager& stateMgr);
|
||||
void DoStateTransition(CStateManager& stateMgr);
|
||||
void DestroyAreaTextures(CStateManager& stateMgr);
|
||||
void TryReloadAreaTextures();
|
||||
|
||||
public:
|
||||
CInGameGuiManager(CStateManager& stateMgr, CArchitectureQueue& archQueue);
|
||||
bool CheckLoadComplete(CStateManager& stateMgr);
|
||||
void Update(CStateManager& stateMgr, float dt, CArchitectureQueue& archQueue, bool);
|
||||
void ProcessControllerInput(CStateManager& stateMgr, const CFinalInput& input,
|
||||
CArchitectureQueue& archQueue);
|
||||
void PreDraw(CStateManager& stateMgr);
|
||||
void Draw(CStateManager& stateMgr);
|
||||
void ShowPauseGameHudMessage(CStateManager& stateMgr, ResId pauseMsg, float time);
|
||||
void PauseGame(CStateManager& stateMgr, EInGameGuiState state);
|
||||
void StartFadeIn();
|
||||
bool WasInGame() const { return x1bc_prevState >= EInGameGuiState::Zero && x1bc_prevState <= EInGameGuiState::InGame; }
|
||||
bool IsInGame() const { return x1c0_nextState >= EInGameGuiState::Zero && x1c0_nextState <= EInGameGuiState::InGame; }
|
||||
bool IsInSaveUI() const { return x1f8_27_inSaveUI; }
|
||||
bool GetIsGameDraw() const;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user