#ifndef __DNAMP1_EVNT_HPP__ #define __DNAMP1_EVNT_HPP__ #include "../DNACommon/DNACommon.hpp" #include "DNAMP1.hpp" namespace DataSpec::DNAMP1 { struct EVNT : BigYAML { DECL_YAML Delete expl; Value version; struct POINode : BigYAML { DECL_YAML Value unk0; String<-1> name; Value type; struct CharAnimTime : BigYAML { enum class Type : atUint32 { NonZero, ZeroIncreasing, ZeroSteady, ZeroDecreasing, Infinity }; DECL_YAML Value time; Value type; }; CharAnimTime animTime; Value idx; Value unk2; Value weight; Value unk4; Value unk5; }; struct BoolPOINode : POINode { DECL_YAML Value value; }; std::vector boolPOINodes; struct Int32POINode : POINode { DECL_YAML Value value; String<-1> locator; }; std::vector int32POINodes; struct ParticlePOINode : POINode { DECL_YAML Value duration; DNAFourCC ptype; UniqueID32 id; String<-1> locator; Value scale; Value parentMode; }; std::vector particlePOINodes; struct SoundPOINode : POINode { DECL_YAML Value soundId; Value falloff; Value maxDist; }; std::vector soundPOINodes; static bool Extract(PAKEntryReadStream& rs, const hecl::ProjectPath& outPath) { EVNT evnt; evnt.read(rs); athena::io::FileWriter writer(outPath.getAbsolutePath()); evnt.toYAMLStream(writer); return true; } 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& pathsOut) const { for (const ParticlePOINode& node : particlePOINodes) g_curSpec->flattenDependencies(node.id, pathsOut); } }; } #endif // __DNAMP1_EVNT_HPP__