#ifndef __COMMON_FSM2_HPP__ #define __COMMON_FSM2_HPP__ #include "PAK.hpp" #include "DNACommon.hpp" #include "athena/FileWriter.hpp" namespace DataSpec::DNAFSM2 { struct IFSM : BigDNAVYaml { Delete _d; }; template struct AT_SPECIALIZE_PARMS(DataSpec::UniqueID32, DataSpec::UniqueID64) FSM2 : BigDNA { struct Header : BigDNA { AT_DECL_DNA_YAML DNAFourCC magic = FOURCC('FSM2'); Value version; } header; struct CommonStruct : BigDNA { AT_DECL_DNA_YAML String<-1> name; Value unknown; }; struct FSMV1 : IFSM { AT_DECL_DNA_YAML AT_DECL_DNAV Value stateCount; Value unknown1Count; Value unknown2Count; Value unknown3Count; struct State : BigDNA { AT_DECL_DNA_YAML String<-1> name; Value unknownCount; Vector unknown; }; struct Unknown1 : BigDNA { AT_DECL_DNA_YAML String<-1> name; Value unknown1; Value unknown2Count; Vector unknown2; Value unknown3; }; struct Unknown2 : BigDNA { AT_DECL_DNA_YAML String<-1> name; Value unknownCount; Vector unknown; }; struct Unknown3 : BigDNA { AT_DECL_DNA_YAML String<-1> name; Value unknownCount; Vector unknown; Value fsmId; }; Vector states; Vector unknown1; Vector unknown2; Vector unknown3; }; struct FSMV2 : IFSM { AT_DECL_DNA_YAML AT_DECL_DNAV Value stateCount; Value unknown1Count; Value unknown2Count; Value unknown3Count; struct State : BigDNA { AT_DECL_DNA_YAML String<-1> name; Value unknown1; Value unknown2; Value unknown3; Value unknown4; Value unknown5Count; Vector unknown5; }; struct Unknown1 : BigDNA { AT_DECL_DNA_YAML String<-1> name; Value unknown1; Value unknown2; Value unknown3; Value unknown4; Value unknown5; Value unknown6Count; Vector unknown6; Value unknown7; }; struct Unknown2 : BigDNA { AT_DECL_DNA_YAML String<-1> name; Value unknown1; Value unknown2; Value unknown3; Value unknown4; Value unknown5Count; Vector unknown5; }; struct Unknown3 : BigDNA { AT_DECL_DNA_YAML String<-1> name; Value unknown1; Value unknown2; Value unknown3; Value unknown4; Value unknown5Count; Vector unknown5; Value fsmId; }; Vector states; Vector unknown1; Vector unknown2; Vector unknown3; }; std::unique_ptr detail; AT_DECL_EXPLICIT_DNA_YAML }; template bool ExtractFSM2(PAKEntryReadStream& rs, const hecl::ProjectPath& outPath); template bool WriteFSM2(const FSM2& fsm2, const hecl::ProjectPath& outPath); } #endif // __COMMON_FSM2_HPP__