#ifndef _DNAMP3_CAUD_HPP_ #define _DNAMP3_CAUD_HPP_ #include "../DNACommon/DNACommon.hpp" #include "../DNACommon/PAK.hpp" namespace DataSpec::DNAMP3 { struct CAUD : BigYAML { DECL_YAML DNAFourCC magic; Value version; String<-1> name; Value nameCount; Vector, DNA_COUNT(nameCount)> names; Value unknown1; Value unknown2; Value unknown3; Value unknown4; Value unknown5; struct CSMPInfo : BigYAML { DECL_YAML Value dataLen; UniqueID64 csmpId; Value unknown1; Value unknown2; Value unknown3; Value unknown4; Value unknown5; Value unknown6; Value unknown7; Value unknown8; Value unknown9; Value unknown10; Value unknown11; Value unknown12; Value unknown13; Value unknown14[8]; struct UnknownStruct1 : BigYAML { DECL_YAML Value unknown1; Value unknown2; Value unknown3; Value unknown4; }; Value unknown15; Vector unknown16; struct UnknownStruct2 : BigYAML { DECL_YAML Value unknown1; Vector unknown2; Value unknown3; Value unknown4; Value unknown5; struct UnknownPair : BigYAML { DECL_YAML Value unknown1; Value unknown2; }; Value unknown6; Vector unknown7; struct UnknownQuad: BigYAML { Delete __dna_delete; Value unknown1; Value unknown2; Value unknown3; Value unknown4; Value unknown5[5]; void read(athena::io::IStreamReader& __dna_reader) { /* unknown1 */ unknown1 = __dna_reader.readFloatBig(); /* unknown2 */ unknown2 = __dna_reader.readFloatBig(); /* unknown3 */ unknown3 = __dna_reader.readUByte(); /* unknown4 */ unknown4 = __dna_reader.readUByte(); if (unknown4 == 5) { unknown5[0] = __dna_reader.readFloatBig(); unknown5[1] = __dna_reader.readFloatBig(); unknown5[2] = __dna_reader.readFloatBig(); unknown5[3] = __dna_reader.readFloatBig(); } } void write(athena::io::IStreamWriter& __dna_writer) const { /* unknown1 */ __dna_writer.writeFloatBig(unknown1); /* unknown2 */ __dna_writer.writeFloatBig(unknown2); /* unknown3 */ __dna_writer.writeUByte(unknown3); /* unknown4 */ __dna_writer.writeUByte(unknown4); if (unknown4 == 5) { __dna_writer.writeFloatBig(unknown5[0]); __dna_writer.writeFloatBig(unknown5[1]); __dna_writer.writeFloatBig(unknown5[2]); __dna_writer.writeFloatBig(unknown5[3]); } } void read(athena::io::YAMLDocReader& __dna_docin) { /* unknown1 */ unknown1 = __dna_docin.readFloat("unknown1"); /* unknown2 */ unknown2 = __dna_docin.readFloat("unknown2"); /* unknown3 */ unknown3 = __dna_docin.readUByte("unknown3"); /* unknown4 */ unknown4 = __dna_docin.readUByte("unknown4"); if (unknown4 == 5) { unknown5[0] = __dna_docin.readFloat("unknown5"); unknown5[1] = __dna_docin.readFloat("unknown5"); unknown5[2] = __dna_docin.readFloat("unknown5"); unknown5[3] = __dna_docin.readFloat("unknown5"); } } void write(athena::io::YAMLDocWriter& __dna_docout) const { /* unknown1 */ __dna_docout.writeFloat("unknown1", unknown1); /* unknown2 */ __dna_docout.writeFloat("unknown2", unknown2); /* unknown3 */ __dna_docout.writeUByte("unknown3", unknown3); /* unknown4 */ __dna_docout.writeUByte("unknown4", unknown4); if (unknown4 == 5) { __dna_docout.writeFloat("unknown5", unknown5[0]); __dna_docout.writeFloat("unknown5", unknown5[1]); __dna_docout.writeFloat("unknown5", unknown5[2]); __dna_docout.writeFloat("unknown5", unknown5[3]); } } const char* DNAType() { return "DataSpec::DNAMP3::CAUD::CSMPInfo::UnknownStruct2::UnknownQuad"; } size_t binarySize(size_t __isz) const { return __isz + 10 + (unknown4 == 5 ? sizeof(float) * 4 : 0); } }; Value unknown8; Vector unknown9; }; UnknownStruct2 unknown17[4]; Value unknown18; Value unknown19; Value unknown20; Value unknown21; Value unknown22; Value unknown23; Value unknown24; Value unknown25; Value unknown26; Value unknown27; Value unknown28; struct UnknownStruct3 : BigYAML { DECL_YAML Value unknown1; Value unknown2; Value unknown3; Value unknown4; }; Vector unknown29; Value unknown30; Value unknown31; }; Value infoCount; Vector info; static bool Extract(PAKEntryReadStream& rs, const hecl::ProjectPath& outPath) { CAUD caud; caud.read(rs); athena::io::FileWriter writer(outPath.getAbsolutePath()); caud.toYAMLStream(writer); return true; } }; } #endif // _DNAMP3_CAUD_HPP_