From 159b83b37af848cdb71f5e24484601d18cd3f46d Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Tue, 25 Apr 2017 20:43:48 -1000 Subject: [PATCH] Initial pause screen implementations --- DataSpec/DNACommon/Tweaks/ITweakGuiColors.hpp | 2 + DataSpec/DNAMP1/Tweaks/CTweakGuiColors.hpp | 7 +- Runtime/MP1/CInGameGuiManager.cpp | 26 ++--- Runtime/MP1/CInGameGuiManager.hpp | 24 ++--- Runtime/MP1/CInGameGuiManagerCommon.hpp | 25 +++++ Runtime/MP1/CInventoryScreen.cpp | 21 +++- Runtime/MP1/CInventoryScreen.hpp | 30 ++---- Runtime/MP1/CLogBookScreen.cpp | 0 Runtime/MP1/CLogBookScreen.hpp | 0 Runtime/MP1/CMFGame.cpp | 2 +- Runtime/MP1/CMakeLists.txt | 6 ++ Runtime/MP1/COptionsScreen.cpp | 0 Runtime/MP1/COptionsScreen.hpp | 0 Runtime/MP1/CPauseScreen.cpp | 8 +- Runtime/MP1/CPauseScreen.hpp | 57 +++++++--- Runtime/MP1/CPauseScreenBase.cpp | 102 ++++++++++++++++++ Runtime/MP1/CPauseScreenBase.hpp | 91 ++++++++++++++++ Runtime/MP1/CPauseScreenBlur.cpp | 0 Runtime/MP1/CPauseScreenBlur.hpp | 33 ++++++ Runtime/MP1/CSamusDoll.cpp | 16 +++ Runtime/MP1/CSamusDoll.hpp | 35 ++++++ Runtime/MP1/CSamusFaceReflection.cpp | 5 + Runtime/MP1/CSamusFaceReflection.hpp | 1 + 23 files changed, 416 insertions(+), 75 deletions(-) create mode 100644 Runtime/MP1/CInGameGuiManagerCommon.hpp create mode 100644 Runtime/MP1/CLogBookScreen.cpp create mode 100644 Runtime/MP1/CLogBookScreen.hpp create mode 100644 Runtime/MP1/COptionsScreen.cpp create mode 100644 Runtime/MP1/COptionsScreen.hpp create mode 100644 Runtime/MP1/CPauseScreenBase.cpp create mode 100644 Runtime/MP1/CPauseScreenBase.hpp create mode 100644 Runtime/MP1/CPauseScreenBlur.cpp create mode 100644 Runtime/MP1/CPauseScreenBlur.hpp create mode 100644 Runtime/MP1/CSamusDoll.cpp create mode 100644 Runtime/MP1/CSamusDoll.hpp diff --git a/DataSpec/DNACommon/Tweaks/ITweakGuiColors.hpp b/DataSpec/DNACommon/Tweaks/ITweakGuiColors.hpp index a6198e07e..53eb3002a 100644 --- a/DataSpec/DNACommon/Tweaks/ITweakGuiColors.hpp +++ b/DataSpec/DNACommon/Tweaks/ITweakGuiColors.hpp @@ -86,6 +86,8 @@ struct ITweakGuiColors : BigYAML virtual const zeus::CColor& GetThermalDecoColor() const=0; virtual const zeus::CColor& GetThermalOutlinesColor() const=0; virtual const zeus::CColor& GetThermalLockColor() const=0; + virtual const zeus::CColor& GetPauseItemAmberColor() const=0; + virtual const zeus::CColor& GetPauseItemBlueColor() const=0; virtual VisorEnergyInitColors GetVisorEnergyInitColors(int idx) const=0; virtual VisorEnergyBarColors GetVisorEnergyBarColors(int idx) const=0; }; diff --git a/DataSpec/DNAMP1/Tweaks/CTweakGuiColors.hpp b/DataSpec/DNAMP1/Tweaks/CTweakGuiColors.hpp index caaba5a84..30aa11fb4 100644 --- a/DataSpec/DNAMP1/Tweaks/CTweakGuiColors.hpp +++ b/DataSpec/DNAMP1/Tweaks/CTweakGuiColors.hpp @@ -120,8 +120,8 @@ struct CTweakGuiColors : public ITweakGuiColors DNAColor x1b0_thermalOutlinesColor; DNAColor x1b4_; DNAColor x1b8_thermalLockColor; - DNAColor x1bc_; - DNAColor x1c0_; + DNAColor x1bc_pauseItemAmber; + DNAColor x1c0_pauseItemBlue; struct PerVisorColors : BigYAML { DECL_YAML @@ -204,6 +204,9 @@ struct CTweakGuiColors : public ITweakGuiColors const zeus::CColor& GetThermalDecoColor() const { return x1ac_thermalDecoColor; } const zeus::CColor& GetThermalOutlinesColor() const { return x1b0_thermalOutlinesColor; } const zeus::CColor& GetThermalLockColor() const { return x1b8_thermalLockColor; } + const zeus::CColor& GetPauseItemAmberColor() const { return x1bc_pauseItemAmber; } + const zeus::CColor& GetPauseItemBlueColor() const { return x1c0_pauseItemBlue; } + VisorEnergyInitColors GetVisorEnergyInitColors(int idx) const { const PerVisorColors& colors = x1c4_perVisorColors[idx]; diff --git a/Runtime/MP1/CInGameGuiManager.cpp b/Runtime/MP1/CInGameGuiManager.cpp index ba863c718..3d078c5df 100644 --- a/Runtime/MP1/CInGameGuiManager.cpp +++ b/Runtime/MP1/CInGameGuiManager.cpp @@ -10,10 +10,7 @@ #include "AutoMapper/CAutoMapper.hpp" #include "Particle/CGenDescription.hpp" #include "Audio/CSfxManager.hpp" -#include "CPauseScreen.hpp" #include "CSamusHud.hpp" -#include "CInventoryScreen.hpp" -#include "CPauseScreen.hpp" #include "Input/CInputGenerator.hpp" namespace urde @@ -111,7 +108,7 @@ void CInGameGuiManager::BeginStateTransition(EInGameGuiState state, CStateManage } } - x3c_pauseScreen->OnNewInGameGuiState(state, stateMgr); + x3c_pauseScreenBlur->OnNewInGameGuiState(state, stateMgr); if (!x1f8_26_deferTransition) DoStateTransition(stateMgr); @@ -121,7 +118,7 @@ void CInGameGuiManager::EnsureStates(CStateManager& stateMgr) { if (x1f8_26_deferTransition) { - if (!x3c_pauseScreen->GetX50_25()) + if (!x3c_pauseScreenBlur->GetX50_25()) { DestroyAreaTextures(stateMgr); x1f8_26_deferTransition = false; @@ -140,7 +137,7 @@ void CInGameGuiManager::DoStateTransition(CStateManager& stateMgr) { case EInGameGuiState::PauseGame: case EInGameGuiState::PauseLogBook: - if (!x48_inventoryScreen) + if (!x48_pauseScreen) { auto pState = stateMgr.GetPlayerState(); CPlayerState::EPlayerSuit suit = pState->GetCurrentSuitRaw(); @@ -184,7 +181,7 @@ void CInGameGuiManager::DoStateTransition(CStateManager& stateMgr) int w1 = x1c0_nextState == EInGameGuiState::PauseLogBook ? 0 : 2; CDependencyGroup* suitGrp = x5c_pauseScreenDGRPs[suitResIdx].GetObj(); - x48_inventoryScreen = std::make_unique(w1, *suitGrp, *suitGrp); + x48_pauseScreen = std::make_unique(w1, *suitGrp, *suitGrp); } case EInGameGuiState::MapScreen: @@ -265,7 +262,7 @@ bool CInGameGuiManager::CheckLoadComplete(CStateManager& stateMgr) x30_playerVisor = std::make_unique(stateMgr); x34_samusHud = std::make_unique(stateMgr); x38_autoMapper = std::make_unique(stateMgr); - x3c_pauseScreen = std::make_unique(); + x3c_pauseScreenBlur = std::make_unique(); x40_samusReflection = std::make_unique(stateMgr); } case ELoadPhase::LoadDeps: @@ -355,8 +352,8 @@ void CInGameGuiManager::ProcessControllerInput(CStateManager& stateMgr, const CF x44_messageScreen->ProcessControllerInput(input); return; } - if (x48_inventoryScreen) - x48_inventoryScreen->ProcessControllerInput(stateMgr, input); + if (x48_pauseScreen) + x48_pauseScreen->ProcessControllerInput(stateMgr, input); } } else @@ -366,9 +363,12 @@ void CInGameGuiManager::ProcessControllerInput(CStateManager& stateMgr, const CF } } -void CInGameGuiManager::PreDraw(CStateManager& stateMgr) +void CInGameGuiManager::PreDraw(CStateManager& stateMgr, bool cameraActive) { - + if (x48_pauseScreen) + x48_pauseScreen->PreDraw(); + if (cameraActive) + x40_samusReflection->PreDraw(stateMgr); } void CInGameGuiManager::Draw(CStateManager& stateMgr) @@ -397,7 +397,7 @@ void CInGameGuiManager::StartFadeIn() bool CInGameGuiManager::GetIsGameDraw() const { - return x3c_pauseScreen->GetX50_25(); + return x3c_pauseScreenBlur->GetX50_25(); } std::string CInGameGuiManager::GetIdentifierForMidiEvent(ResId world, ResId area, diff --git a/Runtime/MP1/CInGameGuiManager.hpp b/Runtime/MP1/CInGameGuiManager.hpp index ae598ab74..6b602c6ef 100644 --- a/Runtime/MP1/CInGameGuiManager.hpp +++ b/Runtime/MP1/CInGameGuiManager.hpp @@ -12,6 +12,9 @@ #include "CStateManager.hpp" #include "DataSpec/DNACommon/Tweaks/ITweakGui.hpp" #include "CInventoryScreen.hpp" +#include "CPauseScreen.hpp" +#include "CPauseScreenBlur.hpp" +#include "CInGameGuiManagerCommon.hpp" namespace urde { @@ -26,20 +29,9 @@ class CAutoMapper; namespace MP1 { -class CPauseScreen; +class CPauseScreenBlur; class CSamusHud; -class CInventoryScreen; - -enum class EInGameGuiState -{ - Zero, - InGame, - MapScreen, - PauseGame, - PauseLogBook, - PauseSaveGame, - PauseHUDMessage -}; +class CPauseScreen; class CInGameGuiManager { @@ -64,10 +56,10 @@ class CInGameGuiManager std::unique_ptr x30_playerVisor; std::unique_ptr x34_samusHud; std::unique_ptr x38_autoMapper; - std::unique_ptr x3c_pauseScreen; + std::unique_ptr x3c_pauseScreenBlur; std::unique_ptr x40_samusReflection; std::unique_ptr x44_messageScreen; - std::unique_ptr x48_inventoryScreen; + std::unique_ptr x48_pauseScreen; std::unique_ptr x4c_saveUI; TLockedToken x50_deathDot; std::vector> x5c_pauseScreenDGRPs; @@ -128,7 +120,7 @@ public: void Update(CStateManager& stateMgr, float dt, CArchitectureQueue& archQueue, bool); void ProcessControllerInput(CStateManager& stateMgr, const CFinalInput& input, CArchitectureQueue& archQueue); - void PreDraw(CStateManager& stateMgr); + void PreDraw(CStateManager& stateMgr, bool cameraActive); void Draw(CStateManager& stateMgr); void ShowPauseGameHudMessage(CStateManager& stateMgr, ResId pauseMsg, float time); void PauseGame(CStateManager& stateMgr, EInGameGuiState state); diff --git a/Runtime/MP1/CInGameGuiManagerCommon.hpp b/Runtime/MP1/CInGameGuiManagerCommon.hpp new file mode 100644 index 000000000..59de2a8b9 --- /dev/null +++ b/Runtime/MP1/CInGameGuiManagerCommon.hpp @@ -0,0 +1,25 @@ +#ifndef __URDE_CINGAMEGUIMANAGERCOMMON_HPP__ +#define __URDE_CINGAMEGUIMANAGERCOMMON_HPP__ + +#include "RetroTypes.hpp" + +namespace urde +{ +namespace MP1 +{ + +enum class EInGameGuiState +{ + Zero, + InGame, + MapScreen, + PauseGame, + PauseLogBook, + PauseSaveGame, + PauseHUDMessage +}; + +} +} + +#endif // __URDE_CINGAMEGUIMANAGERCOMMON_HPP__ diff --git a/Runtime/MP1/CInventoryScreen.cpp b/Runtime/MP1/CInventoryScreen.cpp index 734ac04b9..be578a634 100644 --- a/Runtime/MP1/CInventoryScreen.cpp +++ b/Runtime/MP1/CInventoryScreen.cpp @@ -8,7 +8,14 @@ namespace urde namespace MP1 { -CInventoryScreen::CInventoryScreen(u32 w1, +CInventoryScreen::CInventoryScreen(const CStateManager& mgr, const CGuiFrame& frame, const CStringTable& pauseStrg, + const CDependencyGroup& suitDgrp, const CDependencyGroup& ballDgrp) +: CPauseScreenBase(mgr, frame, pauseStrg) +{ + +} + +CPauseScreen::CPauseScreen(u32 w1, const CDependencyGroup& suitDgrp, const CDependencyGroup& ballDgrp) : x0_w1(w1), x14_strgPauseScreen(g_SimplePool->GetObj("STRG_PauseScreen")), @@ -23,7 +30,17 @@ CInventoryScreen::CInventoryScreen(u32 w1, CSfxManager::SfxStart(1435, 1.f, 0.f, false, 0x7f, false, kInvalidAreaId); } -void CInventoryScreen::ProcessControllerInput(const CStateManager& mgr, const CFinalInput& input) +void CPauseScreen::ProcessControllerInput(const CStateManager& mgr, const CFinalInput& input) +{ + +} + +void CPauseScreen::Update(float dt, CRandom16& rand, const CStateManager& mgr) +{ + +} + +void CPauseScreen::PreDraw() { } diff --git a/Runtime/MP1/CInventoryScreen.hpp b/Runtime/MP1/CInventoryScreen.hpp index ad22c23c8..45e66d454 100644 --- a/Runtime/MP1/CInventoryScreen.hpp +++ b/Runtime/MP1/CInventoryScreen.hpp @@ -2,7 +2,8 @@ #define __URDE_CINVENTORYSCREEN_HPP__ #include "CInGameGuiManager.hpp" -#include "Editor/ProjectResourceFactoryBase.hpp" +#include "CPauseScreenBase.hpp" +#include "CSamusDoll.hpp" namespace urde { @@ -11,31 +12,12 @@ class CDependencyGroup; namespace MP1 { -class CInventoryScreen +class CInventoryScreen : public CPauseScreenBase { - u32 x0_w1; - TLockedToken x14_strgPauseScreen; - const CDependencyGroup& x20_suitDgrp; - const CDependencyGroup& x24_ballDgrp; - TLockedToken x28_pauseScreenInstructions; - u32 x34_ = 0; - u32 x38_ = 0; - u32 x3c_ = 0; - u32 x40_ = 0; - u32 x48_ = 0; - u32 x4c_ = 0; - u32 x50_ = 0; - ResId x54_frmePauseScreenId; - u32 x58_frmePauseScreenBufSz; - std::unique_ptr x5c_frmePauseScreenBuf; - std::shared_ptr x60_loadTok; - u32 x64_ = 0; - u32 x78_ = 0; - rstl::reserved_vector x7c_; - + std::unique_ptr x19c_samusDoll; public: - CInventoryScreen(u32 w1, const CDependencyGroup& suitDgrp, const CDependencyGroup& ballDgrp); - void ProcessControllerInput(const CStateManager& mgr, const CFinalInput& input); + CInventoryScreen(const CStateManager& mgr, const CGuiFrame& frame, const CStringTable& pauseStrg, + const CDependencyGroup& suitDgrp, const CDependencyGroup& ballDgrp); }; } diff --git a/Runtime/MP1/CLogBookScreen.cpp b/Runtime/MP1/CLogBookScreen.cpp new file mode 100644 index 000000000..e69de29bb diff --git a/Runtime/MP1/CLogBookScreen.hpp b/Runtime/MP1/CLogBookScreen.hpp new file mode 100644 index 000000000..e69de29bb diff --git a/Runtime/MP1/CMFGame.cpp b/Runtime/MP1/CMFGame.cpp index 8783f9e4f..77afe41da 100644 --- a/Runtime/MP1/CMFGame.cpp +++ b/Runtime/MP1/CMFGame.cpp @@ -226,7 +226,7 @@ void CMFGame::Draw() const x14_stateManager->GetPlayer().IsPlayerDeadEnough(); } - x18_guiManager->PreDraw(*x14_stateManager); + x18_guiManager->PreDraw(*x14_stateManager, IsCameraActiveFlow()); x18_guiManager->Draw(*x14_stateManager); if (x1c_flowState == EGameFlowState::CinematicSkip) diff --git a/Runtime/MP1/CMakeLists.txt b/Runtime/MP1/CMakeLists.txt index 0cdb35ad8..b80cc6a52 100644 --- a/Runtime/MP1/CMakeLists.txt +++ b/Runtime/MP1/CMakeLists.txt @@ -28,12 +28,18 @@ set(MP1_SOURCES CStateSetterFlow.hpp CStateSetterFlow.cpp CAudioStateWin.hpp CAudioStateWin.cpp CInGameGuiManager.hpp CInGameGuiManager.cpp + CInGameGuiManagerCommon.hpp CSamusFaceReflection.hpp CSamusFaceReflection.cpp CPlayerVisor.hpp CPlayerVisor.cpp CSamusHud.hpp CSamusHud.cpp + CPauseScreenBlur.hpp CPauseScreenBlur.cpp CPauseScreen.hpp CPauseScreen.cpp + CPauseScreenBase.hpp CPauseScreenBase.cpp CFaceplateDecoration.hpp CFaceplateDecoration.cpp CInventoryScreen.hpp CInventoryScreen.cpp + CLogBookScreen.hpp CLogBookScreen.cpp + COptionsScreen.hpp COptionsScreen.cpp + CSamusDoll.hpp CSamusDoll.cpp MP1.hpp MP1.cpp ${MP1_PLAT_SOURCES} ${MP1_WORLD_SOURCES}) diff --git a/Runtime/MP1/COptionsScreen.cpp b/Runtime/MP1/COptionsScreen.cpp new file mode 100644 index 000000000..e69de29bb diff --git a/Runtime/MP1/COptionsScreen.hpp b/Runtime/MP1/COptionsScreen.hpp new file mode 100644 index 000000000..e69de29bb diff --git a/Runtime/MP1/CPauseScreen.cpp b/Runtime/MP1/CPauseScreen.cpp index 2d05850db..19ffdd11c 100644 --- a/Runtime/MP1/CPauseScreen.cpp +++ b/Runtime/MP1/CPauseScreen.cpp @@ -1,21 +1,21 @@ -#include "CPauseScreen.hpp" +#include "CPauseScreenBlur.hpp" namespace urde { namespace MP1 { -CPauseScreen::CPauseScreen() +CPauseScreenBlur::CPauseScreenBlur() { } -bool CPauseScreen::CheckLoadComplete() +bool CPauseScreenBlur::CheckLoadComplete() { return false; } -void CPauseScreen::OnNewInGameGuiState(EInGameGuiState state, CStateManager& stateMgr) +void CPauseScreenBlur::OnNewInGameGuiState(EInGameGuiState state, CStateManager& stateMgr) { } diff --git a/Runtime/MP1/CPauseScreen.hpp b/Runtime/MP1/CPauseScreen.hpp index dc46ecd19..54256c7b1 100644 --- a/Runtime/MP1/CPauseScreen.hpp +++ b/Runtime/MP1/CPauseScreen.hpp @@ -2,28 +2,59 @@ #define __URDE_CPAUSESCREEN_HPP__ #include "CInGameGuiManager.hpp" +#include "Editor/ProjectResourceFactoryBase.hpp" +#include "CPauseScreenBase.hpp" namespace urde { +class CDependencyGroup; + namespace MP1 { class CPauseScreen { - union - { - struct - { - bool x50_24_ : 1; - bool x50_25_ : 1; - }; - u32 _dummy = 0; - }; public: - CPauseScreen(); - bool CheckLoadComplete(); - void OnNewInGameGuiState(EInGameGuiState state, CStateManager& stateMgr); - bool GetX50_25() const { return x50_25_; } + enum class ESubScreen + { + LogBook, + Options, + Inventory, + Invalid + }; + +private: + u32 x0_w1; + u32 x4_ = 2; + ESubScreen x8_ = ESubScreen::Invalid; + ESubScreen xc_ = ESubScreen::Invalid; + float x10_ = 0.f; + TLockedToken x14_strgPauseScreen; + const CDependencyGroup& x20_suitDgrp; + const CDependencyGroup& x24_ballDgrp; + TLockedToken x28_pauseScreenInstructions; + CGuiFrame* x34_loadedPauseScreenInstructions = nullptr; + CGuiTextPane* x38_textpane_l1 = nullptr; + CGuiTextPane* x3c_textpane_r = nullptr; + CGuiTextPane* x40_textpane_a = nullptr; + CGuiTextPane* x48_textpane_return = nullptr; + CGuiTextPane* x4c_textpane_next = nullptr; + CGuiTextPane* x50_textpane_back = nullptr; + ResId x54_frmePauseScreenId; + u32 x58_frmePauseScreenBufSz; + std::unique_ptr x5c_frmePauseScreenBuf; + std::shared_ptr x60_loadTok; + rstl::reserved_vector, 2> x64_frames; + u32 x78_activeIdx = 0; + rstl::reserved_vector, 2> x7c_screens; + bool x90_resourcesLoaded = false; + bool x91_inPauseScreen = true; + +public: + CPauseScreen(u32 w1, const CDependencyGroup& suitDgrp, const CDependencyGroup& ballDgrp); + void ProcessControllerInput(const CStateManager& mgr, const CFinalInput& input); + void Update(float dt, CRandom16& rand, const CStateManager& mgr); + void PreDraw(); }; } diff --git a/Runtime/MP1/CPauseScreenBase.cpp b/Runtime/MP1/CPauseScreenBase.cpp new file mode 100644 index 000000000..373fba203 --- /dev/null +++ b/Runtime/MP1/CPauseScreenBase.cpp @@ -0,0 +1,102 @@ +#include "CPauseScreenBase.hpp" +#include "GuiSys/CGuiFrame.hpp" +#include "GuiSys/CGuiTableGroup.hpp" +#include "GuiSys/CGuiSliderGroup.hpp" +#include "GuiSys/CGuiModel.hpp" +#include "GuiSys/CGuiTextPane.hpp" +#include "GuiSys/CAuiImagePane.hpp" +#include "GameGlobalObjects.hpp" + +namespace urde +{ +namespace MP1 +{ + +CPauseScreenBase::CPauseScreenBase(const CStateManager& mgr, const CGuiFrame& frame, const CStringTable& pauseStrg) +: x4_mgr(mgr), x8_frame(frame), xc_pauseStrg(pauseStrg) +{ + InitializeFrameGlue(); +} + +void CPauseScreenBase::InitializeFrameGlue() +{ + x60_basewidget_pivot = x8_frame.FindWidget("basewidget_pivot"); + x64_basewidget_bgframe = x8_frame.FindWidget("basewidget_bgframe"); + x68_basewidget_leftside = x8_frame.FindWidget("basewidget_leftside"); + x6c_basewidget_leftlog = x8_frame.FindWidget("basewidget_leftlog"); + x70_tablegroup_leftlog = static_cast(x8_frame.FindWidget("tablegroup_leftlog")); + x74_basewidget_leftguages = x8_frame.FindWidget("basewidget_leftguages"); + x78_model_lefthighlight = static_cast(x8_frame.FindWidget("model_lefthighlight")); + x7c_basewidget_rightside = x8_frame.FindWidget("basewidget_rightside"); + x80_basewidget_rightlog = x8_frame.FindWidget("basewidget_rightlog"); + x84_tablegroup_rightlog = static_cast(x8_frame.FindWidget("tablegroup_rightlog")); + x88_basewidget_rightguages = x8_frame.FindWidget("basewidget_rightguages"); + x8c_model_righthighlight = static_cast(x8_frame.FindWidget("model_righthighlight")); + x90_model_textarrowtop = static_cast(x8_frame.FindWidget("model_textarrowtop")); + x94_model_textarrowbottom = static_cast(x8_frame.FindWidget("model_textarrowbottom")); + x98_model_scrollleftup = static_cast(x8_frame.FindWidget("model_scrollleftup")); + x9c_model_scrollleftdown = static_cast(x8_frame.FindWidget("model_scrollleftdown")); + xa0_model_scrollrightup = static_cast(x8_frame.FindWidget("model_scrollrightup")); + xa4_model_scrollrightdown = static_cast(x8_frame.FindWidget("model_scrollrightdown")); + x94_model_textarrowbottom = static_cast(x8_frame.FindWidget("model_textarrowbottom")); + x178_textpane_title = static_cast(x8_frame.FindWidget("textpane_title")); + x174_textpane_body = static_cast(x8_frame.FindWidget("textpane_body")); + x180_basewidget_yicon = x8_frame.FindWidget("basewidget_yicon"); + x17c_model_textalpha = static_cast(x8_frame.FindWidget("model_textalpha")); + x184_textpane_yicon = static_cast(x8_frame.FindWidget("textpane_yicon")); + x188_textpane_ytext = static_cast(x8_frame.FindWidget("textpane_ytext")); + x18c_slidergroup_slider = static_cast(x8_frame.FindWidget("slidergroup_slider")); + x190_tablegroup_double = static_cast(x8_frame.FindWidget("tablegroup_double")); + x194_tablegroup_triple = static_cast(x8_frame.FindWidget("tablegroup_triple")); + + for (int i=0 ; i<5 ; ++i) + { + xd8_textpane_titles.push_back(static_cast(x8_frame.FindWidget(hecl::Format("xd8_textpane_title%d", i + 1)))); + x144_model_titles.push_back(static_cast(x8_frame.FindWidget(hecl::Format("x144_model_title%d", i + 1)))); + x15c_model_righttitledecos.push_back(static_cast(x8_frame.FindWidget(hecl::Format("x15c_model_righttitledeco%d", i + 1)))); + xa8_textpane_categories.push_back(static_cast(x8_frame.FindWidget(hecl::Format("xa8_textpane_category%d", i)))); + xc0_model_categories.push_back(static_cast(x8_frame.FindWidget(hecl::Format("xc0_model_category%d", i)))); + } + + for (int i=0 ; i<20 ; ++i) + xf0_imagePanes.push_back(static_cast(x8_frame.FindWidget(GetImagePaneName(i)))); + + x70_tablegroup_leftlog->SetUserSelection(0); + x84_tablegroup_rightlog->SetUserSelection(1); + + x74_basewidget_leftguages->SetVisibility(false, ETraversalMode::Children); + x88_basewidget_rightguages->SetVisibility(false, ETraversalMode::Children); + x6c_basewidget_leftlog->SetColor(g_tweakGuiColors->GetPauseItemAmberColor()); +} + +static const char* PaneSuffixes[] = +{ + "0", + "1", + "2", + "3", + "01", + "12", + "23", + "012", + "123", + "0123", + "4", + "5", + "6", + "7", + "45", + "56", + "67", + "456", + "567", + "4567" +}; + +std::string CPauseScreenBase::GetImagePaneName(u32 i) +{ + return hecl::Format("imagepane_pane%s", PaneSuffixes[i]); +} + +} +} diff --git a/Runtime/MP1/CPauseScreenBase.hpp b/Runtime/MP1/CPauseScreenBase.hpp new file mode 100644 index 000000000..46019324a --- /dev/null +++ b/Runtime/MP1/CPauseScreenBase.hpp @@ -0,0 +1,91 @@ +#ifndef __URDE_CPAUSESCREENBASE_HPP__ +#define __URDE_CPAUSESCREENBASE_HPP__ + +#include "RetroTypes.hpp" +#include "zeus/CVector3f.hpp" +#include "GuiSys/CGuiFrame.hpp" + +namespace urde +{ +class CStateManager; +class CGuiWidget; +class CGuiTableGroup; +class CGuiModel; +class CGuiTextPane; +class CGuiSliderGroup; +class CAuiImagePane; +class CStringTable; +namespace MP1 +{ + +class CPauseScreenBase +{ + const CStateManager& x4_mgr; + const CGuiFrame& x8_frame; + const CStringTable& xc_pauseStrg; + ResId x10_ = -1; + float x14_ = 0.f; + u32 x18_ = 0; + u32 x1c_ = 0; + zeus::CVector3f x20_; + zeus::CVector3f x2c_; + float x38_ = 0.f; + zeus::CVector3f x3c_; + zeus::CVector3f x48_; + zeus::CVector3f x54_; + CGuiWidget* x60_basewidget_pivot; + CGuiWidget* x64_basewidget_bgframe; + CGuiWidget* x68_basewidget_leftside = nullptr; + CGuiWidget* x6c_basewidget_leftlog = nullptr; + CGuiTableGroup* x70_tablegroup_leftlog = nullptr; + CGuiWidget* x74_basewidget_leftguages = nullptr; + CGuiModel* x78_model_lefthighlight = nullptr; + CGuiWidget* x7c_basewidget_rightside = nullptr; + CGuiWidget* x80_basewidget_rightlog = nullptr; + CGuiTableGroup* x84_tablegroup_rightlog = nullptr; + CGuiWidget* x88_basewidget_rightguages = nullptr; + CGuiModel* x8c_model_righthighlight = nullptr; + CGuiModel* x90_model_textarrowtop; + CGuiModel* x94_model_textarrowbottom; + CGuiModel* x98_model_scrollleftup; + CGuiModel* x9c_model_scrollleftdown; + CGuiModel* xa0_model_scrollrightup; + CGuiModel* xa4_model_scrollrightdown; + rstl::reserved_vector xa8_textpane_categories; + rstl::reserved_vector xc0_model_categories; + rstl::reserved_vector xd8_textpane_titles; + rstl::reserved_vector xf0_imagePanes; + rstl::reserved_vector x144_model_titles; + rstl::reserved_vector x15c_model_righttitledecos; + CGuiTextPane* x174_textpane_body = nullptr; + CGuiTextPane* x178_textpane_title = nullptr; + CGuiModel* x17c_model_textalpha; + CGuiWidget* x180_basewidget_yicon = nullptr; + CGuiTextPane* x184_textpane_yicon = nullptr; + CGuiTextPane* x188_textpane_ytext = nullptr; + CGuiSliderGroup* x18c_slidergroup_slider = nullptr; + CGuiTableGroup* x190_tablegroup_double = nullptr; + CGuiTableGroup* x194_tablegroup_triple = nullptr; + union + { + struct + { + bool x198_24_ : 1; + bool x198_25_ : 1; + bool x198_26_ : 1; + bool x198_27_ : 1; + bool x198_28_ : 1; + bool x198_29_ : 1; + }; + u32 _dummy = 0; + }; + void InitializeFrameGlue(); + static std::string GetImagePaneName(u32 i); +public: + CPauseScreenBase(const CStateManager& mgr, const CGuiFrame& frame, const CStringTable& pauseStrg); +}; + +} +} + +#endif // __URDE_CPAUSESCREENBASE_HPP__ diff --git a/Runtime/MP1/CPauseScreenBlur.cpp b/Runtime/MP1/CPauseScreenBlur.cpp new file mode 100644 index 000000000..e69de29bb diff --git a/Runtime/MP1/CPauseScreenBlur.hpp b/Runtime/MP1/CPauseScreenBlur.hpp new file mode 100644 index 000000000..f3b4e5b49 --- /dev/null +++ b/Runtime/MP1/CPauseScreenBlur.hpp @@ -0,0 +1,33 @@ +#ifndef __URDE_CPAUSESCREENBLUR_HPP__ +#define __URDE_CPAUSESCREENBLUR_HPP__ + +#include "CInGameGuiManagerCommon.hpp" + +namespace urde +{ +class CStateManager; +namespace MP1 +{ + +class CPauseScreenBlur +{ + union + { + struct + { + bool x50_24_ : 1; + bool x50_25_ : 1; + }; + u32 _dummy = 0; + }; +public: + CPauseScreenBlur(); + bool CheckLoadComplete(); + void OnNewInGameGuiState(EInGameGuiState state, CStateManager& stateMgr); + bool GetX50_25() const { return x50_25_; } +}; + +} +} + +#endif // __URDE_CPAUSESCREENBLUR_HPP__ diff --git a/Runtime/MP1/CSamusDoll.cpp b/Runtime/MP1/CSamusDoll.cpp new file mode 100644 index 000000000..5038e8e75 --- /dev/null +++ b/Runtime/MP1/CSamusDoll.cpp @@ -0,0 +1,16 @@ +#include "CSamusDoll.hpp" + +namespace urde +{ +namespace MP1 +{ + +CSamusDoll::CSamusDoll(const CDependencyGroup& suitDgrp, const CDependencyGroup& ballDgrp, + CPlayerState::EPlayerSuit suit, CPlayerState::EBeamId beam, + bool hasSpiderBall, bool hasGrappleBeam) +{ + +} + +} +} diff --git a/Runtime/MP1/CSamusDoll.hpp b/Runtime/MP1/CSamusDoll.hpp new file mode 100644 index 000000000..6f6e67c6e --- /dev/null +++ b/Runtime/MP1/CSamusDoll.hpp @@ -0,0 +1,35 @@ +#ifndef __URDE_CSAMUSDOLL_HPP__ +#define __URDE_CSAMUSDOLL_HPP__ + +#include "CPlayerState.hpp" +#include "CToken.hpp" +#include "Character/CModelData.hpp" + +namespace urde +{ +class CDependencyGroup; +namespace MP1 +{ + +class CSamusDoll +{ + std::vector x0_depToks; + zeus::CTransform x10_; + float x40_ = 0.f; + CPlayerState::EPlayerSuit x44_suit; + CPlayerState::EBeamId x48_beam; + bool x4c_intoBallComplete = false; + bool x4d_morphball = false; + std::experimental::optional xc8_suitModel1; + rstl::reserved_vector, 2> x118_suitModel1and2; + std::experimental::optional x134_suitModelBoots; +public: + CSamusDoll(const CDependencyGroup& suitDgrp, const CDependencyGroup& ballDgrp, + CPlayerState::EPlayerSuit suit, CPlayerState::EBeamId beam, + bool hasSpiderBall, bool hasGrappleBeam); +}; + +} +} + +#endif // __URDE_CSAMUSDOLL_HPP__ diff --git a/Runtime/MP1/CSamusFaceReflection.cpp b/Runtime/MP1/CSamusFaceReflection.cpp index cad00d0f7..6ec870a00 100644 --- a/Runtime/MP1/CSamusFaceReflection.cpp +++ b/Runtime/MP1/CSamusFaceReflection.cpp @@ -16,5 +16,10 @@ CSamusFaceReflection::CSamusFaceReflection(CStateManager& stateMgr) x0_modelData.AnimationData()->SetAnimation(parms, false); } +void CSamusFaceReflection::PreDraw(const CStateManager& stateMgr) +{ + +} + } } diff --git a/Runtime/MP1/CSamusFaceReflection.hpp b/Runtime/MP1/CSamusFaceReflection.hpp index 2a0536638..30e472ce8 100644 --- a/Runtime/MP1/CSamusFaceReflection.hpp +++ b/Runtime/MP1/CSamusFaceReflection.hpp @@ -19,6 +19,7 @@ class CSamusFaceReflection bool x70_ = true; public: CSamusFaceReflection(CStateManager& stateMgr); + void PreDraw(const CStateManager& stateMgr); }; }