2018-10-06 20:42:33 -07:00
|
|
|
#pragma once
|
2016-08-14 14:11:44 -07:00
|
|
|
|
2019-09-22 14:52:05 -07:00
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
#include "Runtime/RetroTypes.hpp"
|
|
|
|
#include "Runtime/Character/CModelData.hpp"
|
|
|
|
#include "Runtime/Weapon/CGunController.hpp"
|
|
|
|
|
|
|
|
#include <zeus/CVector3f.hpp>
|
2016-08-14 14:11:44 -07:00
|
|
|
|
2021-04-10 01:42:06 -07:00
|
|
|
namespace metaforce {
|
2016-08-14 14:11:44 -07:00
|
|
|
|
2018-12-07 21:30:43 -08:00
|
|
|
namespace SamusGun {
|
|
|
|
enum class EAnimationState { Wander, Fidget, Struck, FreeLook, ComboFire, Idle, BasePosition };
|
|
|
|
enum class EFidgetType { Invalid = -1, Minor, Major };
|
|
|
|
} // namespace SamusGun
|
2017-08-24 23:18:09 -07:00
|
|
|
|
2018-12-07 21:30:43 -08:00
|
|
|
class CGunMotion {
|
|
|
|
CModelData x0_modelData;
|
|
|
|
CGunController x4c_gunController;
|
|
|
|
std::vector<CToken> xa8_anims;
|
2020-04-19 21:57:50 -07:00
|
|
|
bool xb8_24_animPlaying : 1 = false;
|
2017-08-25 21:36:25 -07:00
|
|
|
|
2018-12-07 21:30:43 -08:00
|
|
|
void LoadAnimations();
|
2016-08-14 14:11:44 -07:00
|
|
|
|
|
|
|
public:
|
2018-12-07 21:30:43 -08:00
|
|
|
CGunMotion(CAssetId ancsId, const zeus::CVector3f& scale);
|
2022-02-24 23:45:25 -08:00
|
|
|
CModelData& GetModelData() { return x0_modelData; }
|
2018-12-07 21:30:43 -08:00
|
|
|
const CModelData& GetModelData() const { return x0_modelData; }
|
|
|
|
bool PlayPasAnim(SamusGun::EAnimationState state, CStateManager& mgr, float angle, bool bigStrike);
|
|
|
|
void ReturnToDefault(CStateManager& mgr, bool setState);
|
|
|
|
void BasePosition(bool bigStrikeReset);
|
|
|
|
void EnterFidget(CStateManager& mgr, SamusGun::EFidgetType type, s32 parm2);
|
|
|
|
void Update(float dt, CStateManager& mgr);
|
2020-08-01 20:45:47 -07:00
|
|
|
void Draw(const CStateManager& mgr, const zeus::CTransform& xf);
|
2018-12-07 21:30:43 -08:00
|
|
|
s32 GetFreeLookSetId() const { return x4c_gunController.GetFreeLookSetId(); }
|
|
|
|
CGunController& GunController() { return x4c_gunController; }
|
|
|
|
bool IsAnimPlaying() const { return xb8_24_animPlaying; }
|
2016-08-14 14:11:44 -07:00
|
|
|
};
|
|
|
|
|
2021-04-10 01:42:06 -07:00
|
|
|
} // namespace metaforce
|