metaforce/Runtime/Particle/CDecalManager.hpp

42 lines
1016 B
C++
Raw Normal View History

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"
#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
{
class CStateManager;
2016-04-07 07:10:08 +00:00
class CDecalManager
{
struct SDecal
{
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();
static void Shutdown();
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);
2015-08-18 05:54:43 +00:00
};
}
2016-04-13 06:07:23 +00:00
#endif // __URDE_CDECALMANAGER_HPP__