diff --git a/CModCondData.bt b/CModCondData.bt deleted file mode 100644 index 442da93..0000000 --- a/CModCondData.bt +++ /dev/null @@ -1,128 +0,0 @@ -#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/NModConFormat.bt b/NModConFormat.bt index 4ae2802..66c04f1 100644 --- a/NModConFormat.bt +++ b/NModConFormat.bt @@ -1,6 +1,11 @@ #ifndef _NMODCONFORMAT #define _NMODCONFORMAT +#include "CCollisionTree.bt" +#include "CColor4f.bt" +#include "CRenderOctree.bt" +#include "SAtlasLookup.bt" + struct ModConHeader { uint32 unk; }; @@ -10,18 +15,22 @@ struct ModConVisualData { 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 { @@ -29,42 +38,82 @@ struct ModConVisualData { CTransform4f xf; } objectXf[objectTransformCount]; } + uint32 byteCount; if (byteCount > 0) { byte bytes[byteCount]; } + uint32 shortCount; if (shortCount > 0) { uint16 shorts[shortCount]; } + uint32 shortCount2; if (shortCount2 > 0) { uint16 shorts2[shortCount2]; } + uint32 byteCount2; if (byteCount2 > 0) { byte bytes2[byteCount2]; } + uint32 byteCount3; if (byteCount3 > 0) { byte bytes3[byteCount3]; } - uint32 atlasLookupCount; - if (atlasLookupCount > 0) { - SAtlasLookup atlasLookup[atlasLookupCount]; + + uint32 atlasLookupCount1; + if (atlasLookupCount1 > 0) { + SAtlasLookup atlasLookup1[atlasLookupCount1]; } + uint32 atlasLookupCount2; if (atlasLookupCount2 > 0) { SAtlasLookup atlasLookup2[atlasLookupCount2]; } + uint32 renderOctreeFlags; if (renderOctreeFlags != 0) { CRenderOctree renderOctree; } }; -struct ModConCollisionData { - ChunkDescriptor chunk; +typedef struct { + uint32 unk1; + uint32 intCount; + if (intCount) { + uint32 ints[intCount]; + } + + uint32 shortCount; + if (shortCount) { + uint16 shorts[shortCount]; + } +} SModelVertexBlendData ; + +typedef struct { + uint32 unkDataCount; + if (unkDataCount) { + byte unkData[unkDataCount]; + } + uint32 unkIntCount; + if (unkIntCount) { + uint32 unkInts[unkIntCount]; + } + + uint32 modelVertexBlendDataCount; + if (modelVertexBlendDataCount) { + SModelVertexBlendData modelVertexBlendData[modelVertexBlendDataCount]; + } +} SNodeVertexBlendData ; + +struct ModConVertexBlendData { + uint32 vertexBlendDataCount; + if (vertexBlendDataCount) { + SNodeVertexBlendData vertexBlendData[vertexBlendData]; + } }; struct ModConChunk; @@ -86,10 +135,10 @@ typedef struct { ModConVisualData data; break; case "MCCD": - // ModConCollisionData - while (FTell() < start + desc.size) { - ModConChunk chunk; - } + CCollisionTree data(desc.size, kCOL_AABox); + break; + case "MCVB": + ModConVertexBlendData data; break; default: if (desc.size > 0) { diff --git a/Run.bt b/Run.bt index b1f8bf8..a6e2605 100644 --- a/Run.bt +++ b/Run.bt @@ -95,9 +95,6 @@ typedef struct { case "CLSN": CCollisionTree aaboxCollisionTree(form.size, kCOL_AABox); break; - case "MCON": - CModCondData modCond; - break; case "CHPR": FCharInf charInfo; break;