mirror of https://github.com/PrimeDecomp/prime.git
Split POI nodes into their own headers, add weak imps to CSoundPOINode
Former-commit-id: 91313bf619
This commit is contained in:
parent
b6dc1b51b7
commit
f1049381a6
|
@ -0,0 +1,21 @@
|
|||
#ifndef _CBOOLPOINODE
|
||||
#define _CBOOLPOINODE
|
||||
|
||||
#include "Kyoto/Animation/CPOINode.hpp"
|
||||
|
||||
class CBoolPOINode : public CPOINode {
|
||||
public:
|
||||
CBoolPOINode(rstl::string name, ushort type, const CCharAnimTime& time, int index, bool unique,
|
||||
float weight, int charIdx, int flags, bool value);
|
||||
// : CPOINode(name, type, time, index, unique, weight, charIdx, flags), x38_val(value) {}
|
||||
|
||||
CBoolPOINode(CInputStream& in);
|
||||
static CBoolPOINode CopyNodeMinusStartTime(const CBoolPOINode& node,
|
||||
const CCharAnimTime& startTime);
|
||||
bool GetValue() const { return x38_val; }
|
||||
|
||||
private:
|
||||
bool x38_val;
|
||||
};
|
||||
|
||||
#endif // _CBOOLPOINODE
|
|
@ -0,0 +1,27 @@
|
|||
#ifndef _CINT32POINODE
|
||||
#define _CINT32POINODE
|
||||
|
||||
#include "Kyoto/Animation/CPOINode.hpp"
|
||||
|
||||
class CInt32POINode : public CPOINode {
|
||||
public:
|
||||
CInt32POINode(rstl::string name, ushort type, const CCharAnimTime& time, int index, bool unique,
|
||||
float weight, int charIdx, int flags, int value, const rstl::string& locatorName);
|
||||
/*: CPOINode(name, type, time, index, unique, weight, charIdx, flags)
|
||||
, x38_val(value)
|
||||
, x3c_lctrName(locatorName) {} */
|
||||
|
||||
explicit CInt32POINode(CInputStream& in);
|
||||
|
||||
static CInt32POINode CopyNodeMinusStartTime(const CInt32POINode& node,
|
||||
const CCharAnimTime& startTime);
|
||||
|
||||
int GetValue() const { return x38_val; }
|
||||
const rstl::string& GetLocatorName() const { return x3c_lctrName; }
|
||||
|
||||
private:
|
||||
int x38_val;
|
||||
rstl::string x3c_lctrName;
|
||||
};
|
||||
|
||||
#endif // _CINT32POINODE
|
|
@ -4,8 +4,6 @@
|
|||
#include "types.h"
|
||||
|
||||
#include "Kyoto/Animation/CCharAnimTime.hpp"
|
||||
#include "Kyoto/Particles/CParticleData.hpp"
|
||||
|
||||
#include "rstl/string.hpp"
|
||||
|
||||
enum EPOIType {
|
||||
|
@ -19,6 +17,7 @@ enum EPOIType {
|
|||
kPT_Sound = 8,
|
||||
};
|
||||
|
||||
class CInputStream;
|
||||
class CPOINode {
|
||||
public:
|
||||
CPOINode(const rstl::string& name, ushort type, const CCharAnimTime& time, int index, bool unique,
|
||||
|
@ -52,73 +51,5 @@ protected:
|
|||
};
|
||||
CHECK_SIZEOF(CPOINode, 0x38)
|
||||
|
||||
class CBoolPOINode : public CPOINode {
|
||||
public:
|
||||
CBoolPOINode(rstl::string name, ushort type, const CCharAnimTime& time, int index, bool unique,
|
||||
float weight, int charIdx, int flags, bool value); /*
|
||||
: CPOINode(name, type, time, index, unique, weight, charIdx, flags)
|
||||
, x38_val(value) {}
|
||||
*/
|
||||
CBoolPOINode(CInputStream& in);
|
||||
static CBoolPOINode CopyNodeMinusStartTime(const CBoolPOINode& node,
|
||||
const CCharAnimTime& startTime);
|
||||
bool GetValue() const { return x38_val; }
|
||||
|
||||
private:
|
||||
bool x38_val;
|
||||
};
|
||||
|
||||
class CInt32POINode : public CPOINode {
|
||||
public:
|
||||
CInt32POINode(rstl::string name, ushort type, const CCharAnimTime& time, int index, bool unique,
|
||||
float weight, int charIdx, int flags, int value,
|
||||
const rstl::string& locatorName); /*
|
||||
: CPOINode(name, type, time, index, unique, weight, charIdx, flags)
|
||||
, x38_val(value)
|
||||
, x3c_lctrName(locatorName) {}
|
||||
*/
|
||||
|
||||
explicit CInt32POINode(CInputStream& in);
|
||||
|
||||
static CInt32POINode CopyNodeMinusStartTime(const CInt32POINode& node,
|
||||
const CCharAnimTime& startTime);
|
||||
|
||||
int GetValue() const { return x38_val; }
|
||||
const rstl::string& GetLocatorName() const { return x3c_lctrName; }
|
||||
|
||||
private:
|
||||
int x38_val;
|
||||
rstl::string x3c_lctrName;
|
||||
};
|
||||
|
||||
class CParticlePOINode : public CPOINode {
|
||||
public:
|
||||
CParticlePOINode(rstl::string name, ushort type, const CCharAnimTime& time, int index,
|
||||
bool unique, float weight, int charIdx, int flags, const CParticleData& data); /*
|
||||
: CPOINode(name, type, time, index, unique,
|
||||
weight, charIdx, flags) , x38_val(value)
|
||||
*/
|
||||
explicit CParticlePOINode(CInputStream& in);
|
||||
|
||||
const CParticleData& GetParticleData() const { return x38_data; }
|
||||
|
||||
static CParticlePOINode CopyNodeMinusStartTime(const CParticlePOINode& node,
|
||||
const CCharAnimTime& startTime);
|
||||
|
||||
private:
|
||||
CParticleData x38_data;
|
||||
};
|
||||
|
||||
class CSoundPOINode : public CPOINode {
|
||||
public:
|
||||
uint GetSoundId() const { return x38_sfxId; }
|
||||
float GetFallOff() const { return x3c_falloff; }
|
||||
float GetMaxDistance() const { return x40_maxDist; }
|
||||
|
||||
private:
|
||||
uint x38_sfxId;
|
||||
float x3c_falloff;
|
||||
float x40_maxDist;
|
||||
};
|
||||
|
||||
#endif // _CPOINODE
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
#ifndef _CPARTICLEPOINODE
|
||||
#define _CPARTICLEPOINODE
|
||||
|
||||
#include "Kyoto/Animation/CPOINode.hpp"
|
||||
#include "Kyoto/Particles/CParticleData.hpp"
|
||||
|
||||
class CParticlePOINode : public CPOINode {
|
||||
public:
|
||||
CParticlePOINode(rstl::string name, ushort type, const CCharAnimTime& time, int index,
|
||||
bool unique, float weight, int charIdx, int flags, const CParticleData& data);
|
||||
//: CPOINode(name, type, time, index, unique, weight, charIdx, flags), x38_val(value) {}
|
||||
|
||||
explicit CParticlePOINode(CInputStream& in);
|
||||
|
||||
const CParticleData& GetParticleData() const { return x38_data; }
|
||||
|
||||
static CParticlePOINode CopyNodeMinusStartTime(const CParticlePOINode& node,
|
||||
const CCharAnimTime& startTime);
|
||||
|
||||
private:
|
||||
CParticleData x38_data;
|
||||
};
|
||||
|
||||
#endif // _CPARTICLEPOINODE
|
|
@ -0,0 +1,42 @@
|
|||
#ifndef _CSOUNDPOINODE
|
||||
#define _CSOUNDPOINODE
|
||||
|
||||
#include "Kyoto/Animation/CPOINode.hpp"
|
||||
#include "Kyoto/Streams/CInputStream.hpp"
|
||||
|
||||
class CSoundPOINode : public CPOINode {
|
||||
public:
|
||||
CSoundPOINode(rstl::string name, ushort type, const CCharAnimTime& time, int index, bool unique,
|
||||
float weight, int charIdx, int flags, int sfxId, float fallOff, float maxDist);
|
||||
/* : CPOINode(name, type, time, index, unique, weight, charIdx, flags)
|
||||
, x38_sfxId(sfxId)
|
||||
, x3c_falloff(fallOff)
|
||||
, x40_maxDist(maxDist) {}
|
||||
*/
|
||||
|
||||
CSoundPOINode(CInputStream& in);
|
||||
/*: CPOINode(in)
|
||||
, x38_sfxId(in.ReadInt32())
|
||||
, x3c_falloff(in.ReadFloat())
|
||||
, x40_maxDist(in.ReadFloat()) {}
|
||||
*/
|
||||
|
||||
uint GetSoundId() const { return x38_sfxId; }
|
||||
float GetFallOff() const { return x3c_falloff; }
|
||||
float GetMaxDistance() const { return x40_maxDist; }
|
||||
|
||||
static CSoundPOINode CopyNodeMinusStartTime(const CSoundPOINode& node,
|
||||
const CCharAnimTime& startTime) {
|
||||
return CSoundPOINode(node.GetString(), node.GetPoiType(), node.GetTime() - startTime,
|
||||
node.GetIndex(), node.GetSaveState(), node.GetWeight(),
|
||||
node.GetCharacterIndex(), node.GetFlags(), node.GetSoundId(),
|
||||
node.GetFallOff(), node.GetMaxDistance());
|
||||
}
|
||||
|
||||
private:
|
||||
uint x38_sfxId;
|
||||
float x3c_falloff;
|
||||
float x40_maxDist;
|
||||
};
|
||||
|
||||
#endif // _CSOUNDPOINODE
|
|
@ -3,12 +3,15 @@
|
|||
|
||||
#include "types.h"
|
||||
|
||||
#include "Kyoto/Animation/CBoolPOINode.hpp"
|
||||
#include "Kyoto/Animation/CCharacterInfo.hpp"
|
||||
#include "Kyoto/Animation/CInt32POINode.hpp"
|
||||
#include "Kyoto/Animation/CParticlePOINode.hpp"
|
||||
#include "Kyoto/Animation/CSoundPOINode.hpp"
|
||||
#include "MetroidPrime/ActorCommon.hpp"
|
||||
#include "MetroidPrime/CAdditiveAnimPlayback.hpp"
|
||||
#include "MetroidPrime/CAnimPlaybackParms.hpp"
|
||||
#include "Kyoto/Animation/CCharacterInfo.hpp"
|
||||
#include "MetroidPrime/CHierarchyPoseBuilder.hpp"
|
||||
#include "Kyoto/Animation/CPOINode.hpp"
|
||||
#include "MetroidPrime/CParticleDatabase.hpp"
|
||||
#include "MetroidPrime/CPoseAsTransforms.hpp"
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "Kyoto/Animation/CPOINode.hpp"
|
||||
#include "Kyoto/Animation/CBoolPOINode.hpp"
|
||||
|
||||
#include "Kyoto/Streams/CInputStream.hpp"
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "Kyoto/Animation/CPOINode.hpp"
|
||||
#include "Kyoto/Animation/CInt32POINode.hpp"
|
||||
#include "Kyoto/Streams/CInputStream.hpp"
|
||||
|
||||
CInt32POINode::CInt32POINode(CInputStream& in)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "Kyoto/Animation/CPOINode.hpp"
|
||||
#include "Kyoto/Animation/CParticlePOINode.hpp"
|
||||
|
||||
CParticlePOINode::CParticlePOINode(CInputStream& in) : CPOINode(in), x38_data(in) {}
|
||||
|
||||
|
|
Loading…
Reference in New Issue