mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 15:07:41 +00:00
More work on CBallCamera
This commit is contained in:
@@ -12,30 +12,34 @@ class CStateManager;
|
||||
struct SCameraShakePoint
|
||||
{
|
||||
friend class CCameraShakeData;
|
||||
u32 x0_w1 = 0;
|
||||
float x4_ = 0.f;
|
||||
bool x0_useEnvelope = false;
|
||||
float x4_value = 0.f;
|
||||
float x8_magnitude = 0.f;
|
||||
float xc_f1 = 0.f;
|
||||
float x10_f2 = 0.f;
|
||||
float xc_attackTime = 0.f;
|
||||
float x10_sustainTime = 0.f;
|
||||
float x14_duration = 0.f;
|
||||
SCameraShakePoint() = default;
|
||||
SCameraShakePoint(u32 w1, float f1, float f2, float duration, float magnitude)
|
||||
: x0_w1(w1), x8_magnitude(magnitude), xc_f1(f1), x10_f2(f2), x14_duration(duration) {}
|
||||
float GetSomething() const { return x0_w1 ? x8_magnitude : x4_; }
|
||||
SCameraShakePoint(bool useEnvelope, float attackTime, float sustainTime, float duration, float magnitude)
|
||||
: x0_useEnvelope(useEnvelope), x8_magnitude(magnitude), xc_attackTime(attackTime),
|
||||
x10_sustainTime(sustainTime), x14_duration(duration) {}
|
||||
float GetValue() const { return x0_useEnvelope ? x8_magnitude : x4_value; }
|
||||
static SCameraShakePoint LoadCameraShakePoint(CInputStream& in);
|
||||
void Update(float curTime);
|
||||
};
|
||||
|
||||
class CCameraShakerComponent
|
||||
{
|
||||
friend class CCameraShakeData;
|
||||
u32 x4_w1 = 0;
|
||||
SCameraShakePoint x8_sp1, x20_sp2;
|
||||
bool x4_useModulation = false;
|
||||
SCameraShakePoint x8_am, x20_fm;
|
||||
float x38_value = 0.f;
|
||||
public:
|
||||
CCameraShakerComponent() = default;
|
||||
CCameraShakerComponent(u32 w1, const SCameraShakePoint& sp1, const SCameraShakePoint& sp2)
|
||||
: x4_w1(w1), x8_sp1(sp1), x20_sp2(sp2) {}
|
||||
CCameraShakerComponent(bool useModulation, const SCameraShakePoint& am, const SCameraShakePoint& fm)
|
||||
: x4_useModulation(useModulation), x8_am(am), x20_fm(fm) {}
|
||||
static CCameraShakerComponent LoadNewCameraShakerComponent(CInputStream& in);
|
||||
void Update(float curTime, float duration, float distAtt);
|
||||
float GetValue() const { return x38_value; }
|
||||
};
|
||||
|
||||
class CCameraShakeData
|
||||
@@ -43,9 +47,9 @@ class CCameraShakeData
|
||||
friend class CCameraManager;
|
||||
float x0_duration;
|
||||
float x4_curTime = 0.f;
|
||||
CCameraShakerComponent x8_shaker1;
|
||||
CCameraShakerComponent x44_shaker2;
|
||||
CCameraShakerComponent x80_shaker3;
|
||||
CCameraShakerComponent x8_shakerX;
|
||||
CCameraShakerComponent x44_shakerY;
|
||||
CCameraShakerComponent x80_shakerZ;
|
||||
u32 xbc_shakerId = 0;
|
||||
u32 xc0_flags; // 0x1: positional sfx
|
||||
zeus::CVector3f xc4_sfxPos;
|
||||
@@ -53,7 +57,7 @@ class CCameraShakeData
|
||||
|
||||
public:
|
||||
static const CCameraShakeData skChargedShotCameraShakeData;
|
||||
CCameraShakeData(float duration, float sfxDist, u32 w1, const zeus::CVector3f& sfxPos,
|
||||
CCameraShakeData(float duration, float sfxDist, u32 flags, const zeus::CVector3f& sfxPos,
|
||||
const CCameraShakerComponent& shaker1, const CCameraShakerComponent& shaker2,
|
||||
const CCameraShakerComponent& shaker3);
|
||||
CCameraShakeData(float duration, float magnitude);
|
||||
@@ -62,11 +66,10 @@ public:
|
||||
static CCameraShakeData BuildMissileCameraShake(float duration, float magnitude, float sfxDistance,
|
||||
const zeus::CVector3f& sfxPos);
|
||||
static CCameraShakeData BuildPhazonCameraShakeData(float duration, float magnitude);
|
||||
//zeus::CVector3f GeneratePoint(float dt, CRandom16& r);
|
||||
void Update(float dt, CStateManager& mgr);
|
||||
zeus::CVector3f GetPoint() const;
|
||||
float GetSomething() const;
|
||||
float GetSomething2() const;
|
||||
float GetMaxAMComponent() const;
|
||||
float GetMaxFMComponent() const;
|
||||
void SetShakerId(u32 id) { xbc_shakerId = id; }
|
||||
u32 GetShakerId() const { return xbc_shakerId; }
|
||||
static CCameraShakeData LoadCameraShakeData(CInputStream& in);
|
||||
|
||||
Reference in New Issue
Block a user