metaforce/DataSpec/DNAMP3/CAUD.hpp

122 lines
3.5 KiB
C++
Raw Normal View History

2016-08-31 08:32:43 +00:00
#ifndef _DNAMP3_CAUD_HPP_
#define _DNAMP3_CAUD_HPP_
#include "../DNACommon/DNACommon.hpp"
#include "../DNACommon/PAK.hpp"
2017-12-29 08:08:12 +00:00
namespace DataSpec::DNAMP3
2016-08-31 08:32:43 +00:00
{
2018-02-22 07:24:51 +00:00
struct CAUD : BigDNA
2016-08-31 08:32:43 +00:00
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-08-31 08:32:43 +00:00
DNAFourCC magic;
Value<atUint32> version;
String<-1> name;
Value<atUint32> nameCount;
2018-02-25 08:23:27 +00:00
Vector<String<-1>, AT_DNA_COUNT(nameCount)> names;
2016-08-31 08:32:43 +00:00
Value<float> unknown1;
Value<atUint32> unknown2;
Value<float> unknown3;
Value<float> unknown4;
Value<atUint32> unknown5;
2018-02-22 07:24:51 +00:00
struct CSMPInfo : BigDNA
2016-08-31 08:32:43 +00:00
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-08-31 08:32:43 +00:00
Value<atUint32> dataLen;
UniqueID64 csmpId;
Value<float> unknown1;
Value<atUint32> unknown2;
Value<atUint32> unknown3;
Value<float> unknown4;
Value<float> unknown5;
Value<float> unknown6;
Value<atUint32> unknown7;
Value<atUint32> unknown8;
Value<atUint32> unknown9;
Value<atUint32> unknown10;
Value<float> unknown11;
Value<float> unknown12;
Value<float> unknown13;
Value<atUint8> unknown14[8];
2018-02-22 07:24:51 +00:00
struct UnknownStruct1 : BigDNA
2016-08-31 08:32:43 +00:00
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-08-31 08:32:43 +00:00
Value<float> unknown1;
Value<float> unknown2;
Value<atUint8> unknown3;
Value<atUint8> unknown4;
};
Value<atUint32> unknown15;
2018-02-25 08:23:27 +00:00
Vector<UnknownStruct1, AT_DNA_COUNT(unknown15)> unknown16;
2018-02-22 07:24:51 +00:00
struct UnknownStruct2 : BigDNA
2016-08-31 08:32:43 +00:00
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-08-31 08:32:43 +00:00
Value<atUint8> unknown1;
2018-02-25 08:23:27 +00:00
Vector<atUint8, AT_DNA_COUNT(unknown1)> unknown2;
2016-08-31 08:32:43 +00:00
Value<float> unknown3;
Value<float> unknown4;
Value<atUint16> unknown5;
2018-02-22 07:24:51 +00:00
struct UnknownPair : BigDNA
2016-08-31 08:32:43 +00:00
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-08-31 08:32:43 +00:00
Value<float> unknown1;
Value<atInt32> unknown2;
};
Value<atUint16> unknown6;
2018-02-25 08:23:27 +00:00
Vector<UnknownPair, AT_DNA_COUNT(unknown6)> unknown7;
2018-02-22 07:24:51 +00:00
struct UnknownQuad: BigDNA
2016-08-31 08:32:43 +00:00
{
2018-02-22 07:24:51 +00:00
AT_DECL_EXPLICIT_DNA_YAML
2016-08-31 08:32:43 +00:00
Value<float> unknown1;
Value<float> unknown2;
Value<atUint8> unknown3;
Value<atUint8> unknown4;
Value<float> unknown5[5];
};
Value<atUint16> unknown8;
2018-02-25 08:23:27 +00:00
Vector<UnknownQuad, AT_DNA_COUNT(unknown8)> unknown9;
2016-08-31 08:32:43 +00:00
};
UnknownStruct2 unknown17[4];
Value<atUint16> unknown18;
Value<float> unknown19;
Value<atUint8> unknown20;
Value<atUint8> unknown21;
Value<atUint8> unknown22;
Value<atUint8> unknown23;
Value<atUint8> unknown24;
Value<atUint8> unknown25;
Value<atUint8> unknown26;
Value<atUint8> unknown27;
Value<atUint8> unknown28;
2018-02-22 07:24:51 +00:00
struct UnknownStruct3 : BigDNA
2016-08-31 08:32:43 +00:00
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-08-31 08:32:43 +00:00
Value<atUint32> unknown1;
Value<float> unknown2;
Value<atUint8> unknown3;
Value<atUint8> unknown4;
};
2018-02-25 08:23:27 +00:00
Vector<UnknownStruct3, AT_DNA_COUNT(unknown27)> unknown29;
2016-08-31 08:32:43 +00:00
Value<float> unknown30;
Value<float> unknown31;
};
Value<atUint32> infoCount;
2018-02-25 08:23:27 +00:00
Vector<CSMPInfo, AT_DNA_COUNT(infoCount)> info;
2016-08-31 08:32:43 +00:00
static bool Extract(PAKEntryReadStream& rs, const hecl::ProjectPath& outPath)
{
CAUD caud;
caud.read(rs);
athena::io::FileWriter writer(outPath.getAbsolutePath());
2018-02-22 07:24:51 +00:00
athena::io::ToYAMLStream(caud, writer);
2016-08-31 08:32:43 +00:00
return true;
}
};
}
#endif // _DNAMP3_CAUD_HPP_