prime/include/MetroidPrime/Weapons/GunController/CGunMotion.hpp

59 lines
1.4 KiB
C++
Raw Normal View History

#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"
#include "Kyoto/CObjectReference.hpp"
2022-10-06 20:40:18 +00:00
#include "rstl/vector.hpp"
class CVector3f;
2022-10-06 20:34:27 +00:00
class CStateManager;
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
class CGunMotion {
public:
CGunMotion(CAssetId ancsId, const CVector3f& scale);
2022-10-06 11:06:55 +00:00
~CGunMotion();
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);
int 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; }
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;
};
CHECK_SIZEOF(CGunMotion, 0xbc)
#endif // _CGUNMOTION_HPP