mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2026-06-17 14:02:12 +00:00
feat: initial T4 support (#807)
* feat: initial T4 support * chore: adjust t4 symbols a bit for accuracy * chore: add PackIndex asset to T4 * chore: remove unused AssetXModelPieces * chore: add default and global asset pools loader for T4 * chore: use separate defines for T4 in ImageDumper * chore: remove unnecessary namespaces in gfximage_actions * chore: small things * chore: fix T4 PhysPreset type * chore: use proper XQuat2 type for T4 xanims * chore: fix errors on T4 types * chore: use iw3 like struct for XModelStreamInfo * docs: add basic docs for T4 * chore: add basic ObjCompiler setup for T4 * chore: adjust loaded sound definition * chore: make sure t4 material has the correct alignment * chore: make sure t4 uses similar names for assets as other games * fix: asset references should not be reusable * chore: add content writer for t4 * feat: add t4 localize loader * chore: reorder game ids to be alphabetically ordered --------- Co-authored-by: Jan Laupetin <jan@laupetin.net>
This commit is contained in:
@@ -0,0 +1,88 @@
|
||||
// =========================================
|
||||
// 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;
|
||||
// This is actually the count but it looks like a bug? It is used like a vec3, but it takes as much memory as vec4
|
||||
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;
|
||||
set reusable collmap;
|
||||
set count collmap 1;
|
||||
|
||||
// PhysGeomList
|
||||
use PhysGeomList;
|
||||
set reusable geoms;
|
||||
set count geoms count;
|
||||
|
||||
// PhysGeomInfo
|
||||
set reusable PhysGeomInfo::brush;
|
||||
set allocalign PhysGeomInfo::brush 4;
|
||||
|
||||
// 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
|
||||
set reusable cbrushside_t::plane;
|
||||
|
||||
// XSurface
|
||||
use XSurface;
|
||||
set reusable verts0;
|
||||
set block verts0 XFILE_BLOCK_VIRTUAL;
|
||||
set count verts0 vertCount;
|
||||
set condition vb0 never;
|
||||
set reusable vertList;
|
||||
set count vertList vertListCount;
|
||||
set reusable triIndices;
|
||||
set block triIndices XFILE_BLOCK_VIRTUAL;
|
||||
set allocalign triIndices 16;
|
||||
set count triIndices triCount;
|
||||
set condition indexBuffer never;
|
||||
reorder:
|
||||
zoneHandle
|
||||
vertInfo
|
||||
verts0
|
||||
vertList
|
||||
triIndices;
|
||||
|
||||
// XSurfaceVertexInfo
|
||||
use XSurfaceVertexInfo;
|
||||
set reusable vertsBlend;
|
||||
set count vertsBlend vertCount[0]
|
||||
+ 3 * vertCount[1]
|
||||
+ 5 * vertCount[2]
|
||||
+ 7 * vertCount[3];
|
||||
|
||||
// XRigidVertList
|
||||
set reusable XRigidVertList::collisionTree;
|
||||
|
||||
// XSurfaceCollisionTree
|
||||
use XSurfaceCollisionTree;
|
||||
set count nodes nodeCount;
|
||||
set count leafs leafCount;
|
||||
|
||||
// XModelCollSurf_s
|
||||
set count XModelCollSurf_s::collTris numCollTris;
|
||||
Reference in New Issue
Block a user