2018-10-07 03:42:33 +00:00
|
|
|
#pragma once
|
2015-08-27 00:23:46 +00:00
|
|
|
|
2019-09-28 02:53:03 +00:00
|
|
|
#include <memory>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
#include "Runtime/CMFGameBase.hpp"
|
2019-09-29 00:30:53 +00:00
|
|
|
#include "Runtime/Camera/CCameraFilter.hpp"
|
2019-09-28 02:53:03 +00:00
|
|
|
#include "Runtime/MP1/CInGameGuiManager.hpp"
|
2015-08-27 00:23:46 +00:00
|
|
|
|
2021-04-10 08:42:06 +00:00
|
|
|
namespace metaforce {
|
2016-08-15 20:58:07 +00:00
|
|
|
class CStateManager;
|
|
|
|
class CToken;
|
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
namespace MP1 {
|
2015-08-27 00:23:46 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
enum class EGameFlowState { InGame = 0, Paused, SamusDied, CinematicSkip };
|
2017-02-18 02:19:50 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
class CMFGame : public CMFGameBase {
|
|
|
|
std::shared_ptr<CStateManager> x14_stateManager;
|
|
|
|
std::shared_ptr<CInGameGuiManager> x18_guiManager;
|
|
|
|
EGameFlowState x1c_flowState = EGameFlowState::InGame;
|
|
|
|
float x20_cineSkipTime;
|
|
|
|
u32 x24_ = 0;
|
|
|
|
TUniqueId x28_skippedCineCam = kInvalidUniqueId;
|
2020-04-21 07:22:41 +00:00
|
|
|
bool x2a_24_initialized : 1 = false;
|
|
|
|
bool x2a_25_samusAlive : 1 = true;
|
2017-02-18 02:19:50 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
bool IsCameraActiveFlow() const {
|
|
|
|
return (x1c_flowState == EGameFlowState::InGame || x1c_flowState == EGameFlowState::SamusDied);
|
|
|
|
}
|
2017-02-18 02:19:50 +00:00
|
|
|
|
2015-08-27 00:23:46 +00:00
|
|
|
public:
|
2018-12-08 05:30:43 +00:00
|
|
|
CMFGame(const std::weak_ptr<CStateManager>& stateMgr, const std::weak_ptr<CInGameGuiManager>& guiMgr,
|
|
|
|
const CArchitectureQueue&);
|
2019-08-09 19:46:49 +00:00
|
|
|
~CMFGame() override;
|
|
|
|
CIOWin::EMessageReturn OnMessage(const CArchitectureMessage& msg, CArchitectureQueue& queue) override;
|
2018-12-08 05:30:43 +00:00
|
|
|
void Touch();
|
2020-03-30 01:55:58 +00:00
|
|
|
void Draw() override;
|
2018-12-08 05:30:43 +00:00
|
|
|
void PlayerDied();
|
|
|
|
void UnpauseGame();
|
|
|
|
void EnterMessageScreen(float time);
|
|
|
|
void SaveGame();
|
|
|
|
void EnterLogBook();
|
|
|
|
void PauseGame();
|
|
|
|
void EnterMapScreen();
|
2015-08-27 00:23:46 +00:00
|
|
|
};
|
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
class CMFGameLoader : public CMFGameLoaderBase {
|
|
|
|
std::shared_ptr<CStateManager> x14_stateMgr;
|
|
|
|
std::shared_ptr<CInGameGuiManager> x18_guiMgr;
|
|
|
|
std::vector<CToken> x1c_loadList;
|
2020-04-21 07:22:41 +00:00
|
|
|
bool x2c_24_initialized : 1 = false;
|
|
|
|
bool x2c_25_transitionFinished : 1 = false;
|
2016-08-15 20:58:07 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
void MakeLoadDependencyList();
|
2016-10-09 07:45:04 +00:00
|
|
|
|
2015-08-27 00:23:46 +00:00
|
|
|
public:
|
2018-12-08 05:30:43 +00:00
|
|
|
CMFGameLoader();
|
2019-08-09 19:46:49 +00:00
|
|
|
~CMFGameLoader() override;
|
|
|
|
EMessageReturn OnMessage(const CArchitectureMessage& msg, CArchitectureQueue& queue) override;
|
2020-03-30 01:55:58 +00:00
|
|
|
void Draw() override;
|
2015-08-27 00:23:46 +00:00
|
|
|
};
|
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
} // namespace MP1
|
2021-04-10 08:42:06 +00:00
|
|
|
} // namespace metaforce
|