metaforce/Runtime/MP1/CMFGame.hpp

66 lines
1.8 KiB
C++
Raw Normal View History

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