diff --git a/CAudioSample.bt b/CAudioSample.bt new file mode 100644 index 0000000..c5cfbfc --- /dev/null +++ b/CAudioSample.bt @@ -0,0 +1,45 @@ +#ifndef _CAUDIOSAMPLE +#define _CAUDIOSAMPLE + +#include "CChunkDescriptor.bt" + +typedef struct SPCMFormatInfo { + ushort unk1; + uchar unk2; +} SPCMFormatInfo; + +typedef struct CSampleEnvelopeData { + uint unk1; + uchar unk2; + uint unk3; + if (unk3) { + char unkData[unk3]; + } +} CSampleEnvelopeData; + +typedef struct CAudioSample(uint64 size) { + local uint64 start = FTell(); + + while (FTell() < start + size) { + ChunkDescriptor chunk; + switch (chunk.id) { + case "FMT\x20": + uchar unk1; + SPCMFormatInfo pcmFormatInfo; + break; + case "FMTA": + uchar unk1; + uint unk2; + break; + case "CRMS": + CSampleEnvelopeData envelopeData; + break; + case "DATA": + char pcmData[chunk.size]; + break; + } + } +} +CAudioSample; + +#endif // _CAUDIOSAMPLE diff --git a/CModCondData.bt b/CModCondData.bt new file mode 100644 index 0000000..442da93 --- /dev/null +++ b/CModCondData.bt @@ -0,0 +1,128 @@ +#ifndef _CMODCONDDATA +#define _CMODCONDDATA + +#include "CCollisionTree.bt" +#include "CColor4f.bt" +#include "CRenderOctree.bt" +#include "SAtlasLookup.bt" + +typedef struct { + typedef struct { + ChunkDescriptor mchd; + uint unk; + } SModCondHeader; + + SModCondHeader header; + ChunkDescriptor mcvd; + uint modelGuidCount; + if (modelGuidCount) { + struct { + GUID guid; + } modelGuids[modelGuidCount]; + } + uint unkGuidCount; + if (unkGuidCount) { + struct { + GUID guid; + } unkGuids[unkGuidCount]; + } + uint colorCount; + if (colorCount) { + CColor4f colors[colorCount]; + } + + uint transformCount; + if (transformCount) { + CTransform4f transforms[transformCount]; + } + + uint guidXfCount; + if (guidXfCount) { + struct { + GUID guid; + CTransform4f xf; + } guidXf[guidXfCount]; + } + + uint dataCount1; + if (dataCount1) { + char data1[dataCount1]; + } + uint shortCount1; + if (shortCount1) { + ushort shorts1[shortCount1]; + } + uint shortCount2; + if (shortCount2) { + ushort shorts2[shortCount2]; + } + + uint dataCount2; + if (dataCount2) { + char data2[dataCount2]; + } + + uint dataCount3; + if (dataCount3) { + char data3[dataCount3]; + } + + uint atlasLookupCount1; + if (atlasLookupCount1) { + SAtlasLookup atlasLookups1[atlasLookupCount1]; + } + + uint atlasLookupCount2; + if (atlasLookupCount2) { + SAtlasLookup atlasLookups2[atlasLookupCount2]; + } + + uint hasRenderOctree; + if (hasRenderOctree) { + CRenderOctree renderOctree; + } + + typedef struct SModelVertexBlendData { + uint unk1; + uint intCount; + if (intCount) { + uint ints[intCount]; + } + + uint shortCount; + if (shortCount) { + ushort shorts[shortCount]; + } + } SModelVertexBlendData; + if (ReadInt(FTell()) == 0x4D435642) { + typedef struct SNodeVertexBlendData { + uint unkDataCount; + if (unkDataCount) { + char unkData[unkDataCount]; + } + uint unkIntCount; + if (unkIntCount) { + uint unkInts[unkIntCount]; + } + + uint modelVertexBlendDataCount; + if (modelVertexBlendDataCount) { + SModelVertexBlendData + modelVertexBlendData[modelVertexBlendDataCount]; + } + } SNodeVertexBlendData; + + uint vertexBlendDataCount; + if (vertexBlendDataCount) { + SNodeVertexBlendData vertexBlendData[vertexBlendData]; + } + } + + if (ReadInt(FTell()) == 0x4443434D) { + ChunkDescriptor mccd; + CCollisionTree aaboxCollision(mccd.size, kCOL_AABox); + } + FourCC PEEK; +} CModCondData; + +#endif // _CMODCONDDATA diff --git a/SAtlasLookup.bt b/SAtlasLookup.bt new file mode 100644 index 0000000..22743dc --- /dev/null +++ b/SAtlasLookup.bt @@ -0,0 +1,11 @@ +#ifndef _SATLASLOOKUP +#define _SATLASLOOKUP + +struct SAtlasLookup { + float unkA; + float unkB; + float unkC; + float unkD; +}; + +#endif// _SATLASLOOKUP