2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 06:27:43 +00:00

New code style refactor

This commit is contained in:
Jack Andersen
2018-12-07 19:30:43 -10:00
parent 41ae32be31
commit 636c82a568
1451 changed files with 171430 additions and 203303 deletions

View File

@@ -7,40 +7,39 @@
#include "CDecal.hpp"
#include "zeus/CFrustum.hpp"
namespace urde
{
namespace urde {
class CStateManager;
class CDecalManager
{
struct SDecal
{
std::experimental::optional<CDecal> x0_decal;
TAreaId x70_areaId;
s8 x74_index;
bool x75_24_notIce : 1;
SDecal(const std::experimental::optional<CDecal>& decal, TAreaId aid, s8 idx, bool notIce)
: x0_decal(decal), x70_areaId(aid), x74_index(idx) { x75_24_notIce = notIce; }
};
class CDecalManager {
struct SDecal {
std::experimental::optional<CDecal> x0_decal;
TAreaId x70_areaId;
s8 x74_index;
bool x75_24_notIce : 1;
SDecal(const std::experimental::optional<CDecal>& decal, TAreaId aid, s8 idx, bool notIce)
: x0_decal(decal), x70_areaId(aid), x74_index(idx) {
x75_24_notIce = notIce;
}
};
static bool m_PoolInitialized;
static s32 m_FreeIndex;
static float m_DeltaTimeSinceLastDecalCreation;
static s32 m_LastDecalCreatedIndex;
static CAssetId m_LastDecalCreatedAssetId;
static rstl::reserved_vector<SDecal, 64> m_DecalPool;
static rstl::reserved_vector<s32, 64> m_ActiveIndexList;
static rstl::reserved_vector<s32, 64>::iterator RemoveFromActiveList(rstl::reserved_vector<s32, 64>::iterator it,
s32 idx);
static bool m_PoolInitialized;
static s32 m_FreeIndex;
static float m_DeltaTimeSinceLastDecalCreation;
static s32 m_LastDecalCreatedIndex;
static CAssetId m_LastDecalCreatedAssetId;
static rstl::reserved_vector<SDecal, 64> m_DecalPool;
static rstl::reserved_vector<s32, 64> m_ActiveIndexList;
static rstl::reserved_vector<s32, 64>::iterator
RemoveFromActiveList(rstl::reserved_vector<s32, 64>::iterator it, s32 idx);
public:
static void Initialize();
static void Reinitialize();
static void Shutdown();
static void AddToRenderer(const zeus::CFrustum& frustum, const CStateManager& mgr);
static void Update(float dt, CStateManager& mgr);
static void AddDecal(const TToken<CDecalDescription>& decal, const zeus::CTransform& xf,
bool notIce, CStateManager& mgr);
static void Initialize();
static void Reinitialize();
static void Shutdown();
static void AddToRenderer(const zeus::CFrustum& frustum, const CStateManager& mgr);
static void Update(float dt, CStateManager& mgr);
static void AddDecal(const TToken<CDecalDescription>& decal, const zeus::CTransform& xf, bool notIce,
CStateManager& mgr);
};
}
} // namespace urde