2018-10-07 03:42:33 +00:00
|
|
|
#pragma once
|
2016-08-14 21:11:44 +00:00
|
|
|
|
|
|
|
#include "RetroTypes.hpp"
|
|
|
|
#include "zeus/CVector3f.hpp"
|
|
|
|
#include "Character/CModelData.hpp"
|
2017-08-26 04:36:25 +00:00
|
|
|
#include "CGunController.hpp"
|
2016-08-14 21:11:44 +00:00
|
|
|
|
|
|
|
namespace urde
|
|
|
|
{
|
|
|
|
|
2017-08-25 06:18:09 +00:00
|
|
|
namespace SamusGun
|
|
|
|
{
|
|
|
|
enum class EAnimationState
|
|
|
|
{
|
2017-08-26 04:36:25 +00:00
|
|
|
Wander,
|
|
|
|
Fidget,
|
|
|
|
Struck,
|
|
|
|
FreeLook,
|
|
|
|
ComboFire,
|
|
|
|
Idle,
|
|
|
|
BasePosition
|
|
|
|
};
|
|
|
|
enum class EFidgetType
|
|
|
|
{
|
2017-08-27 03:02:18 +00:00
|
|
|
Invalid = -1,
|
2017-09-04 02:22:46 +00:00
|
|
|
Minor,
|
|
|
|
Major
|
2017-08-25 06:18:09 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2016-08-14 21:11:44 +00:00
|
|
|
class CGunMotion
|
|
|
|
{
|
|
|
|
CModelData x0_modelData;
|
2017-08-26 04:36:25 +00:00
|
|
|
CGunController x4c_gunController;
|
|
|
|
std::vector<CToken> xa8_anims;
|
2017-08-27 03:02:18 +00:00
|
|
|
bool xb8_24_animPlaying : 1;
|
2017-08-26 04:36:25 +00:00
|
|
|
|
|
|
|
void LoadAnimations();
|
2016-08-14 21:11:44 +00:00
|
|
|
|
|
|
|
public:
|
2017-08-26 04:36:25 +00:00
|
|
|
CGunMotion(CAssetId ancsId, const zeus::CVector3f& scale);
|
2017-08-25 06:18:09 +00:00
|
|
|
const CModelData& GetModelData() const { return x0_modelData; }
|
2017-08-26 04:36:25 +00:00
|
|
|
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);
|
|
|
|
void Draw(const CStateManager& mgr, const zeus::CTransform& xf) const;
|
|
|
|
s32 GetFreeLookSetId() const { return x4c_gunController.GetFreeLookSetId(); }
|
|
|
|
CGunController& GunController() { return x4c_gunController; }
|
2017-08-27 03:02:18 +00:00
|
|
|
bool IsAnimPlaying() const { return xb8_24_animPlaying; }
|
2016-08-14 21:11:44 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|