mirror of https://github.com/AxioDL/metaforce.git
Initial CBodyState stubs
This commit is contained in:
parent
8f4cc0876e
commit
b3687e46cc
|
@ -0,0 +1,138 @@
|
|||
#ifndef CBODYSTATE_HPP
|
||||
#define CBODYSTATE_HPP
|
||||
#include "RetroTypes.hpp"
|
||||
|
||||
namespace urde
|
||||
{
|
||||
namespace pas
|
||||
{
|
||||
enum class ELocomotionType
|
||||
{
|
||||
};
|
||||
|
||||
enum class ELocomotionAnim
|
||||
{
|
||||
};
|
||||
|
||||
}
|
||||
class CBodyController;
|
||||
class CStateManager;
|
||||
class CBodyState
|
||||
{
|
||||
public:
|
||||
virtual bool IsInAir(const CBodyController&) const { return false; }
|
||||
virtual bool IsDead() const { return false; }
|
||||
virtual bool IsMoving() const { return false; }
|
||||
virtual bool ApplyGravity() const { return true; }
|
||||
virtual bool ApplyHeadTracking() const { return true; }
|
||||
virtual bool ApplyAnimationDeltas() const { return true; }
|
||||
virtual bool CanShoot() const { return false; }
|
||||
virtual void Start(CBodyController&, CStateManager&) = 0;
|
||||
virtual void UpdateBody(float, CBodyController&, CStateManager&) = 0;
|
||||
virtual void Shutdown(CBodyController&)=0;
|
||||
};
|
||||
|
||||
class CBSAttack : public CBodyState
|
||||
{
|
||||
public:
|
||||
virtual bool CanShoot() const { return false; }
|
||||
virtual void Start(CBodyController &, CStateManager &) {}
|
||||
virtual void UpdateBody(float, CBodyController &, CStateManager&);
|
||||
virtual void Shutdown(CBodyController&) {}
|
||||
};
|
||||
|
||||
class CBSDie : public CBodyState
|
||||
{
|
||||
bool x8_isDead = false;
|
||||
public:
|
||||
bool IsDead() const { return x8_isDead; }
|
||||
void Start(CBodyController &, CStateManager &) {}
|
||||
void UpdateBody(float, CBodyController &, CStateManager&) {}
|
||||
void Shutdown(CBodyController &) {}
|
||||
};
|
||||
|
||||
class CBSFall : public CBodyState
|
||||
{
|
||||
public:
|
||||
void Start(CBodyController &, CStateManager &) {}
|
||||
void UpdateBody(float, CBodyController &, CStateManager&) {}
|
||||
void Shutdown(CBodyController &) {}
|
||||
};
|
||||
|
||||
class CBSGetup : public CBodyState
|
||||
{
|
||||
public:
|
||||
void Start(CBodyController &, CStateManager &) {}
|
||||
void UpdateBody(float, CBodyController &, CStateManager&) {}
|
||||
void Shutdown(CBodyController &) {}
|
||||
};
|
||||
|
||||
class CBSKnockBack : public CBodyState
|
||||
{
|
||||
public:
|
||||
bool IsMoving() const { return true; }
|
||||
void Start(CBodyController &, CStateManager &) {}
|
||||
void UpdateBody(float, CBodyController &, CStateManager&) {}
|
||||
void Shutdown(CBodyController &) {}
|
||||
};
|
||||
|
||||
class CBSLieOnGround : public CBodyState
|
||||
{
|
||||
public:
|
||||
void Start(CBodyController &, CStateManager &) {}
|
||||
void UpdateBody(float, CBodyController &, CStateManager&) {}
|
||||
void Shutdown(CBodyController &) {}
|
||||
};
|
||||
|
||||
class CBSStep : public CBodyState
|
||||
{
|
||||
public:
|
||||
bool IsMoving() const { return true; }
|
||||
bool CanShoot() const { return true; }
|
||||
void Start(CBodyController &, CStateManager &) {}
|
||||
void UpdateBody(float, CBodyController &, CStateManager&) {}
|
||||
void Shutdown(CBodyController &) {}
|
||||
};
|
||||
|
||||
class CBSTurn : public CBodyState
|
||||
{
|
||||
public:
|
||||
virtual bool CanShoot() const { return true; }
|
||||
virtual void Start(CBodyController &, CStateManager &) {}
|
||||
virtual void UpdateBody(float, CBodyController &, CStateManager&) {}
|
||||
virtual void Shutdown(CBodyController &) {}
|
||||
virtual void GetBodyStateTransition(float, CBodyController&);
|
||||
};
|
||||
|
||||
class CBSFlyerTurn : public CBSTurn
|
||||
{
|
||||
public:
|
||||
virtual void Start(CBodyController &, CStateManager &) {}
|
||||
virtual void UpdateBody(float, CBodyController &, CStateManager&) {}
|
||||
};
|
||||
|
||||
class CBSLoopAttack : public CBodyState
|
||||
{
|
||||
public:
|
||||
virtual bool CanShoot() const { return true; }
|
||||
virtual void Start(CBodyController &, CStateManager &) {}
|
||||
virtual void UpdateBody(float, CBodyController &, CStateManager&);
|
||||
virtual void Shutdown(CBodyController&) {}
|
||||
};
|
||||
|
||||
class CBSLocomotion : public CBodyState
|
||||
{
|
||||
public:
|
||||
virtual bool IsMoving() const = 0;
|
||||
virtual bool CanShoot() const { return true; }
|
||||
virtual void Start(CBodyController &, CStateManager &) {}
|
||||
virtual void UpdateBody(float, CBodyController &, CStateManager&) {}
|
||||
virtual void Shutdown() const {}
|
||||
virtual bool IsPitchable() const { return true; }
|
||||
virtual float GetLocomotionSpeed(pas::ELocomotionType, pas::ELocomotionAnim) = 0;
|
||||
virtual void ApplyLocomotionPysics(float, CBodyController&) {}
|
||||
virtual void UpdateLocomotionAnimation(float, const CBodyController& )=0;
|
||||
virtual void GetBodyStateTransition(float, CBodyState&) {}
|
||||
};
|
||||
}
|
||||
#endif // CBODYSTATE_HPP
|
|
@ -11,4 +11,5 @@ add_library(RuntimeCommonCharacter
|
|||
CTransitionDatabaseGame.hpp
|
||||
CHierarchyPoseBuilder.hpp CHierarchyPoseBuilder.cpp
|
||||
CPoseAsTransforms.hpp CPoseAsTransforms.cpp
|
||||
CVirtualBone.hpp CVirtualBone.cpp)
|
||||
CVirtualBone.hpp CVirtualBone.cpp
|
||||
CBodyState.hpp)
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
#include "CDecalManager.hpp"
|
||||
#include "CDecalDescription.hpp"
|
||||
|
||||
namespace urde
|
||||
{
|
||||
bool CDecalManager::m_PoolInitialized = false;
|
||||
s32 CDecalManager::m_FreeIndex = 63;
|
||||
float CDecalManager::m_DeltaTimeSinceLastDecalCreation = 0.f;
|
||||
s32 CDecalManager::m_LastDecalCreatedIndex = -1;
|
||||
TResId CDecalManager::m_LastDecalCreatedAssetId = -1;
|
||||
|
||||
void CDecalManager::Initialize()
|
||||
{
|
||||
if (m_PoolInitialized)
|
||||
return;
|
||||
|
||||
m_DecalPool.clear();
|
||||
m_DecalPool.resize(64);
|
||||
|
||||
m_FreeIndex = 63;
|
||||
m_PoolInitialized = true;
|
||||
m_DeltaTimeSinceLastDecalCreation = 0.f;
|
||||
m_LastDecalCreatedIndex = -1;
|
||||
m_LastDecalCreatedAssetId = -1;
|
||||
}
|
||||
}
|
|
@ -1,15 +1,41 @@
|
|||
#ifndef __PSHAG_CDECALMANAGER_HPP__
|
||||
#define __PSHAG_CDECALMANAGER_HPP__
|
||||
|
||||
#include "RetroTypes.hpp"
|
||||
#include "rstl.hpp"
|
||||
#include "optional.hpp"
|
||||
#include "CToken.hpp"
|
||||
|
||||
namespace urde
|
||||
{
|
||||
|
||||
class CDecalManager
|
||||
class CDecal
|
||||
{
|
||||
public:
|
||||
static void Initialize()
|
||||
class CQuadDecal
|
||||
{
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
class CDecalManager
|
||||
{
|
||||
struct SDecal
|
||||
{
|
||||
TAreaId m_areaId;
|
||||
std::experimental::optional<CDecal> x60_decal;
|
||||
SDecal() = default;
|
||||
SDecal(std::experimental::optional<CDecal>&&, TAreaId);
|
||||
};
|
||||
|
||||
static bool m_PoolInitialized;
|
||||
static s32 m_FreeIndex;
|
||||
static float m_DeltaTimeSinceLastDecalCreation;
|
||||
static s32 m_LastDecalCreatedIndex;
|
||||
static TResId m_LastDecalCreatedAssetId;
|
||||
static rstl::reserved_vector<SDecal, 64> m_DecalPool;
|
||||
static rstl::reserved_vector<s32, 64> m_ActiveIndexList;
|
||||
public:
|
||||
static void Initialize();
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -138,7 +138,6 @@ void CParticleElectric::SetLocalScale(const zeus::CVector3f& scale)
|
|||
x438_28_x450_28 = true;
|
||||
if (x438_26_x450_26_HaveEPSM)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -71,16 +71,18 @@ private:
|
|||
u8 dummy = 0;
|
||||
};
|
||||
|
||||
void RenderSwooshes();
|
||||
public:
|
||||
|
||||
|
||||
CParticleElectric(const TToken<CElectricDescription>& desc);
|
||||
|
||||
void SetupLineGXMaterial();
|
||||
void RenderLines();
|
||||
void Update(double);
|
||||
void RenderLines();
|
||||
void RenderSwooshes();
|
||||
void Render();
|
||||
void CalculateFractal(s32, s32, float, float);
|
||||
void CalculatePoints();
|
||||
void SetOrientation(const zeus::CTransform&);
|
||||
void SetTranslation(const zeus::CVector3f&);
|
||||
void SetGlobalOrientation(const zeus::CTransform&);
|
||||
|
|
Loading…
Reference in New Issue