2022-10-06 10:38:13 +00:00
|
|
|
#ifndef _CGUNMOTION_HPP
|
|
|
|
#define _CGUNMOTION_HPP
|
|
|
|
|
2022-10-06 20:40:18 +00:00
|
|
|
#include "MetroidPrime/CModelData.hpp"
|
2022-10-06 21:07:41 +00:00
|
|
|
#include "MetroidPrime/Weapons/GunController/CGunController.hpp"
|
2022-10-06 20:40:18 +00:00
|
|
|
|
|
|
|
#include "Kyoto/CToken.hpp"
|
2022-10-06 10:38:13 +00:00
|
|
|
#include "Kyoto/CObjectReference.hpp"
|
|
|
|
|
2022-10-06 20:40:18 +00:00
|
|
|
#include "rstl/vector.hpp"
|
|
|
|
|
2022-10-06 10:38:13 +00:00
|
|
|
class CVector3f;
|
2022-10-06 20:34:27 +00:00
|
|
|
class CStateManager;
|
2022-10-06 10:38:13 +00:00
|
|
|
|
2022-10-06 20:40:18 +00:00
|
|
|
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-06 10:38:13 +00:00
|
|
|
class CGunMotion {
|
|
|
|
public:
|
|
|
|
CGunMotion(CAssetId ancsId, const CVector3f& scale);
|
2022-10-06 11:06:55 +00:00
|
|
|
~CGunMotion();
|
2022-10-06 10:38:13 +00:00
|
|
|
|
2022-10-06 20:34:27 +00:00
|
|
|
bool PlayPasAnim(SamusGun::EAnimationState state, CStateManager& mgr, float angle, bool bigStrike);
|
2022-10-06 21:07:41 +00:00
|
|
|
void Update(float, CStateManager&);
|
|
|
|
void Draw(const CStateManager&, const CTransform4f&) const;
|
|
|
|
void ReturnToDefault(CStateManager& mgr);
|
|
|
|
void GetFreeLookSetId() const;
|
2022-10-06 20:34:27 +00:00
|
|
|
void BasePosition(bool bigStrikeReset);
|
2022-10-06 21:07:41 +00:00
|
|
|
void EnterFidget(CStateManager&, SamusGun::EFidgetType, int);
|
|
|
|
void LoadAnimations();
|
2022-10-06 20:34:27 +00:00
|
|
|
|
|
|
|
CModelData& GetModelData() { return x0_modelData; }
|
|
|
|
const CModelData& GetModelData() const { return x0_modelData; }
|
|
|
|
bool IsAnimPlaying() const { return xb8_24_animPlaying; }
|
|
|
|
|
2022-10-06 10:38:13 +00:00
|
|
|
private:
|
2022-10-06 20:34:27 +00:00
|
|
|
CModelData x0_modelData;
|
2022-10-06 21:07:41 +00:00
|
|
|
CGunController x4c_gunController;
|
2022-10-06 20:34:27 +00:00
|
|
|
rstl::vector<CToken> xa8_anims;
|
|
|
|
bool xb8_24_animPlaying : 1;
|
2022-10-06 10:38:13 +00:00
|
|
|
};
|
|
|
|
CHECK_SIZEOF(CGunMotion, 0xbc)
|
|
|
|
|
|
|
|
#endif // _CGUNMOTION_HPP
|