2022-10-09 05:13:17 +00:00
|
|
|
#ifndef _CGUNCONTROLLER
|
|
|
|
#define _CGUNCONTROLLER
|
2022-10-06 20:55:58 +00:00
|
|
|
|
|
|
|
#include "types.h"
|
|
|
|
|
2022-10-06 23:28:42 +00:00
|
|
|
#include "MetroidPrime/Weapons/GunController/CGSFreeLook.hpp"
|
|
|
|
|
2022-10-06 20:55:58 +00:00
|
|
|
class CModelData;
|
|
|
|
|
|
|
|
enum EGunState {
|
|
|
|
kGS_Inactive,
|
|
|
|
kGS_Default,
|
|
|
|
kGS_FreeLook,
|
|
|
|
kGS_ComboFire,
|
|
|
|
kGS_Idle,
|
|
|
|
kGS_Fidget,
|
|
|
|
kGS_Strike,
|
|
|
|
kGS_BigStrike
|
|
|
|
};
|
|
|
|
|
|
|
|
class CStateManager;
|
|
|
|
|
|
|
|
class CGunController {
|
|
|
|
CModelData& x0_modelData;
|
2022-10-06 23:28:42 +00:00
|
|
|
CGSFreeLook x4_freeLook;
|
2022-10-06 20:55:58 +00:00
|
|
|
// CGSComboFire x1c_comboFire;
|
|
|
|
// CGSFidget x30_fidget;
|
2022-10-09 05:37:23 +00:00
|
|
|
uchar x1c_pad[0x34];
|
2022-10-06 20:55:58 +00:00
|
|
|
EGunState x50_gunState;
|
|
|
|
int x54_curAnimId;
|
|
|
|
bool x58_24_animDone : 1;
|
|
|
|
bool x58_25_enteredComboFire : 1;
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit CGunController(CModelData& modelData);
|
2022-10-06 21:07:41 +00:00
|
|
|
~CGunController();
|
2022-10-09 05:13:17 +00:00
|
|
|
|
2022-10-06 20:55:58 +00:00
|
|
|
void EnterFreeLook(CStateManager&, int, int);
|
|
|
|
void EnterComboFire(CStateManager&, int);
|
|
|
|
void EnterFidget(CStateManager&, int, int, int);
|
2022-10-10 19:15:26 +00:00
|
|
|
void EnterStruck(CStateManager&, float, bool, bool);
|
2022-10-06 20:55:58 +00:00
|
|
|
void LoadFidgetAnimAsync(CStateManager&, int, int, int);
|
2022-10-06 23:12:59 +00:00
|
|
|
int Update(float, CStateManager&);
|
2022-10-06 20:55:58 +00:00
|
|
|
void EnterIdle(CStateManager&);
|
|
|
|
void ReturnToDefault(CStateManager&, float);
|
|
|
|
void Reset();
|
|
|
|
void ReturnToBasePosition(CStateManager&);
|
2022-10-06 23:28:42 +00:00
|
|
|
|
|
|
|
int GetFreeLookSetId() const { return x4_freeLook.GetSetId(); }
|
2022-10-06 20:55:58 +00:00
|
|
|
};
|
2022-10-06 21:07:41 +00:00
|
|
|
CHECK_SIZEOF(CGunController, 0x5C)
|
2022-10-06 20:55:58 +00:00
|
|
|
|
2022-10-09 05:13:17 +00:00
|
|
|
#endif // _CGUNCONTROLLER
|