2016-08-14 21:11:44 +00:00
|
|
|
#ifndef __URDE_CGUNCONTROLLER_HPP__
|
|
|
|
#define __URDE_CGUNCONTROLLER_HPP__
|
|
|
|
|
|
|
|
#include "Character/CModelData.hpp"
|
|
|
|
#include "CGSFreeLook.hpp"
|
|
|
|
#include "CGSComboFire.hpp"
|
|
|
|
#include "CGSFidget.hpp"
|
|
|
|
|
|
|
|
namespace urde
|
|
|
|
{
|
2016-12-10 02:35:20 +00:00
|
|
|
enum class EGunState
|
|
|
|
{
|
|
|
|
Zero,
|
|
|
|
One,
|
|
|
|
FreeLook,
|
|
|
|
ComboFire,
|
|
|
|
Four,
|
|
|
|
Fidget,
|
|
|
|
Six,
|
|
|
|
Seven
|
|
|
|
};
|
2016-08-14 21:11:44 +00:00
|
|
|
|
|
|
|
class CGunController
|
|
|
|
{
|
|
|
|
CModelData& x0_modelData;
|
|
|
|
CGSFreeLook x4_freeLook;
|
|
|
|
CGSComboFire x1c_comboFire;
|
|
|
|
CGSFidget x30_fidget;
|
2016-12-10 02:35:20 +00:00
|
|
|
EGunState x50_gunState = EGunState::Zero;
|
2016-08-14 21:11:44 +00:00
|
|
|
u32 x54_ = -1;
|
|
|
|
|
2016-12-10 02:35:20 +00:00
|
|
|
union {
|
2016-08-14 21:11:44 +00:00
|
|
|
struct
|
|
|
|
{
|
|
|
|
bool x58_24_ : 1;
|
|
|
|
bool x58_25_ : 1;
|
|
|
|
};
|
|
|
|
u8 _dummy = 0;
|
|
|
|
};
|
2016-12-10 02:35:20 +00:00
|
|
|
|
2016-08-14 21:11:44 +00:00
|
|
|
public:
|
2016-12-10 02:35:20 +00:00
|
|
|
CGunController(CModelData& modelData) : x0_modelData(modelData), x58_24_(true) {}
|
|
|
|
void UnLoadFidget();
|
|
|
|
void LoadFidgetAnimAsync(CStateManager&, s32, s32, s32);
|
|
|
|
void GetFreeLookSetId() const;
|
|
|
|
bool IsFidgetLoaded() const;
|
|
|
|
bool IsComboOver() const;
|
|
|
|
void EnterFreeLook(CStateManager&, s32, s32);
|
|
|
|
void EnterComboFire(CStateManager&, s32);
|
|
|
|
void EnterFidget(CStateManager&, s32, s32, s32);
|
|
|
|
void EnterStruck(CStateManager&, float);
|
|
|
|
void EnterIdle(CStateManager&);
|
|
|
|
bool Update(float, CStateManager&);
|
|
|
|
void ReturnToDefault(CStateManager&, float);
|
|
|
|
void ReturnToBasePosition(CStateManager&, float);
|
|
|
|
void Reset();
|
2016-08-14 21:11:44 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // __URDE_CGUNCONTROLLER_HPP__
|