// =========================================
// XModel
// =========================================
use XModel;
set block XFILE_BLOCK_TEMP;
set string name;
set scriptstring boneNames;
set reusable boneNames;
set count boneNames numBones;
set reusable parentList;
set count parentList numBones - numRootBones;
set reusable quats;
set count quats numBones - numRootBones;
set reusable trans;
set count trans (numBones - numRootBones) * 4;
set reusable partClassification;
set count partClassification numBones;
set reusable baseMat;
set count baseMat numBones;
set count surfs numsurfs;
set count materialHandles numsurfs;
set count collSurfs numCollSurfs;
set count boneInfo numBones;
set reusable physGeoms;
set count physGeoms 1;

// PhysGeomList
set count PhysGeomList::geoms count;

// PhysGeomInfo
use PhysGeomInfo;
set reusable brush;

// BrushWrapper
use BrushWrapper;
set count sides numsides;
set count baseAdjacentSide totalEdgeCount;
set reusable verts;
set count verts numverts;
set reusable planes;
set count planes numsides;

// cbrushside_t
use cbrushside_t;
set reusable plane;

// XSurface
use XSurface;
set reusable verts0;
set allocalign verts0 16;
set count verts0 vertCount;
set condition vb0 never;
set reusable verts1;
set count verts1 vertCount;
set condition vb1 never;
set reusable vertList;
set count vertList vertListCount;
set reusable triIndices;
set count triIndices triCount;
set condition indexBuffer never;
reorder:
    vertInfo
    verts0
    verts1
    vertList
    triIndices;

// XSurfaceVertexInfo
use XSurfaceVertexInfo;
set reusable vertsBlend;
set count vertsBlend vertCount[0]
                         + 3 * vertCount[1]
                         + 5 * vertCount[2]
                         + 7 * vertCount[3];
set reusable tensionData;
set count tensionData 12 * (vertCount[0]
                            + vertCount[1]
                            + vertCount[2]
                            + vertCount[3]);

// XModelCollSurf_s
use XModelCollSurf_s;
set count collTris numCollTris;
