#ifndef __COMMON_FSM2_HPP__ #define __COMMON_FSM2_HPP__ #include "PAK.hpp" #include "DNACommon.hpp" #include "athena/FileWriter.hpp" namespace DataSpec { namespace DNAFSM2 { struct IFSM : BigYAML { Delete _d; }; template struct FSM2 : BigYAML { struct Header : BigYAML { DECL_YAML DNAFourCC magic; Value version; } header; struct CommonStruct : BigYAML { DECL_YAML String<-1> name; Value unknown; }; struct FSMV1 : IFSM { DECL_YAML Value stateCount; Value unknown1Count; Value unknown2Count; Value unknown3Count; struct State : BigYAML { DECL_YAML String<-1> name; Value unknownCount; Vector unknown; }; struct Unknown1 : BigYAML { DECL_YAML String<-1> name; Value unknown1; Value unknown2Count; Vector unknown2; Value unknown3; }; struct Unknown2 : BigYAML { DECL_YAML String<-1> name; Value unknownCount; Vector unknown; }; struct Unknown3 : BigYAML { DECL_YAML String<-1> name; Value unknownCount; Vector unknown; IDType fsmId; }; Vector states; Vector unknown1; Vector unknown2; Vector unknown3; }; struct FSMV2 : IFSM { DECL_YAML Value stateCount; Value unknown1Count; Value unknown2Count; Value unknown3Count; struct State : BigYAML { DECL_YAML String<-1> name; Value unknown1; Value unknown2; Value unknown3; Value unknown4; Value unknown5Count; Vector unknown5; }; struct Unknown1 : BigYAML { DECL_YAML String<-1> name; Value unknown1; Value unknown2; Value unknown3; Value unknown4; Value unknown5; Value unknown6Count; Vector unknown6; Value unknown7; }; struct Unknown2 : BigYAML { DECL_YAML String<-1> name; Value unknown1; Value unknown2; Value unknown3; Value unknown4; Value unknown5Count; Vector unknown5; }; struct Unknown3 : BigYAML { DECL_YAML String<-1> name; Value unknown1; Value unknown2; Value unknown3; Value unknown4; Value unknown5Count; Vector unknown5; IDType fsmId; }; Vector states; Vector unknown1; Vector unknown2; Vector unknown3; }; void read(athena::io::IStreamReader& in); void write(athena::io::IStreamWriter& out) const; void read(athena::io::YAMLDocReader& in); void write(athena::io::YAMLDocWriter& out) const; std::unique_ptr detail; size_t binarySize(size_t __isz) const; static const char* DNAType(); const char* DNATypeV() const; }; template bool ExtractFSM2(PAKEntryReadStream& rs, const hecl::ProjectPath& outPath); template bool WriteFSM2(const FSM2& fsm2, const hecl::ProjectPath& outPath); } } #endif // __COMMON_FSM2_HPP__