Add WMDL header

This commit is contained in:
Phillip Stephens
2023-02-15 12:24:27 -08:00
parent 576d94b013
commit 018504648e
3 changed files with 44 additions and 1 deletions
+16 -1
View File
@@ -3,6 +3,7 @@
#include "CAABox.bt"
#include "CEvalSystem.bt"
#include "CVector4i.bt"
#include "CRenderOctree.bt"
struct SModelAnimatedUVData {
CEvalSystem evalSystem;
@@ -92,6 +93,10 @@ struct SSkinnedModelHeader {
uint data[dataCount];
};
struct SWorldModelHeader {
uchar unk;
};
typedef struct{
char type[4];
char format[4];
@@ -343,7 +348,6 @@ typedef struct {
struct SMeshLoadInformation {
uint meshCount;
CRenderMesh meshes[meshCount];
uint unk;
};
typedef struct {
@@ -351,6 +355,17 @@ typedef struct {
local uint pos<format = hex, hidden = true> = FTell();
switch (chunk.id) {
case "WDHD":
SWorldModelHeader worldHeader;
CRenderOctree renderOctree;
uint aaboxCount;
CAABox aaboxes[aaboxCount];
uint floatCount;
float floats[floatCount];
ushort unk;
uint shortCount;
ushort shorts[shortCount];
break;
case "HEAD":
ModelHeader header;
break;
+27
View File
@@ -0,0 +1,27 @@
#ifndef _CRENDEROCTREE
#define _CRENDEROCTREE
#include "Common.bt"
#include "CAABox.bt"
struct CRenderOctree {
struct SHeader {
FourCC fcc;
uint version;
uint bitmaskCount;
uint bitmaskNumBits;
uint entryNodeCount;
CAABox bounds;
};
SHeader header;
uint bitmaskWordCount;
uint bitmaskWords[bitmaskWordCount];
uint edgeOffsetCount;
uint edgeOffsets[edgeOffsetCount];
uint dataSize;
char data[dataSize];
uint aaboxCount;
CAABox aaboxes[aaboxCount];
};
#endif// _CRENDEROCTREE
+1
View File
@@ -44,6 +44,7 @@ typedef struct
break;
case "CMDL":
case "SMDL":
case "WMDL":
ModelFile model(form.size);
break;
case "MSBT":