2016-04-13 06:07:23 +00:00
|
|
|
#ifndef __URDE_CMFGAME_HPP__
|
|
|
|
#define __URDE_CMFGAME_HPP__
|
2015-08-27 00:23:46 +00:00
|
|
|
|
|
|
|
#include "CMFGameBase.hpp"
|
2017-02-12 03:17:18 +00:00
|
|
|
#include "CInGameGuiManager.hpp"
|
2017-02-18 02:19:50 +00:00
|
|
|
#include "Graphics/Shaders/CColoredQuadFilter.hpp"
|
2015-08-27 00:23:46 +00:00
|
|
|
|
2016-03-04 23:04:53 +00:00
|
|
|
namespace urde
|
2015-08-27 00:23:46 +00:00
|
|
|
{
|
2016-08-15 20:58:07 +00:00
|
|
|
class CStateManager;
|
|
|
|
class CInGameGuiManager;
|
|
|
|
class CToken;
|
|
|
|
|
2015-08-27 00:23:46 +00:00
|
|
|
namespace MP1
|
|
|
|
{
|
|
|
|
|
2017-02-18 02:19:50 +00:00
|
|
|
enum class EGameFlowState
|
|
|
|
{
|
|
|
|
InGame = 0,
|
|
|
|
Paused,
|
|
|
|
SamusDied,
|
|
|
|
CinematicSkip
|
|
|
|
};
|
|
|
|
|
2015-08-27 00:23:46 +00:00
|
|
|
class CMFGame : public CMFGameBase
|
|
|
|
{
|
2016-09-15 07:26:35 +00:00
|
|
|
std::shared_ptr<CStateManager> x14_stateManager;
|
|
|
|
std::shared_ptr<CInGameGuiManager> x18_guiManager;
|
2017-02-18 02:19:50 +00:00
|
|
|
EGameFlowState x1c_flowState = EGameFlowState::InGame;
|
|
|
|
float x20_cineSkipTime;
|
2016-09-15 07:26:35 +00:00
|
|
|
u32 x24_ = 0;
|
2017-02-18 02:19:50 +00:00
|
|
|
TUniqueId x28_skippedCineCam = kInvalidUniqueId;
|
2016-09-15 07:26:35 +00:00
|
|
|
union
|
|
|
|
{
|
|
|
|
struct
|
|
|
|
{
|
2017-02-18 02:19:50 +00:00
|
|
|
bool x2a_24_initialized : 1;
|
|
|
|
bool x2a_25_samusAlive : 1;
|
2016-09-15 07:26:35 +00:00
|
|
|
};
|
|
|
|
u8 _dummy = 0;
|
|
|
|
};
|
2017-02-18 02:19:50 +00:00
|
|
|
|
2017-06-01 05:34:24 +00:00
|
|
|
CColoredQuadFilter m_fadeToBlack = {EFilterType::Multiply};
|
2017-02-18 02:19:50 +00:00
|
|
|
|
|
|
|
bool IsCameraActiveFlow() const
|
|
|
|
{
|
|
|
|
return (x1c_flowState == EGameFlowState::InGame || x1c_flowState == EGameFlowState::SamusDied);
|
|
|
|
}
|
|
|
|
|
2015-08-27 00:23:46 +00:00
|
|
|
public:
|
2016-09-15 07:26:35 +00:00
|
|
|
CMFGame(const std::weak_ptr<CStateManager>& stateMgr, const std::weak_ptr<CInGameGuiManager>& guiMgr,
|
|
|
|
const CArchitectureQueue&);
|
2015-08-27 00:23:46 +00:00
|
|
|
CIOWin::EMessageReturn OnMessage(const CArchitectureMessage& msg, CArchitectureQueue& queue);
|
2017-02-18 02:19:50 +00:00
|
|
|
void Touch();
|
2015-08-27 00:23:46 +00:00
|
|
|
void Draw() const;
|
2017-02-18 02:19:50 +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
|
|
|
};
|
|
|
|
|
|
|
|
class CMFGameLoader : public CMFGameLoaderBase
|
|
|
|
{
|
2016-08-15 20:58:07 +00:00
|
|
|
std::shared_ptr<CStateManager> x14_stateMgr;
|
|
|
|
std::shared_ptr<CInGameGuiManager> x18_guiMgr;
|
2017-02-12 03:17:18 +00:00
|
|
|
std::vector<CToken> x1c_loadList;
|
2016-08-15 20:58:07 +00:00
|
|
|
|
|
|
|
union
|
|
|
|
{
|
|
|
|
struct
|
|
|
|
{
|
2016-10-09 07:45:04 +00:00
|
|
|
bool x2c_24_initialized : 1;
|
2017-02-12 23:56:03 +00:00
|
|
|
bool x2c_25_transitionFinished : 1;
|
2016-08-15 20:58:07 +00:00
|
|
|
};
|
|
|
|
u8 _dummy = 0;
|
|
|
|
};
|
|
|
|
|
2016-10-09 07:45:04 +00:00
|
|
|
void MakeLoadDependencyList();
|
|
|
|
|
2015-08-27 00:23:46 +00:00
|
|
|
public:
|
2016-08-15 20:58:07 +00:00
|
|
|
CMFGameLoader();
|
2015-08-27 00:23:46 +00:00
|
|
|
EMessageReturn OnMessage(const CArchitectureMessage& msg, CArchitectureQueue& queue);
|
|
|
|
void Draw() const;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-04-13 06:07:23 +00:00
|
|
|
#endif // __URDE_CMFGAME_HPP__
|