2018-10-07 03:42:33 +00:00
|
|
|
#pragma once
|
2017-04-26 06:43:48 +00:00
|
|
|
|
|
|
|
#include "CInGameGuiManagerCommon.hpp"
|
2017-05-29 19:55:44 +00:00
|
|
|
#include "CToken.hpp"
|
|
|
|
#include "Camera/CCameraFilter.hpp"
|
2017-05-30 03:45:31 +00:00
|
|
|
#include "Graphics/CTexture.hpp"
|
2017-06-01 05:34:24 +00:00
|
|
|
#include "Graphics/Shaders/CTexturedQuadFilter.hpp"
|
|
|
|
#include "Graphics/Shaders/CScanLinesFilter.hpp"
|
2017-04-26 06:43:48 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
namespace urde {
|
2017-04-26 06:43:48 +00:00
|
|
|
class CStateManager;
|
2017-05-29 19:55:44 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
namespace MP1 {
|
|
|
|
|
|
|
|
class CPauseScreenBlur {
|
|
|
|
enum class EState { InGame, MapScreen, SaveGame, HUDMessage, Pause };
|
2017-05-29 19:55:44 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
TLockedToken<CTexture> x4_mapLightQuarter;
|
|
|
|
EState x10_prevState = EState::InGame;
|
|
|
|
EState x14_nextState = EState::InGame;
|
|
|
|
float x18_blurAmt = 0.f;
|
|
|
|
CCameraBlurPass x1c_camBlur;
|
|
|
|
CTexturedQuadFilter m_quarterFilter = {EFilterType::Multiply, x4_mapLightQuarter};
|
|
|
|
CScanLinesFilterEven m_linesFilter = {EFilterType::Multiply};
|
|
|
|
|
|
|
|
union {
|
|
|
|
struct {
|
|
|
|
bool x50_24_blurring : 1;
|
|
|
|
bool x50_25_gameDraw : 1;
|
2017-04-26 06:43:48 +00:00
|
|
|
};
|
2018-12-08 05:30:43 +00:00
|
|
|
u32 _dummy = 0;
|
|
|
|
};
|
|
|
|
void OnBlurComplete(bool);
|
|
|
|
void SetState(EState state);
|
2017-05-29 19:55:44 +00:00
|
|
|
|
2017-04-26 06:43:48 +00:00
|
|
|
public:
|
2018-12-08 05:30:43 +00:00
|
|
|
CPauseScreenBlur();
|
|
|
|
void OnNewInGameGuiState(EInGameGuiState state, CStateManager& stateMgr);
|
|
|
|
bool IsGameDraw() const { return x50_25_gameDraw; }
|
|
|
|
void Update(float dt, const CStateManager& stateMgr, bool);
|
|
|
|
void Draw(const CStateManager& stateMgr) const;
|
|
|
|
float GetBlurAmt() const { return std::fabs(x18_blurAmt); }
|
|
|
|
bool IsNotTransitioning() const { return x10_prevState == x14_nextState; }
|
2017-04-26 06:43:48 +00:00
|
|
|
};
|
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
} // namespace MP1
|
|
|
|
} // namespace urde
|