mirror of https://github.com/PrimeDecomp/prime.git
parent
01c1b77b2e
commit
e75876c5ea
|
@ -0,0 +1,39 @@
|
||||||
|
#ifndef _CPASANIMPARMDATA_HPP
|
||||||
|
#define _CPASANIMPARMDATA_HPP
|
||||||
|
|
||||||
|
#include "Kyoto/Animation/CPASAnimState.hpp"
|
||||||
|
|
||||||
|
class CPASAnimParmData {
|
||||||
|
pas::EAnimationState x0_stateId;
|
||||||
|
rstl::reserved_vector< CPASAnimParm, 8 > x4_parms;
|
||||||
|
|
||||||
|
public:
|
||||||
|
CPASAnimParmData(pas::EAnimationState stateId,
|
||||||
|
const CPASAnimParm& parm1 = CPASAnimParm::NoParameter(),
|
||||||
|
const CPASAnimParm& parm2 = CPASAnimParm::NoParameter(),
|
||||||
|
const CPASAnimParm& parm3 = CPASAnimParm::NoParameter(),
|
||||||
|
const CPASAnimParm& parm4 = CPASAnimParm::NoParameter(),
|
||||||
|
const CPASAnimParm& parm5 = CPASAnimParm::NoParameter(),
|
||||||
|
const CPASAnimParm& parm6 = CPASAnimParm::NoParameter(),
|
||||||
|
const CPASAnimParm& parm7 = CPASAnimParm::NoParameter(),
|
||||||
|
const CPASAnimParm& parm8 = CPASAnimParm::NoParameter())
|
||||||
|
: x0_stateId(stateId) {
|
||||||
|
x4_parms.push_back(parm1);
|
||||||
|
x4_parms.push_back(parm2);
|
||||||
|
x4_parms.push_back(parm3);
|
||||||
|
x4_parms.push_back(parm4);
|
||||||
|
x4_parms.push_back(parm5);
|
||||||
|
x4_parms.push_back(parm6);
|
||||||
|
x4_parms.push_back(parm7);
|
||||||
|
x4_parms.push_back(parm8);
|
||||||
|
}
|
||||||
|
|
||||||
|
pas::EAnimationState GetStateId() const { return x0_stateId; }
|
||||||
|
const rstl::reserved_vector< CPASAnimParm, 8 >& GetAnimParmData() const { return x4_parms; }
|
||||||
|
|
||||||
|
static CPASAnimParmData NoParameters(pas::EAnimationState stateId) {
|
||||||
|
return CPASAnimParmData(stateId);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // _CPASANIMPARMDATA_HPP
|
|
@ -54,6 +54,13 @@ public:
|
||||||
bool m_bool;
|
bool m_bool;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static CPASAnimParm FromEnum(s32 val);
|
||||||
|
static CPASAnimParm FromBool(bool val);
|
||||||
|
static CPASAnimParm FromReal32(float val);
|
||||||
|
static CPASAnimParm FromUint32(u32 val);
|
||||||
|
static CPASAnimParm FromInt32(s32 val);
|
||||||
|
static CPASAnimParm NoParameter();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
UParmValue x0_value;
|
UParmValue x0_value;
|
||||||
EParmType x4_type;
|
EParmType x4_type;
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
|
||||||
#include "MetroidPrime/CPASAnimState.hpp"
|
#include "Kyoto/Animation/CPASAnimState.hpp"
|
||||||
|
|
||||||
#include "rstl/vector.hpp"
|
#include "rstl/vector.hpp"
|
||||||
#include "rstl/pair.hpp"
|
#include "rstl/pair.hpp"
|
|
@ -4,10 +4,10 @@
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
|
||||||
#include "MetroidPrime/CEffectComponent.hpp"
|
#include "MetroidPrime/CEffectComponent.hpp"
|
||||||
#include "MetroidPrime/CPASDatabase.hpp"
|
|
||||||
|
|
||||||
#include "Kyoto/IObjectStore.hpp"
|
#include "Kyoto/IObjectStore.hpp"
|
||||||
#include "Kyoto/Math/CAABox.hpp"
|
#include "Kyoto/Math/CAABox.hpp"
|
||||||
|
#include "Kyoto/Animation/CPASDatabase.hpp"
|
||||||
|
|
||||||
#include "rstl/pair.hpp"
|
#include "rstl/pair.hpp"
|
||||||
#include "rstl/string.hpp"
|
#include "rstl/string.hpp"
|
||||||
|
|
|
@ -2,9 +2,12 @@
|
||||||
|
|
||||||
#include "MetroidPrime/CAnimRes.hpp"
|
#include "MetroidPrime/CAnimRes.hpp"
|
||||||
#include "MetroidPrime/CAnimData.hpp"
|
#include "MetroidPrime/CAnimData.hpp"
|
||||||
#include "MetroidPrime/CPASDatabase.hpp"
|
|
||||||
#include "MetroidPrime/CStateManager.hpp"
|
#include "MetroidPrime/CStateManager.hpp"
|
||||||
|
|
||||||
|
#include "Kyoto/Animation/CPASDatabase.hpp"
|
||||||
|
#include "Kyoto/Animation/CPASAnimParmData.hpp"
|
||||||
|
|
||||||
|
|
||||||
CGunMotion::CGunMotion(CAssetId ancsId, const CVector3f& scale)
|
CGunMotion::CGunMotion(CAssetId ancsId, const CVector3f& scale)
|
||||||
: x0_modelData(CAnimRes(ancsId, 0, scale, 0, false))
|
: x0_modelData(CAnimRes(ancsId, 0, scale, 0, false))
|
||||||
, x4c_gunController(x0_modelData)
|
, x4c_gunController(x0_modelData)
|
||||||
|
@ -21,22 +24,22 @@ bool CGunMotion::PlayPasAnim(SamusGun::EAnimationState state, CStateManager& mgr
|
||||||
bool loop = true;
|
bool loop = true;
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case SamusGun::kAS_Wander: {
|
case SamusGun::kAS_Wander: {
|
||||||
CPASAnimParmData* parms; //((pas::EAnimationState(state)));
|
CPASAnimParmData parms((pas::EAnimationState(state)));
|
||||||
rstl::pair<float, int> anim = pas.FindBestAnimation(*parms, *mgr.GetActiveRandom(), -1);
|
rstl::pair<float, int> anim = pas.FindBestAnimation(parms, *mgr.GetActiveRandom(), -1);
|
||||||
animId = anim.second;
|
animId = anim.second;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SamusGun::kAS_Idle: {
|
case SamusGun::kAS_Idle: {
|
||||||
CPASAnimParmData* parms; //(pas::EAnimationState(state), CPASAnimParm::FromEnum(0));
|
CPASAnimParmData parms(pas::EAnimationState(state), CPASAnimParm::FromEnum(0));
|
||||||
rstl::pair<float, int> anim = pas.FindBestAnimation(*parms, *mgr.GetActiveRandom(), -1);
|
rstl::pair<float, int> anim = pas.FindBestAnimation(parms, *mgr.GetActiveRandom(), -1);
|
||||||
animId = anim.second;
|
animId = anim.second;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SamusGun::kAS_Struck: {
|
case SamusGun::kAS_Struck: {
|
||||||
CPASAnimParmData* parms; /*(pas::EAnimationState(state), CPASAnimParm::FromInt32(0),
|
CPASAnimParmData parms(pas::EAnimationState(state), CPASAnimParm::FromInt32(0),
|
||||||
CPASAnimParm::FromReal32(angle), CPASAnimParm::FromBool(bigStrike),
|
CPASAnimParm::FromReal32(angle), CPASAnimParm::FromBool(bigStrike),
|
||||||
CPASAnimParm::FromBool(false));*/
|
CPASAnimParm::FromBool(false));
|
||||||
rstl::pair<float, int> anim = pas.FindBestAnimation(*parms, *mgr.GetActiveRandom(), -1);
|
rstl::pair<float, int> anim = pas.FindBestAnimation(parms, *mgr.GetActiveRandom(), -1);
|
||||||
animId = anim.second;
|
animId = anim.second;
|
||||||
loop = false;
|
loop = false;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue