2015-08-15 04:12:15 +00:00
|
|
|
#ifndef __DNAMP1_EVNT_HPP__
|
|
|
|
#define __DNAMP1_EVNT_HPP__
|
|
|
|
|
|
|
|
#include "../DNACommon/DNACommon.hpp"
|
2016-01-19 05:32:34 +00:00
|
|
|
#include "DNAMP1.hpp"
|
2015-08-15 04:12:15 +00:00
|
|
|
|
2017-12-29 08:08:12 +00:00
|
|
|
namespace DataSpec::DNAMP1
|
2015-08-15 04:12:15 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
struct EVNT : BigYAML
|
|
|
|
{
|
|
|
|
DECL_YAML
|
|
|
|
Delete expl;
|
|
|
|
Value<atUint32> version;
|
|
|
|
|
2016-03-19 02:04:12 +00:00
|
|
|
struct POINode : BigYAML
|
2015-08-15 04:12:15 +00:00
|
|
|
{
|
|
|
|
DECL_YAML
|
|
|
|
Value<atUint16> unk0;
|
|
|
|
String<-1> name;
|
|
|
|
Value<atUint16> type;
|
2016-03-19 02:04:12 +00:00
|
|
|
struct CharAnimTime : BigYAML
|
|
|
|
{
|
2016-04-11 07:10:28 +00:00
|
|
|
enum class Type : atUint32
|
|
|
|
{
|
|
|
|
NonZero,
|
|
|
|
ZeroIncreasing,
|
|
|
|
ZeroSteady,
|
|
|
|
ZeroDecreasing,
|
|
|
|
Infinity
|
|
|
|
};
|
|
|
|
|
2016-03-19 02:04:12 +00:00
|
|
|
DECL_YAML
|
|
|
|
Value<float> time;
|
2016-04-11 07:10:28 +00:00
|
|
|
Value<Type> type;
|
2016-03-19 02:04:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
CharAnimTime animTime;
|
2015-08-15 04:12:15 +00:00
|
|
|
Value<atUint32> idx;
|
2016-03-19 02:04:12 +00:00
|
|
|
Value<bool> unk2;
|
2016-04-28 04:52:41 +00:00
|
|
|
Value<float> weight;
|
2016-01-19 05:32:34 +00:00
|
|
|
Value<atUint32> unk4;
|
2015-08-15 04:12:15 +00:00
|
|
|
Value<atUint32> unk5;
|
|
|
|
};
|
|
|
|
|
2016-03-19 02:04:12 +00:00
|
|
|
struct BoolPOINode : POINode
|
2015-08-15 04:12:15 +00:00
|
|
|
{
|
|
|
|
DECL_YAML
|
2016-03-19 02:39:39 +00:00
|
|
|
Value<atUint8> value;
|
2015-08-15 04:12:15 +00:00
|
|
|
};
|
2016-03-19 02:04:12 +00:00
|
|
|
std::vector<BoolPOINode> boolPOINodes;
|
2015-08-15 04:12:15 +00:00
|
|
|
|
2016-03-19 02:04:12 +00:00
|
|
|
struct Int32POINode : POINode
|
2015-08-15 04:12:15 +00:00
|
|
|
{
|
|
|
|
DECL_YAML
|
2016-03-19 02:39:39 +00:00
|
|
|
Value<atUint32> value;
|
2016-05-03 08:27:28 +00:00
|
|
|
String<-1> locator;
|
2015-08-15 04:12:15 +00:00
|
|
|
};
|
2016-03-19 02:04:12 +00:00
|
|
|
std::vector<Int32POINode> int32POINodes;
|
2015-08-15 04:12:15 +00:00
|
|
|
|
2016-03-19 02:04:12 +00:00
|
|
|
struct ParticlePOINode : POINode
|
2015-08-15 04:12:15 +00:00
|
|
|
{
|
|
|
|
DECL_YAML
|
2016-03-19 02:39:39 +00:00
|
|
|
Value<atUint32> duration;
|
2017-11-26 03:04:25 +00:00
|
|
|
DNAFourCC ptype;
|
2016-05-03 08:27:28 +00:00
|
|
|
UniqueID32 id;
|
|
|
|
String<-1> locator;
|
2015-08-15 04:12:15 +00:00
|
|
|
Value<float> scale;
|
|
|
|
Value<atUint32> parentMode;
|
|
|
|
};
|
2016-03-19 02:04:12 +00:00
|
|
|
std::vector<ParticlePOINode> particlePOINodes;
|
2015-08-15 04:12:15 +00:00
|
|
|
|
2016-03-19 02:04:12 +00:00
|
|
|
struct SoundPOINode : POINode
|
2015-08-15 04:12:15 +00:00
|
|
|
{
|
|
|
|
DECL_YAML
|
|
|
|
Value<atUint32> soundId;
|
2016-03-19 02:39:39 +00:00
|
|
|
Value<float> falloff;
|
|
|
|
Value<float> maxDist;
|
2015-08-15 04:12:15 +00:00
|
|
|
};
|
2016-03-19 02:04:12 +00:00
|
|
|
std::vector<SoundPOINode> soundPOINodes;
|
2016-01-19 05:32:34 +00:00
|
|
|
|
2016-03-04 23:04:53 +00:00
|
|
|
static bool Extract(PAKEntryReadStream& rs, const hecl::ProjectPath& outPath)
|
2016-01-19 05:32:34 +00:00
|
|
|
{
|
|
|
|
EVNT evnt;
|
|
|
|
evnt.read(rs);
|
2016-08-22 03:47:48 +00:00
|
|
|
athena::io::FileWriter writer(outPath.getAbsolutePath());
|
|
|
|
evnt.toYAMLStream(writer);
|
2016-01-19 05:32:34 +00:00
|
|
|
return true;
|
|
|
|
}
|
2017-02-13 06:51:47 +00:00
|
|
|
|
|
|
|
static bool Cook(const hecl::ProjectPath& inPath, const hecl::ProjectPath& outPath)
|
|
|
|
{
|
|
|
|
EVNT evnt;
|
|
|
|
athena::io::FileReader reader(inPath.getAbsolutePath());
|
|
|
|
evnt.fromYAMLStream(reader);
|
|
|
|
athena::io::FileWriter ws(outPath.getAbsolutePath());
|
|
|
|
evnt.write(ws);
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
void gatherDependencies(std::vector<hecl::ProjectPath>& pathsOut) const
|
|
|
|
{
|
|
|
|
for (const ParticlePOINode& node : particlePOINodes)
|
|
|
|
g_curSpec->flattenDependencies(node.id, pathsOut);
|
|
|
|
}
|
2015-08-15 04:12:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // __DNAMP1_EVNT_HPP__
|