Files

64 lines
1.6 KiB
C++
Raw Permalink Normal View History

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