2022-10-05 23:06:15 +00:00
|
|
|
#pragma once
|
2022-10-05 22:55:57 +00:00
|
|
|
|
2022-10-05 23:06:15 +00:00
|
|
|
#include "types.h"
|
|
|
|
|
|
|
|
// TODO CGunMotion?
|
|
|
|
namespace SamusGun {
|
|
|
|
enum EAnimationState {
|
|
|
|
kAS_Wander,
|
|
|
|
kAS_Fidget,
|
|
|
|
kAS_Struck,
|
|
|
|
kAS_FreeLook,
|
|
|
|
kAS_ComboFire,
|
|
|
|
kAS_Idle,
|
|
|
|
kAS_BasePosition,
|
|
|
|
};
|
|
|
|
enum EFidgetType {
|
|
|
|
kFT_Invalid = -1,
|
|
|
|
kFT_Minor,
|
|
|
|
kFT_Major,
|
|
|
|
};
|
|
|
|
} // namespace SamusGun
|
2022-10-05 22:55:57 +00:00
|
|
|
|
|
|
|
class CStateManager;
|
2022-10-05 23:06:15 +00:00
|
|
|
|
2022-10-05 22:55:57 +00:00
|
|
|
class CFidget {
|
|
|
|
public:
|
|
|
|
enum EState {
|
|
|
|
kS_NoFidget,
|
|
|
|
kS_MinorFidget,
|
|
|
|
kS_MajorFidget,
|
|
|
|
kS_HolsterBeam,
|
|
|
|
kS_StillMinorFidget,
|
|
|
|
kS_StillMajorFidget,
|
|
|
|
kS_StillHolsterBeam,
|
2022-10-05 23:06:15 +00:00
|
|
|
kS_Loading,
|
2022-10-05 22:55:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
private:
|
|
|
|
EState x0_state;
|
2022-10-05 23:06:15 +00:00
|
|
|
SamusGun::EFidgetType x4_type;
|
2022-10-05 22:55:57 +00:00
|
|
|
int x8_delayTriggerBits;
|
|
|
|
// 0: panel, 1: panel reset, 2: adjust nozzle, 3: panel buttons
|
|
|
|
int xc_animSet;
|
|
|
|
int x10_delayTimerEnableBits;
|
|
|
|
float x14_timeSinceFire;
|
|
|
|
float x18_timeSinceStrikeCooldown;
|
|
|
|
float x1c_timeSinceUnmorph;
|
|
|
|
float x20_timeSinceBobbing;
|
|
|
|
float x24_minorDelayTimer;
|
|
|
|
float x28_majorDelayTimer;
|
|
|
|
float x2c_holsterTimeSinceFire;
|
|
|
|
float x30_timeUntilHolster;
|
2022-10-05 23:06:15 +00:00
|
|
|
bool x34_24_loading : 1;
|
2022-10-05 22:55:57 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
EState GetState() const { return x0_state; }
|
2022-10-05 23:06:15 +00:00
|
|
|
SamusGun::EFidgetType GetType() const { return x4_type; }
|
2022-10-05 22:55:57 +00:00
|
|
|
int GetAnimSet() const { return xc_animSet; }
|
2022-10-05 23:06:15 +00:00
|
|
|
EState Update(int fireButtonStates, bool bobbing, bool inStrikeCooldown, float dt,
|
|
|
|
CStateManager& mgr);
|
2022-10-05 22:55:57 +00:00
|
|
|
void ResetMinor();
|
|
|
|
void ResetAll();
|
2022-10-05 23:06:15 +00:00
|
|
|
|
2022-10-05 22:55:57 +00:00
|
|
|
void DoneLoading() { x34_24_loading = false; }
|
|
|
|
};
|
2022-10-05 23:06:15 +00:00
|
|
|
CHECK_SIZEOF(CFidget, 0x38)
|