metaforce/Runtime/Weapon/CGrappleArm.hpp

62 lines
1.4 KiB
C++
Raw Normal View History

#ifndef __URDE_CGRAPPLEARM_HPP__
#define __URDE_CGRAPPLEARM_HPP__
#include "RetroTypes.hpp"
#include "zeus/CVector3f.hpp"
#include "Character/CModelData.hpp"
namespace urde
{
class CGrappleArm
{
2017-07-17 03:04:14 +00:00
public:
enum class EArmState
{
Zero,
One,
Two,
Three,
Four,
Five,
Six,
Seven,
Eight,
2017-07-31 05:19:05 +00:00
Nine,
Ten
2017-07-17 03:04:14 +00:00
};
private:
CModelData x0_modelData;
2017-07-23 23:45:04 +00:00
zeus::CTransform x220_xf;
2017-07-18 06:11:37 +00:00
EArmState x334_animState;
union
{
struct
{
2017-07-31 05:19:05 +00:00
bool x3b2_24_inGrappleCycle : 1;
2017-07-18 06:11:37 +00:00
bool x3b2_25_beamActive : 1;
2017-07-19 17:47:57 +00:00
bool x3b2_27_armMoving : 1;
2017-07-18 06:11:37 +00:00
};
u32 _dummy = 0;
};
public:
2017-07-23 23:45:04 +00:00
explicit CGrappleArm(const zeus::CVector3f& vec);
void AsyncLoadSuit(CStateManager& mgr);
2017-07-23 23:45:04 +00:00
void SetTransform(const zeus::CTransform& xf) { x220_xf = xf; }
const zeus::CTransform& GetTransform() const { return x220_xf; }
2017-07-17 03:04:14 +00:00
void SetAnimState(EArmState state);
2017-07-18 06:11:37 +00:00
EArmState GetAnimState() const { return x334_animState; }
2017-07-31 05:19:05 +00:00
bool InGrappleCycle() const { return x3b2_24_inGrappleCycle; }
2017-07-18 06:11:37 +00:00
bool BeamActive() const { return x3b2_25_beamActive; }
2017-07-19 17:47:57 +00:00
bool IsArmMoving() const { return x3b2_27_armMoving; }
2017-07-18 06:11:37 +00:00
void Activate(bool);
void GrappleBeamDisconnected();
void GrappleBeamConnected();
2017-07-31 05:19:05 +00:00
void RenderGrappleBeam(const CStateManager& mgr, const zeus::CVector3f& pos);
};
}
#endif // __URDE_CGRAPPLEARM_HPP__