mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 09:07:43 +00:00
Implement CPlayerCameraBob
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
namespace urde
|
||||
{
|
||||
|
||||
class CStateManager;
|
||||
class CPlayerCameraBob
|
||||
{
|
||||
public:
|
||||
@@ -17,6 +18,20 @@ public:
|
||||
Zero,
|
||||
One
|
||||
};
|
||||
|
||||
enum class ECameraBobState
|
||||
{
|
||||
Zero,
|
||||
One,
|
||||
Two,
|
||||
Three,
|
||||
Four,
|
||||
Five,
|
||||
Six,
|
||||
Seven,
|
||||
Eight
|
||||
};
|
||||
|
||||
private:
|
||||
static float kCameraBobExtentX;
|
||||
static float kCameraBobExtentY;
|
||||
@@ -32,38 +47,54 @@ private:
|
||||
static float kViewWanderRollVariation;
|
||||
static float kGunBobMagnitude;
|
||||
static float kHelmetBobMagnitude;
|
||||
static const float kLandingBobDamping;
|
||||
|
||||
ECameraBobType x0_type;
|
||||
zeus::CVector2f x4_vec;
|
||||
float xc_;
|
||||
float x10_ = 0.f;
|
||||
float x10_bobMagnitude = 0.f;
|
||||
float x14_ = 0.f;
|
||||
float x18_ = 0.f;
|
||||
float x1c_ = 0.f;
|
||||
u32 x20_ = 8;
|
||||
u32 x24_ = 8;
|
||||
bool x28_ = false;
|
||||
float x18_bobTimeScale = 0.f;
|
||||
float x1c_bobTime = 0.f;
|
||||
ECameraBobState x20_oldState = ECameraBobState::Eight;
|
||||
ECameraBobState x24_curState = ECameraBobState::Eight;
|
||||
bool x28_applyLandingTrans = false;
|
||||
bool x29_ = false;
|
||||
zeus::CTransform x2c_;
|
||||
float x5c_ = 0.f;
|
||||
float x60_ = 0.f;
|
||||
float x64_ = 0.f;
|
||||
zeus::CTransform x2c_cameraBobTransform;
|
||||
zeus::CVector3f x5c_playerVelocity;
|
||||
float x68_ = 0.f;
|
||||
float x6c_ = 0.f;
|
||||
float x70_ = 0.f;
|
||||
float x70_landingTranslation = 0.f;
|
||||
float x74_ = 0.f;
|
||||
float x78_ = 0.f;
|
||||
zeus::CVector3f x7c_[4] = {zeus::CVector3f{0.f, 1.f, 0.f}};
|
||||
float xb0_[4] = {0.f};
|
||||
float xc4_ = 0.f;
|
||||
float xc8_ = 0.1f;
|
||||
u32 xcc_ = 0;
|
||||
zeus::CTransform xd0_;
|
||||
zeus::CVector3f x7c_wanderPoints[4] = {zeus::CVector3f{0.f, 1.f, 0.f}};
|
||||
float xb0_wanderPitches[4] = {0.f};
|
||||
float xc4_wanderTime = 0.f;
|
||||
float xc8_viewWanderSpeed = kViewWanderSpeedMin;
|
||||
u32 xcc_wanderIndex = 0;
|
||||
zeus::CTransform xd0_viewWanderXf;
|
||||
float x100_ = FLT_EPSILON;
|
||||
float x104_ = 0.f;
|
||||
public:
|
||||
CPlayerCameraBob(ECameraBobType type, const zeus::CVector2f& vec, float);
|
||||
|
||||
zeus::CTransform GetViewWanderTransform() const;
|
||||
zeus::CVector3f GetHelmetBobTranslation() const;
|
||||
zeus::CTransform GetGunBobTransformation() const;
|
||||
zeus::CTransform GetCameraBobTransformation() const;
|
||||
void SetPlayerVelocity(const zeus::CVector3f& velocity);
|
||||
void SetBobMagnitude(float);
|
||||
void SetBobTimeScale(float);
|
||||
void ResetCameraBobTime();
|
||||
void SetState(ECameraBobState, CStateManager&);
|
||||
void InitViewWander(CStateManager&);
|
||||
void UpdateViewWander(float, CStateManager&);
|
||||
void Update(float, CStateManager &);
|
||||
zeus::CVector3f CalculateRandomViewWanderPosition(CStateManager&);
|
||||
float CalculateRandomViewWanderPitch(CStateManager&);
|
||||
void CalculateMovingTranslation(float& x, float& y) const;
|
||||
float CalculateLandingTranslation() const;
|
||||
zeus::CTransform CalculateCameraBobTransformation() const;
|
||||
static void ReadTweaks(CInputStream& in);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user