2016-04-13 06:07:23 +00:00
|
|
|
#ifndef __URDE_CDECALMANAGER_HPP__
|
|
|
|
#define __URDE_CDECALMANAGER_HPP__
|
2015-08-18 05:54:43 +00:00
|
|
|
|
2016-04-07 07:10:08 +00:00
|
|
|
#include "RetroTypes.hpp"
|
|
|
|
#include "rstl.hpp"
|
|
|
|
#include "optional.hpp"
|
|
|
|
#include "CToken.hpp"
|
2016-08-04 22:24:28 +00:00
|
|
|
#include "CDecal.hpp"
|
2017-03-04 04:31:08 +00:00
|
|
|
#include "zeus/CFrustum.hpp"
|
2016-04-07 07:10:08 +00:00
|
|
|
|
2016-03-04 23:04:53 +00:00
|
|
|
namespace urde
|
2015-08-18 05:54:43 +00:00
|
|
|
{
|
2017-03-04 04:31:08 +00:00
|
|
|
class CStateManager;
|
|
|
|
|
2016-04-07 07:10:08 +00:00
|
|
|
class CDecalManager
|
|
|
|
{
|
|
|
|
struct SDecal
|
|
|
|
{
|
2017-03-04 04:31:08 +00:00
|
|
|
std::experimental::optional<CDecal> x0_decal;
|
|
|
|
TAreaId x70_areaId;
|
|
|
|
u8 x74_index;
|
|
|
|
u8 x75_flags : 2;
|
2016-04-07 07:10:08 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static bool m_PoolInitialized;
|
|
|
|
static s32 m_FreeIndex;
|
|
|
|
static float m_DeltaTimeSinceLastDecalCreation;
|
|
|
|
static s32 m_LastDecalCreatedIndex;
|
2017-08-13 05:26:14 +00:00
|
|
|
static CAssetId m_LastDecalCreatedAssetId;
|
2016-04-07 07:10:08 +00:00
|
|
|
static rstl::reserved_vector<SDecal, 64> m_DecalPool;
|
|
|
|
static rstl::reserved_vector<s32, 64> m_ActiveIndexList;
|
|
|
|
public:
|
|
|
|
static void Initialize();
|
2017-01-22 01:40:12 +00:00
|
|
|
static void Shutdown();
|
2017-03-04 04:31:08 +00:00
|
|
|
static void AddToRenderer(const zeus::CFrustum& frustum, const CStateManager& mgr);
|
2017-03-24 05:30:16 +00:00
|
|
|
static void Update(float dt, CStateManager& mgr);
|
2018-02-12 05:30:21 +00:00
|
|
|
static void AddDecal(const TToken<CDecalDescription>& decal, const zeus::CTransform& xf,
|
|
|
|
bool b1, CStateManager& mgr);
|
2015-08-18 05:54:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2016-04-13 06:07:23 +00:00
|
|
|
#endif // __URDE_CDECALMANAGER_HPP__
|