2022-10-09 05:13:17 +00:00
|
|
|
#ifndef _CPOINODE
|
|
|
|
#define _CPOINODE
|
2022-08-14 18:38:41 +00:00
|
|
|
|
|
|
|
#include "types.h"
|
|
|
|
|
2022-12-09 19:38:20 +00:00
|
|
|
#include "Kyoto/Animation/CCharAnimTime.hpp"
|
2023-01-08 02:11:54 +00:00
|
|
|
#include "Kyoto/Particles/CParticleData.hpp"
|
2022-08-14 18:38:41 +00:00
|
|
|
|
|
|
|
#include "rstl/string.hpp"
|
|
|
|
|
2022-08-15 04:51:06 +00:00
|
|
|
enum EPOIType {
|
|
|
|
kPT_Loop = 0,
|
|
|
|
kPT_EmptyBool = 1,
|
|
|
|
kPT_EmptyInt32 = 2,
|
|
|
|
kPT_SoundInt32 = 4,
|
|
|
|
kPT_Particle = 5,
|
|
|
|
kPT_UserEvent = 6,
|
|
|
|
kPT_RandRate = 7,
|
|
|
|
kPT_Sound = 8,
|
|
|
|
};
|
2022-08-14 18:38:41 +00:00
|
|
|
|
|
|
|
class CPOINode {
|
|
|
|
public:
|
2022-12-09 20:16:05 +00:00
|
|
|
CPOINode(const rstl::string& name, ushort type, const CCharAnimTime& time, int index, bool unique,
|
|
|
|
float weight, int charIdx, int flags);
|
|
|
|
CPOINode(CInputStream& in);
|
|
|
|
virtual ~CPOINode() {}
|
2022-08-14 18:38:41 +00:00
|
|
|
|
|
|
|
const rstl::string& GetString() const { return x8_name; }
|
2023-01-12 01:02:35 +00:00
|
|
|
const EPOIType GetPoiType() const { return static_cast< EPOIType >(x18_type); }
|
2022-08-14 18:38:41 +00:00
|
|
|
const CCharAnimTime& GetTime() const { return x1c_time; }
|
2023-01-12 01:02:35 +00:00
|
|
|
const int GetIndex() const { return x24_index; }
|
|
|
|
const bool GetSaveState() const { return x28_unique; }
|
|
|
|
const float GetWeight() const { return x2c_weight; }
|
|
|
|
const int GetCharacterIndex() const { return x30_charIdx; }
|
|
|
|
const int GetFlags() const { return x34_flags; }
|
2022-08-14 18:38:41 +00:00
|
|
|
|
2022-12-09 20:16:05 +00:00
|
|
|
bool operator>(const CPOINode& other) const;
|
|
|
|
bool operator<(const CPOINode& other) const;
|
|
|
|
static int compare(const void* a, const void* b);
|
|
|
|
|
2022-08-14 18:38:41 +00:00
|
|
|
protected:
|
2022-10-09 05:37:23 +00:00
|
|
|
ushort x4_;
|
2022-08-14 18:38:41 +00:00
|
|
|
rstl::string x8_name;
|
2022-10-09 05:37:23 +00:00
|
|
|
ushort x18_type;
|
2022-08-14 18:38:41 +00:00
|
|
|
CCharAnimTime x1c_time;
|
2022-09-05 04:01:13 +00:00
|
|
|
int x24_index;
|
2022-08-14 18:38:41 +00:00
|
|
|
bool x28_unique;
|
2022-10-09 05:37:23 +00:00
|
|
|
float x2c_weight;
|
2022-09-05 04:01:13 +00:00
|
|
|
int x30_charIdx;
|
|
|
|
int x34_flags;
|
2022-08-14 18:38:41 +00:00
|
|
|
};
|
|
|
|
CHECK_SIZEOF(CPOINode, 0x38)
|
|
|
|
|
|
|
|
class CBoolPOINode : public CPOINode {
|
|
|
|
public:
|
2023-01-12 01:34:35 +00:00
|
|
|
CBoolPOINode(rstl::string name, ushort type, const CCharAnimTime& time, int index, bool unique,
|
|
|
|
float weight, int charIdx, int flags, bool value); /*
|
2023-01-12 01:33:42 +00:00
|
|
|
: CPOINode(name, type, time, index, unique, weight, charIdx, flags)
|
|
|
|
, x38_val(value) {}
|
|
|
|
*/
|
|
|
|
CBoolPOINode(CInputStream& in);
|
|
|
|
static CBoolPOINode CopyNodeMinusStartTime(const CBoolPOINode& node,
|
|
|
|
const CCharAnimTime& startTime);
|
2022-08-14 18:38:41 +00:00
|
|
|
bool GetValue() const { return x38_val; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
bool x38_val;
|
|
|
|
};
|
|
|
|
|
|
|
|
class CInt32POINode : public CPOINode {
|
|
|
|
public:
|
2023-01-12 01:02:35 +00:00
|
|
|
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);
|
2022-08-14 18:38:41 +00:00
|
|
|
|
2022-09-05 04:01:13 +00:00
|
|
|
int GetValue() const { return x38_val; }
|
2022-08-14 18:38:41 +00:00
|
|
|
const rstl::string& GetLocatorName() const { return x3c_lctrName; }
|
|
|
|
|
|
|
|
private:
|
2022-09-05 04:01:13 +00:00
|
|
|
int x38_val;
|
2022-08-14 18:38:41 +00:00
|
|
|
rstl::string x3c_lctrName;
|
|
|
|
};
|
|
|
|
|
|
|
|
class CParticlePOINode : public CPOINode {
|
2023-01-12 01:44:25 +00:00
|
|
|
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);
|
|
|
|
|
2022-08-14 18:38:41 +00:00
|
|
|
private:
|
|
|
|
CParticleData x38_data;
|
|
|
|
};
|
|
|
|
|
|
|
|
class CSoundPOINode : public CPOINode {
|
|
|
|
public:
|
2022-09-05 04:01:13 +00:00
|
|
|
uint GetSoundId() const { return x38_sfxId; }
|
2022-10-09 05:37:23 +00:00
|
|
|
float GetFallOff() const { return x3c_falloff; }
|
|
|
|
float GetMaxDistance() const { return x40_maxDist; }
|
2022-08-14 18:38:41 +00:00
|
|
|
|
|
|
|
private:
|
2022-09-05 04:01:13 +00:00
|
|
|
uint x38_sfxId;
|
2022-10-09 05:37:23 +00:00
|
|
|
float x3c_falloff;
|
|
|
|
float x40_maxDist;
|
2022-08-14 18:38:41 +00:00
|
|
|
};
|
|
|
|
|
2022-10-09 05:13:17 +00:00
|
|
|
#endif // _CPOINODE
|