2017-04-26 06:43:48 +00:00
|
|
|
#ifndef __URDE_CPAUSESCREENBLUR_HPP__
|
|
|
|
#define __URDE_CPAUSESCREENBLUR_HPP__
|
|
|
|
|
|
|
|
#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
|
|
|
|
|
|
|
namespace urde
|
|
|
|
{
|
|
|
|
class CStateManager;
|
2017-05-29 19:55:44 +00:00
|
|
|
|
2017-04-26 06:43:48 +00:00
|
|
|
namespace MP1
|
|
|
|
{
|
|
|
|
|
|
|
|
class CPauseScreenBlur
|
|
|
|
{
|
2017-05-29 19:55:44 +00:00
|
|
|
enum class EState
|
|
|
|
{
|
|
|
|
InGame,
|
|
|
|
MapScreen,
|
|
|
|
SaveGame,
|
|
|
|
HUDMessage,
|
|
|
|
Pause
|
|
|
|
};
|
|
|
|
|
|
|
|
TLockedToken<CTexture> x4_mapLightQuarter;
|
|
|
|
EState x10_prevState = EState::InGame;
|
|
|
|
EState x14_nextState = EState::InGame;
|
2017-05-18 19:27:21 +00:00
|
|
|
float x18_blurAmt = 0.f;
|
2017-05-29 19:55:44 +00:00
|
|
|
CCameraBlurPass x1c_camBlur;
|
2017-06-01 05:34:24 +00:00
|
|
|
CTexturedQuadFilter m_quarterFilter = { EFilterType::Multiply, x4_mapLightQuarter };
|
2017-06-01 19:10:06 +00:00
|
|
|
CScanLinesFilterEven m_linesFilter = { EFilterType::Multiply };
|
2017-05-29 19:55:44 +00:00
|
|
|
|
2017-04-26 06:43:48 +00:00
|
|
|
union
|
|
|
|
{
|
|
|
|
struct
|
|
|
|
{
|
2017-05-29 19:55:44 +00:00
|
|
|
bool x50_24_blurring : 1;
|
|
|
|
bool x50_25_gameDraw : 1;
|
2017-04-26 06:43:48 +00:00
|
|
|
};
|
|
|
|
u32 _dummy = 0;
|
|
|
|
};
|
2017-05-29 19:55:44 +00:00
|
|
|
void OnBlurComplete(bool);
|
|
|
|
void SetState(EState state);
|
|
|
|
|
2017-04-26 06:43:48 +00:00
|
|
|
public:
|
|
|
|
CPauseScreenBlur();
|
|
|
|
void OnNewInGameGuiState(EInGameGuiState state, CStateManager& stateMgr);
|
2017-05-29 19:55:44 +00:00
|
|
|
bool IsGameDraw() const { return x50_25_gameDraw; }
|
2017-05-18 19:27:21 +00:00
|
|
|
void Update(float dt, const CStateManager& stateMgr, bool);
|
2017-05-21 16:01:04 +00:00
|
|
|
void Draw(const CStateManager& stateMgr) const;
|
2017-05-18 19:27:21 +00:00
|
|
|
float GetBlurAmt() const { return std::fabs(x18_blurAmt); }
|
2017-05-29 19:55:44 +00:00
|
|
|
bool IsNotTransitioning() const { return x10_prevState == x14_nextState; }
|
2017-04-26 06:43:48 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // __URDE_CPAUSESCREENBLUR_HPP__
|