You've already forked PrimeRemasterStructs
mirror of
https://github.com/PrimeDecomp/PrimeRemasterStructs.git
synced 2026-03-31 14:23:23 -07:00
203 lines
4.1 KiB
Plaintext
203 lines
4.1 KiB
Plaintext
#ifndef _NMODCONFORMAT
|
|
#define _NMODCONFORMAT
|
|
|
|
#include "CCollisionTree.bt"
|
|
#include "CColor4f.bt"
|
|
#include "CRenderOctree.bt"
|
|
#include "SAtlasLookup.bt"
|
|
|
|
struct ModConHeader {
|
|
uint32 unk;
|
|
};
|
|
|
|
struct ModConVisualData {
|
|
uint32 count;
|
|
if (count > 0) {
|
|
CGuid modelId[count];
|
|
}
|
|
|
|
uint32 count2;
|
|
if (count2 > 0) {
|
|
CGuid ids2[count2];
|
|
}
|
|
|
|
uint32 colorCount;
|
|
if (colorCount > 0) {
|
|
CColor4f color[colorCount];
|
|
}
|
|
|
|
uint32 transformCount;
|
|
if (transformCount > 0) {
|
|
CTransform4f xf[transformCount];
|
|
}
|
|
|
|
uint32 objectTransformCount;
|
|
if (objectTransformCount > 0) {
|
|
struct {
|
|
CGuid id;
|
|
CTransform4f xf;
|
|
} objectXf[objectTransformCount];
|
|
}
|
|
|
|
uint32 unkCount;
|
|
if (unkCount > 0) {
|
|
// ?
|
|
struct {
|
|
float x;
|
|
float y;
|
|
uint32 z;
|
|
uint32 w[z];
|
|
} unk[unkCount] <optimize = false>;
|
|
}
|
|
|
|
uint32 byteCount2;
|
|
if (byteCount2 > 0) {
|
|
byte bytes2[byteCount2];
|
|
}
|
|
|
|
uint32 byteCount3;
|
|
if (byteCount3 > 0) {
|
|
byte bytes3[byteCount3];
|
|
}
|
|
|
|
uint32 byteCount4;
|
|
if (byteCount4 > 0) {
|
|
byte bytes4[byteCount4];
|
|
}
|
|
|
|
uint32 byteCount5;
|
|
if (byteCount5 > 0) {
|
|
byte bytes5[byteCount5];
|
|
}
|
|
|
|
uint32 byteCount6;
|
|
if (byteCount6 > 0) {
|
|
byte bytes6[byteCount6];
|
|
}
|
|
|
|
uint32 shortCount;
|
|
if (shortCount > 0) {
|
|
uint16 shorts[shortCount];
|
|
}
|
|
|
|
uint32 shortCount2;
|
|
if (shortCount2 > 0) {
|
|
uint16 shorts2[shortCount2];
|
|
}
|
|
|
|
uint32 byteCount7;
|
|
if (byteCount7 > 0) {
|
|
byte bytes7[byteCount7];
|
|
}
|
|
|
|
uint32 byteCount8;
|
|
if (byteCount8 > 0) {
|
|
byte bytes8[byteCount8];
|
|
}
|
|
|
|
uint32 dwordCount;
|
|
if (dwordCount > 0) {
|
|
uint32 dwords[dwordCount];
|
|
}
|
|
|
|
uint32 unkCount1;
|
|
uint32 unkCount2;
|
|
|
|
uint32 atlasLookupCount1;
|
|
if (atlasLookupCount1 > 0) {
|
|
SAtlasLookup atlasLookup1[atlasLookupCount1];
|
|
}
|
|
|
|
uint32 atlasLookupCount2;
|
|
if (atlasLookupCount2 > 0) {
|
|
SAtlasLookup atlasLookup2[atlasLookupCount2];
|
|
}
|
|
|
|
uint32 renderOctreeFlags;
|
|
if (renderOctreeFlags != 0) {
|
|
CRenderOctree renderOctree;
|
|
}
|
|
};
|
|
|
|
typedef struct {
|
|
uint32 unk1;
|
|
uint32 intCount;
|
|
if (intCount) {
|
|
uint32 ints[intCount];
|
|
}
|
|
|
|
uint32 shortCount;
|
|
if (shortCount) {
|
|
uint16 shorts[shortCount];
|
|
}
|
|
} SModelVertexBlendData <optimize = false>;
|
|
|
|
typedef struct {
|
|
uint32 unkDataCount;
|
|
if (unkDataCount) {
|
|
byte unkData[unkDataCount];
|
|
}
|
|
uint32 unkIntCount;
|
|
if (unkIntCount) {
|
|
uint32 unkInts[unkIntCount];
|
|
}
|
|
|
|
uint32 modelVertexBlendDataCount;
|
|
if (modelVertexBlendDataCount) {
|
|
SModelVertexBlendData modelVertexBlendData[modelVertexBlendDataCount];
|
|
}
|
|
} SNodeVertexBlendData <optimize = false>;
|
|
|
|
struct ModConVertexBlendData {
|
|
uint32 vertexBlendDataCount;
|
|
if (vertexBlendDataCount) {
|
|
SNodeVertexBlendData vertexBlendData[vertexBlendData];
|
|
}
|
|
};
|
|
|
|
struct ModConChunk;
|
|
typedef struct {
|
|
if (ReadString(FTell(), 4) == "PEEK") {
|
|
struct {
|
|
FourCC id;
|
|
local uint64 size <hidden = true> = 0;
|
|
} desc;
|
|
local uint64 start <hidden = true> = FTell();
|
|
} else {
|
|
ChunkDescriptor desc;
|
|
local uint64 start <hidden = true> = FTell();
|
|
switch (desc.id) {
|
|
case "MCHD":
|
|
ModConHeader data;
|
|
break;
|
|
case "MCVD":
|
|
ModConVisualData data;
|
|
break;
|
|
case "MCCD":
|
|
CCollisionTree data(desc.size, kCOL_AABox);
|
|
break;
|
|
case "MCVB":
|
|
ModConVertexBlendData data;
|
|
break;
|
|
default:
|
|
if (desc.size > 0) {
|
|
byte data[desc.size];
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
FSeek(start + desc.size);
|
|
} ModConChunk <
|
|
name=(Str("%s chunk", desc.id)),
|
|
comment=(SizeComment(desc.size))
|
|
>;
|
|
|
|
struct CModConData(uint64 size) {
|
|
local uint64 start <hidden = true> = FTell();
|
|
while (FTell() + 4 < start + size) {
|
|
ModConChunk data;
|
|
}
|
|
};
|
|
|
|
#endif
|