2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 12:27:43 +00:00

Finish CPlayerGun

This commit is contained in:
Jack Andersen
2017-09-01 18:06:05 -10:00
parent ddb1d584b7
commit 35ab6e4803
21 changed files with 996 additions and 350 deletions

View File

@@ -1,6 +1,7 @@
#include "CGunWeapon.hpp"
#include "GameGlobalObjects.hpp"
#include "CSimplePool.hpp"
#include "Character/CModelData.hpp"
namespace urde
{
@@ -55,6 +56,24 @@ void CGunWeapon::AsyncLoadSuitArm(CStateManager& mgr)
{
}
void CGunWeapon::AllocResPools(CPlayerState::EBeamId)
{
}
static const s32 skAnimTypeList[] = { 0, 4, 1, 2, 3, 5, 6, 7, 8, 9, 10 };
void CGunWeapon::PlayAnim(NWeaponTypes::EGunAnimType type, bool loop)
{
if (x218_26 && type >= NWeaponTypes::EGunAnimType::BasePosition &&
type <= NWeaponTypes::EGunAnimType::ToBeam)
{
x10_solidModelData->AnimationData()->EnableLooping(loop);
CAnimPlaybackParms parms(skAnimTypeList[int(type)], -1, 1.f, true);
x10_solidModelData->AnimationData()->SetAnimation(parms, false);
}
}
void CGunWeapon::BuildSecondaryEffect(ESecondaryFxType type)
{
switch (type)
@@ -124,4 +143,9 @@ zeus::CAABox CGunWeapon::GetBounds(const zeus::CTransform& xf) const
return zeus::CAABox::skNullBox;
}
bool CGunWeapon::IsChargeAnimOver() const
{
return false;
}
}