mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2026-07-03 06:18:11 +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 @@
|
||||
# This file exists for automatically generating zone loading code.
|
||||
@@ -0,0 +1,71 @@
|
||||
// Game: World at War (T4)
|
||||
game T4;
|
||||
wordsize 32;
|
||||
|
||||
// Game Assets
|
||||
asset PhysPreset AssetPhysPreset;
|
||||
asset PhysConstraints AssetPhysConstraints;
|
||||
asset DestructibleDef AssetDestructibleDef;
|
||||
asset XAnimParts AssetXAnim;
|
||||
asset XModel AssetXModel;
|
||||
asset Material AssetMaterial;
|
||||
asset MaterialTechniqueSet AssetTechniqueSet;
|
||||
asset GfxImage AssetImage;
|
||||
asset snd_alias_list_t AssetSound;
|
||||
asset SndDriverGlobals AssetSoundDriverGlobals;
|
||||
asset LoadedSound AssetLoadedSound;
|
||||
asset clipMap_t AssetClipMapPvs;
|
||||
asset ComWorld AssetComWorld;
|
||||
asset GameWorldSp AssetGameWorldSp;
|
||||
asset GameWorldMp AssetGameWorldMp;
|
||||
asset MapEnts AssetMapEnts;
|
||||
asset GfxWorld AssetGfxWorld;
|
||||
asset GfxLightDef AssetLightDef;
|
||||
asset Font_s AssetFont;
|
||||
asset MenuList AssetMenuList;
|
||||
asset menuDef_t AssetMenu;
|
||||
asset LocalizeEntry AssetLocalize;
|
||||
asset WeaponDef AssetWeapon;
|
||||
asset FxEffectDef AssetFx;
|
||||
asset FxImpactTable AssetImpactFx;
|
||||
asset RawFile AssetRawFile;
|
||||
asset StringTable AssetStringTable;
|
||||
asset PackIndex AssetPackIndex;
|
||||
|
||||
// Setup blocks
|
||||
block temp XFILE_BLOCK_TEMP default;
|
||||
block runtime XFILE_BLOCK_RUNTIME default;
|
||||
block runtime XFILE_BLOCK_LARGE_RUNTIME;
|
||||
block runtime XFILE_BLOCK_PHYSICAL_RUNTIME;
|
||||
block normal XFILE_BLOCK_VIRTUAL default;
|
||||
block normal XFILE_BLOCK_LARGE;
|
||||
block normal XFILE_BLOCK_PHYSICAL;
|
||||
|
||||
#include "XAssets/PhysPreset.txt"
|
||||
#include "XAssets/PhysConstraints.txt"
|
||||
#include "XAssets/DestructibleDef.txt"
|
||||
#include "XAssets/XAnimParts.txt"
|
||||
#include "XAssets/XModel.txt"
|
||||
#include "XAssets/Material.txt"
|
||||
#include "XAssets/MaterialTechniqueSet.txt"
|
||||
#include "XAssets/GfxImage.txt"
|
||||
#include "XAssets/snd_alias_list_t.txt"
|
||||
#include "XAssets/SndDriverGlobals.txt"
|
||||
#include "XAssets/LoadedSound.txt"
|
||||
#include "XAssets/clipMap_t.txt"
|
||||
#include "XAssets/ComWorld.txt"
|
||||
#include "XAssets/GameWorldSp.txt"
|
||||
#include "XAssets/GameWorldMp.txt"
|
||||
#include "XAssets/MapEnts.txt"
|
||||
#include "XAssets/GfxWorld.txt"
|
||||
#include "XAssets/FxEffectDef.txt"
|
||||
#include "XAssets/LocalizeEntry.txt"
|
||||
#include "XAssets/WeaponDef.txt"
|
||||
#include "XAssets/MenuList.txt"
|
||||
#include "XAssets/menuDef_t.txt"
|
||||
#include "XAssets/FxImpactTable.txt"
|
||||
#include "XAssets/GfxLightDef.txt"
|
||||
#include "XAssets/Font_s.txt"
|
||||
#include "XAssets/RawFile.txt"
|
||||
#include "XAssets/StringTable.txt"
|
||||
#include "XAssets/PackIndex.txt"
|
||||
@@ -0,0 +1,12 @@
|
||||
#pragma once
|
||||
|
||||
// Entry point for T4 code generation
|
||||
|
||||
// clang-format off: Order of includes matters here
|
||||
|
||||
#include "../Common.h"
|
||||
#include "../../../Common/Game/T4/T4_Assets.h"
|
||||
|
||||
// clang-format on
|
||||
|
||||
// EOF
|
||||
@@ -0,0 +1,18 @@
|
||||
// =========================================
|
||||
// ComWorld
|
||||
// =========================================
|
||||
use ComWorld;
|
||||
set block XFILE_BLOCK_TEMP;
|
||||
set string name;
|
||||
set count primaryLights primaryLightCount;
|
||||
set allocalign waterCells 4;
|
||||
set count waterCells numWaterCells;
|
||||
set count burnableCells numBurnableCells;
|
||||
|
||||
// ComPrimaryLight
|
||||
use ComPrimaryLight;
|
||||
set string defName;
|
||||
|
||||
// ComBurnableCell
|
||||
use ComBurnableCell;
|
||||
set count data 32;
|
||||
@@ -0,0 +1,27 @@
|
||||
// =========================================
|
||||
// DestructibleDef
|
||||
// =========================================
|
||||
use DestructibleDef;
|
||||
set block XFILE_BLOCK_TEMP;
|
||||
set string name;
|
||||
set count pieces numPieces;
|
||||
|
||||
// DestructiblePiece
|
||||
use DestructiblePiece;
|
||||
set string attachBone;
|
||||
set scriptstring attachBoneHash;
|
||||
set scriptstring enableLabel;
|
||||
|
||||
// DestructibleModel
|
||||
use DestructibleModel;
|
||||
set string breakNotify;
|
||||
set string loopSound;
|
||||
|
||||
// SndAliasCustom
|
||||
use SndAliasCustom;
|
||||
set count name 1;
|
||||
set reusable name;
|
||||
set condition sound never;
|
||||
|
||||
// snd_alias_list_name
|
||||
set string snd_alias_list_name::soundName;
|
||||
@@ -0,0 +1,8 @@
|
||||
// =========================================
|
||||
// Font_s
|
||||
// =========================================
|
||||
use Font_s;
|
||||
set block XFILE_BLOCK_TEMP;
|
||||
set string fontName;
|
||||
set reusable glyphs;
|
||||
set count glyphs glyphCount;
|
||||
@@ -0,0 +1,44 @@
|
||||
// =========================================
|
||||
// FxEffectDef
|
||||
// =========================================
|
||||
use FxEffectDef;
|
||||
set block XFILE_BLOCK_TEMP;
|
||||
set string name;
|
||||
set count elemDefs elemDefCountEmission + elemDefCountLooping + elemDefCountOneShot;
|
||||
|
||||
// FxElemDef
|
||||
use FxElemDef;
|
||||
set count velSamples velIntervalCount + 1;
|
||||
set count visSamples visStateIntervalCount + 1;
|
||||
|
||||
// FxElemDefVisuals
|
||||
use FxElemDefVisuals;
|
||||
set condition markArray FxElemDef::elemType == FX_ELEM_TYPE_DECAL;
|
||||
set count markArray FxElemDef::visualCount;
|
||||
set condition array FxElemDef::visualCount > 1;
|
||||
set count array FxElemDef::visualCount;
|
||||
|
||||
// FxElemVisuals
|
||||
use FxElemVisuals;
|
||||
set condition anonymous never;
|
||||
set condition model FxElemDef::elemType == FX_ELEM_TYPE_MODEL;
|
||||
set condition effectDef FxElemDef::elemType == FX_ELEM_TYPE_RUNNER;
|
||||
set condition soundName FxElemDef::elemType == FX_ELEM_TYPE_SOUND;
|
||||
set string soundName;
|
||||
set condition material FxElemDef::elemType == FX_ELEM_TYPE_SPRITE_BILLBOARD
|
||||
|| FxElemDef::elemType == FX_ELEM_TYPE_SPRITE_ORIENTED
|
||||
|| FxElemDef::elemType == FX_ELEM_TYPE_TAIL
|
||||
|| FxElemDef::elemType == FX_ELEM_TYPE_TRAIL
|
||||
|| FxElemDef::elemType == FX_ELEM_TYPE_CLOUD
|
||||
|| FxElemDef::elemType == FX_ELEM_TYPE_SPARK_CLOUD;
|
||||
|
||||
// FxEffectDefRef
|
||||
use FxEffectDefRef;
|
||||
set condition handle never;
|
||||
set string name;
|
||||
set assetref name AssetFx;
|
||||
|
||||
// FxTrailDef
|
||||
use FxTrailDef;
|
||||
set count verts vertCount;
|
||||
set count inds indCount;
|
||||
@@ -0,0 +1,7 @@
|
||||
// =========================================
|
||||
// FxImpactTable
|
||||
// =========================================
|
||||
use FxImpactTable;
|
||||
set block XFILE_BLOCK_TEMP;
|
||||
set string name;
|
||||
set count table 16;
|
||||
@@ -0,0 +1,6 @@
|
||||
// =========================================
|
||||
// GameWorldMp
|
||||
// =========================================
|
||||
use GameWorldMp;
|
||||
set block XFILE_BLOCK_TEMP;
|
||||
set string name;
|
||||
@@ -0,0 +1,39 @@
|
||||
// =========================================
|
||||
// GameWorldSp
|
||||
// =========================================
|
||||
use GameWorldSp;
|
||||
set block XFILE_BLOCK_TEMP;
|
||||
set string name;
|
||||
|
||||
// PathData
|
||||
use PathData;
|
||||
set count nodes nodeCount;
|
||||
set block basenodes XFILE_BLOCK_RUNTIME;
|
||||
set count basenodes nodeCount;
|
||||
set count chainNodeForNode nodeCount;
|
||||
set count nodeForChainNode nodeCount;
|
||||
set count pathVis visBytes;
|
||||
set count nodeTree nodeTreeCount;
|
||||
|
||||
// pathnode_t
|
||||
set condition pathnode_t::transient never;
|
||||
|
||||
// pathnode_constant_t
|
||||
use pathnode_constant_t;
|
||||
set scriptstring targetname;
|
||||
set scriptstring script_linkName;
|
||||
set scriptstring script_noteworthy;
|
||||
set scriptstring target;
|
||||
set scriptstring animscript;
|
||||
set count Links totalLinkCount;
|
||||
|
||||
// pathnode_dynamic_t
|
||||
set condition pathnode_dynamic_t::pOwner never;
|
||||
|
||||
// pathnode_tree_t
|
||||
use pathnode_tree_t;
|
||||
set condition u::child axis >= 0;
|
||||
set reusable u::child;
|
||||
|
||||
// pathnode_tree_nodes_t
|
||||
set count pathnode_tree_nodes_t::nodes nodeCount;
|
||||
@@ -0,0 +1,20 @@
|
||||
// =========================================
|
||||
// GfxImage
|
||||
// =========================================
|
||||
use GfxImage;
|
||||
set block XFILE_BLOCK_TEMP;
|
||||
set action OnImageLoaded(GfxImage);
|
||||
set string name;
|
||||
reorder:
|
||||
name
|
||||
texture;
|
||||
|
||||
// GfxTexture
|
||||
use GfxTexture;
|
||||
set reusable loadDef;
|
||||
set block loadDef XFILE_BLOCK_TEMP;
|
||||
|
||||
// GfxImageLoadDef
|
||||
use GfxImageLoadDef;
|
||||
set action LoadImageData(GfxImageLoadDef, GfxImage);
|
||||
set arraysize data resourceSize;
|
||||
@@ -0,0 +1,6 @@
|
||||
// =========================================
|
||||
// GfxLightDef
|
||||
// =========================================
|
||||
use GfxLightDef;
|
||||
set block XFILE_BLOCK_TEMP;
|
||||
set string name;
|
||||
@@ -0,0 +1,138 @@
|
||||
// =========================================
|
||||
// GfxWorld
|
||||
// =========================================
|
||||
use GfxWorld;
|
||||
set block XFILE_BLOCK_TEMP;
|
||||
set string name;
|
||||
set string baseName;
|
||||
set count indices indexCount;
|
||||
set count skyStartSurfs skySurfCount;
|
||||
set string skyBoxModel;
|
||||
set reusable sunLight;
|
||||
set count reflectionProbes reflectionProbeCount;
|
||||
set block reflectionProbeTextures XFILE_BLOCK_RUNTIME;
|
||||
set count reflectionProbeTextures reflectionProbeCount;
|
||||
set count coronas coronaCount;
|
||||
set count cells dpvsPlanes::cellCount;
|
||||
set count lightmaps lightmapCount;
|
||||
set block lightmapPrimaryTextures XFILE_BLOCK_RUNTIME;
|
||||
set count lightmapPrimaryTextures lightmapCount;
|
||||
set block lightmapSecondaryTextures XFILE_BLOCK_RUNTIME;
|
||||
set count lightmapSecondaryTextures lightmapCount;
|
||||
set count models modelCount;
|
||||
set count materialMemory materialMemoryCount;
|
||||
set block cellCasterBits XFILE_BLOCK_RUNTIME;
|
||||
set count cellCasterBits dpvsPlanes::cellCount * ((dpvsPlanes::cellCount + 31) / 32);
|
||||
set block sceneDynModel XFILE_BLOCK_RUNTIME;
|
||||
set count sceneDynModel dpvsDyn::dynEntClientCount[0];
|
||||
set block sceneDynBrush XFILE_BLOCK_RUNTIME;
|
||||
set count sceneDynBrush dpvsDyn::dynEntClientCount[1];
|
||||
set block primaryLightEntityShadowVis XFILE_BLOCK_RUNTIME;
|
||||
set count primaryLightEntityShadowVis (primaryLightCount - sunPrimaryLightIndex - 1) * 0x2000;
|
||||
set block primaryLightDynEntShadowVis XFILE_BLOCK_RUNTIME;
|
||||
set count primaryLightDynEntShadowVis[0] dpvsDyn::dynEntClientCount[0] * (primaryLightCount - sunPrimaryLightIndex - 1);
|
||||
set count primaryLightDynEntShadowVis[1] dpvsDyn::dynEntClientCount[1] * (primaryLightCount - sunPrimaryLightIndex - 1);
|
||||
set block nonSunPrimaryLightForModelDynEnt XFILE_BLOCK_RUNTIME;
|
||||
set count nonSunPrimaryLightForModelDynEnt dpvsDyn::dynEntClientCount[0];
|
||||
set count shadowGeom primaryLightCount;
|
||||
set count lightRegion primaryLightCount;
|
||||
set count worldLodChains worldLodChainCount;
|
||||
set count worldLodInfos worldLodInfoCount;
|
||||
set count worldLodSurfaces worldLodSurfaceCount;
|
||||
reorder:
|
||||
...
|
||||
materialMemory
|
||||
vd
|
||||
vld;
|
||||
|
||||
// GfxWorldDpvsPlanes
|
||||
use GfxWorldDpvsPlanes;
|
||||
set reusable planes;
|
||||
set count planes GfxWorld::planeCount;
|
||||
set count nodes GfxWorld::nodeCount;
|
||||
set block sceneEntCellBits XFILE_BLOCK_RUNTIME;
|
||||
set count sceneEntCellBits cellCount * 0x100;
|
||||
|
||||
// GfxCell
|
||||
use GfxCell;
|
||||
set count aabbTree aabbTreeCount;
|
||||
set count portals portalCount;
|
||||
set count cullGroups cullGroupCount;
|
||||
set count reflectionProbes reflectionProbeCount;
|
||||
|
||||
// GfxAabbTree
|
||||
use GfxAabbTree;
|
||||
set reusable smodelIndexes;
|
||||
set count smodelIndexes smodelIndexCount;
|
||||
|
||||
// GfxPortal
|
||||
use GfxPortal;
|
||||
set condition writable never;
|
||||
set reusable cell;
|
||||
set count vertices vertexCount;
|
||||
|
||||
// GfxLightGrid
|
||||
use GfxLightGrid;
|
||||
set count rowDataStart maxs[rowAxis] - mins[rowAxis] + 1;
|
||||
set count rawRowData rawRowDataSize;
|
||||
set count entries entryCount;
|
||||
set count colors colorCount;
|
||||
|
||||
// GfxWorldVertexData
|
||||
use GfxWorldVertexData;
|
||||
set count vertices GfxWorld::vertexCount;
|
||||
set condition worldVb never;
|
||||
|
||||
// GfxWorldVertexLayerData
|
||||
use GfxWorldVertexLayerData;
|
||||
set count data GfxWorld::vertexLayerDataSize;
|
||||
set condition layerVb never;
|
||||
|
||||
// GfxShadowGeometry
|
||||
use GfxShadowGeometry;
|
||||
set count sortedSurfIndex surfaceCount;
|
||||
set count smodelIndex smodelCount;
|
||||
|
||||
// GfxLightRegion
|
||||
use GfxLightRegion;
|
||||
set count hulls hullCount;
|
||||
|
||||
// GfxLightRegionHull
|
||||
use GfxLightRegionHull;
|
||||
set count axis axisCount;
|
||||
|
||||
// GfxWorldDpvsStatic
|
||||
use GfxWorldDpvsStatic;
|
||||
set block smodelVisData XFILE_BLOCK_RUNTIME;
|
||||
set count smodelVisData smodelCount;
|
||||
set block surfaceVisData XFILE_BLOCK_RUNTIME;
|
||||
set count surfaceVisData staticSurfaceCount;
|
||||
set block lodData XFILE_BLOCK_RUNTIME;
|
||||
set count lodData 2 * smodelVisDataCount;
|
||||
set count sortedSurfIndex staticSurfaceCount;
|
||||
set count smodelInsts smodelCount;
|
||||
set count surfaces GfxWorld::surfaceCount;
|
||||
set count cullGroups GfxWorld::cullGroupCount;
|
||||
set count smodelDrawInsts smodelCount;
|
||||
set block surfaceMaterials XFILE_BLOCK_RUNTIME;
|
||||
set count surfaceMaterials staticSurfaceCount;
|
||||
set allocalign surfaceMaterials 4;
|
||||
set block surfaceCastsSunShadow XFILE_BLOCK_RUNTIME;
|
||||
set count surfaceCastsSunShadow surfaceVisDataCount;
|
||||
|
||||
// GfxWorldDpvsDynamic
|
||||
use GfxWorldDpvsDynamic;
|
||||
set block dynEntCellBits XFILE_BLOCK_RUNTIME;
|
||||
set count dynEntCellBits[0] dynEntClientWordCount[0] * GfxWorld::dpvsPlanes::cellCount;
|
||||
set count dynEntCellBits[1] dynEntClientWordCount[1] * GfxWorld::dpvsPlanes::cellCount;
|
||||
set block dynEntVisData XFILE_BLOCK_RUNTIME;
|
||||
set count dynEntVisData[0][0] 32 * dynEntClientWordCount[0];
|
||||
set count dynEntVisData[1][0] 32 * dynEntClientWordCount[1];
|
||||
set count dynEntVisData[0][1] 32 * dynEntClientWordCount[0];
|
||||
set count dynEntVisData[1][1] 32 * dynEntClientWordCount[1];
|
||||
set count dynEntVisData[0][2] 32 * dynEntClientWordCount[0];
|
||||
set count dynEntVisData[1][2] 32 * dynEntClientWordCount[1];
|
||||
|
||||
// GfxWaterBuffer
|
||||
use GfxWaterBuffer;
|
||||
set count buffer bufferSize / 16;
|
||||
@@ -0,0 +1,10 @@
|
||||
// =========================================
|
||||
// LoadedSound
|
||||
// =========================================
|
||||
use LoadedSound;
|
||||
set block XFILE_BLOCK_TEMP;
|
||||
set string name;
|
||||
|
||||
// snd_asset
|
||||
use snd_asset;
|
||||
set count data data_size;
|
||||
@@ -0,0 +1,7 @@
|
||||
// =========================================
|
||||
// LocalizeEntry
|
||||
// =========================================
|
||||
use LocalizeEntry;
|
||||
set block XFILE_BLOCK_TEMP;
|
||||
set string name;
|
||||
set string value;
|
||||
@@ -0,0 +1,7 @@
|
||||
// =========================================
|
||||
// MapEnts
|
||||
// =========================================
|
||||
use MapEnts;
|
||||
set block XFILE_BLOCK_TEMP;
|
||||
set string name;
|
||||
set count entityString numEntityChars;
|
||||
@@ -0,0 +1,23 @@
|
||||
// =========================================
|
||||
// Material
|
||||
// =========================================
|
||||
use Material;
|
||||
set block XFILE_BLOCK_TEMP;
|
||||
set allocalign Material 4;
|
||||
set string info::name;
|
||||
set reusable textureTable;
|
||||
set count textureTable textureCount;
|
||||
set reusable constantTable;
|
||||
set count constantTable constantCount;
|
||||
set reusable stateBitsTable;
|
||||
set count stateBitsTable stateBitsCount;
|
||||
|
||||
// MaterialTextureDef
|
||||
use MaterialTextureDef;
|
||||
set condition u::water semantic == TS_WATER_MAP;
|
||||
set reusable u::water;
|
||||
|
||||
// water_t
|
||||
use water_t;
|
||||
set count H0 N * M;
|
||||
set count wTerm N * M;
|
||||
@@ -0,0 +1,55 @@
|
||||
// =========================================
|
||||
// MaterialTechniqueSet
|
||||
// =========================================
|
||||
use MaterialTechniqueSet;
|
||||
set block XFILE_BLOCK_TEMP;
|
||||
set string name;
|
||||
set condition remappedTechniqueSet never;
|
||||
set reusable techniques;
|
||||
|
||||
// MaterialTechnique
|
||||
use MaterialTechnique;
|
||||
set string name;
|
||||
set arraysize passArray passCount;
|
||||
reorder:
|
||||
passArray
|
||||
name;
|
||||
|
||||
// MaterialPass
|
||||
use MaterialPass;
|
||||
set count args perPrimArgCount + perObjArgCount + stableArgCount;
|
||||
set reusable vertexDecl;
|
||||
set reusable vertexShader;
|
||||
set reusable pixelShader;
|
||||
|
||||
// MaterialShaderArgument
|
||||
use MaterialShaderArgument;
|
||||
set condition u::literalConst type == MTL_ARG_LITERAL_VERTEX_CONST
|
||||
|| type == MTL_ARG_LITERAL_PIXEL_CONST;
|
||||
set reusable u::literalConst;
|
||||
set condition u::codeConst type == MTL_ARG_CODE_VERTEX_CONST
|
||||
|| type == MTL_ARG_CODE_PIXEL_CONST;
|
||||
set condition u::codeSampler type == MTL_ARG_CODE_PIXEL_SAMPLER;
|
||||
set condition u::nameHash type == MTL_ARG_MATERIAL_VERTEX_CONST
|
||||
|| type == MTL_ARG_MATERIAL_PIXEL_CONST || type == MTL_ARG_MATERIAL_PIXEL_SAMPLER;
|
||||
|
||||
// MaterialPixelShader
|
||||
set string MaterialPixelShader::name;
|
||||
|
||||
// GfxPixelShaderLoadDef
|
||||
set count GfxPixelShaderLoadDef::program programSize;
|
||||
|
||||
// MaterialPixelShaderProgram
|
||||
set condition MaterialPixelShaderProgram::ps never;
|
||||
|
||||
// MaterialVertexStreamRouting
|
||||
set condition MaterialVertexStreamRouting::decl never;
|
||||
|
||||
// MaterialVertexShader
|
||||
set string MaterialVertexShader::name;
|
||||
|
||||
// GfxVertexShaderLoadDef
|
||||
set count GfxVertexShaderLoadDef::program programSize;
|
||||
|
||||
// MaterialVertexShaderProgram
|
||||
set condition MaterialVertexShaderProgram::vs never;
|
||||
@@ -0,0 +1,7 @@
|
||||
// =========================================
|
||||
// MenuList
|
||||
// =========================================
|
||||
use MenuList;
|
||||
set block XFILE_BLOCK_TEMP;
|
||||
set string name;
|
||||
set count menus menuCount;
|
||||
@@ -0,0 +1,7 @@
|
||||
// =========================================
|
||||
// PackIndex
|
||||
// =========================================
|
||||
use PackIndex;
|
||||
set block XFILE_BLOCK_TEMP;
|
||||
set string name;
|
||||
set count entries header::count;
|
||||
@@ -0,0 +1,13 @@
|
||||
// =========================================
|
||||
// PhysConstraints
|
||||
// =========================================
|
||||
use PhysConstraints;
|
||||
set block XFILE_BLOCK_TEMP;
|
||||
set string name;
|
||||
|
||||
use PhysConstraint;
|
||||
set scriptstring targetname;
|
||||
set scriptstring target_ent1;
|
||||
set string target_bone1;
|
||||
set scriptstring target_ent2;
|
||||
set string target_bone2;
|
||||
@@ -0,0 +1,7 @@
|
||||
// =========================================
|
||||
// PhysPreset
|
||||
// =========================================
|
||||
use PhysPreset;
|
||||
set block XFILE_BLOCK_TEMP;
|
||||
set string name;
|
||||
set string sndAliasPrefix;
|
||||
@@ -0,0 +1,7 @@
|
||||
// =========================================
|
||||
// RawFile
|
||||
// =========================================
|
||||
use RawFile;
|
||||
set block XFILE_BLOCK_TEMP;
|
||||
set string name;
|
||||
set count buffer len + 1;
|
||||
@@ -0,0 +1,6 @@
|
||||
// =========================================
|
||||
// SndDriverGlobals
|
||||
// =========================================
|
||||
use SndDriverGlobals;
|
||||
set block XFILE_BLOCK_TEMP;
|
||||
set string name;
|
||||
@@ -0,0 +1,8 @@
|
||||
// =========================================
|
||||
// StringTable
|
||||
// =========================================
|
||||
use StringTable;
|
||||
// String table is not in the temp block for some reason. nice.
|
||||
set string name;
|
||||
set string values;
|
||||
set count values columnCount * rowCount;
|
||||
@@ -0,0 +1,64 @@
|
||||
// =========================================
|
||||
// WeaponDef
|
||||
// =========================================
|
||||
use WeaponDef;
|
||||
set block XFILE_BLOCK_TEMP;
|
||||
set string szInternalName;
|
||||
set string szDisplayName;
|
||||
set string szOverlayName;
|
||||
set string szXAnims;
|
||||
set assetref szXAnims AssetXAnim;
|
||||
set string szModeName;
|
||||
set scriptstring hideTags;
|
||||
set scriptstring notetrackSoundMapKeys;
|
||||
set scriptstring notetrackSoundMapValues;
|
||||
set reusable bounceSound;
|
||||
set count bounceSound 31;
|
||||
set string standMountedWeapdef;
|
||||
set string crouchMountedWeapdef;
|
||||
set string proneMountedWeapdef;
|
||||
set string szAmmoName;
|
||||
set string szClipName;
|
||||
set string szSharedAmmoCapName;
|
||||
set string szAltWeaponName;
|
||||
set string aiVsAiAccuracyGraphName;
|
||||
set string aiVsPlayerAccuracyGraphName;
|
||||
set reusable aiVsAiAccuracyGraphKnots;
|
||||
set count aiVsAiAccuracyGraphKnots aiVsAiAccuracyGraphKnotCount;
|
||||
set reusable aiVsPlayerAccuracyGraphKnots;
|
||||
set count aiVsPlayerAccuracyGraphKnots aiVsPlayerAccuracyGraphKnotCount;
|
||||
set reusable originalAiVsAiAccuracyGraphKnots;
|
||||
set count originalAiVsAiAccuracyGraphKnots aiVsAiAccuracyGraphKnotCount; // yeah it does not use original count
|
||||
set reusable originalAiVsPlayerAccuracyGraphKnots;
|
||||
set count originalAiVsPlayerAccuracyGraphKnots aiVsPlayerAccuracyGraphKnotCount; // yeah it does not use original count
|
||||
set string szUseHintString;
|
||||
set string dropHintString;
|
||||
set string szScript;
|
||||
set string fireRumble;
|
||||
set string meleeImpactRumble;
|
||||
set string flameTableFirstPerson;
|
||||
set string flameTableThirdPerson;
|
||||
set reusable flameTableFirstPersonPtr;
|
||||
set reusable flameTableThirdPersonPtr;
|
||||
|
||||
reorder:
|
||||
...
|
||||
aiVsAiAccuracyGraphName
|
||||
aiVsAiAccuracyGraphKnots
|
||||
originalAiVsAiAccuracyGraphKnots
|
||||
aiVsPlayerAccuracyGraphName
|
||||
aiVsPlayerAccuracyGraphKnots
|
||||
originalAiVsPlayerAccuracyGraphKnots;
|
||||
|
||||
// SndAliasCustom
|
||||
use SndAliasCustom;
|
||||
set count name 1;
|
||||
set reusable name;
|
||||
set condition sound never;
|
||||
|
||||
// snd_alias_list_name
|
||||
set string snd_alias_list_name::soundName;
|
||||
|
||||
// flameTable
|
||||
use flameTable;
|
||||
set string name;
|
||||
@@ -0,0 +1,68 @@
|
||||
// =========================================
|
||||
// XAnimParts
|
||||
// =========================================
|
||||
use XAnimParts;
|
||||
set block XFILE_BLOCK_TEMP;
|
||||
set string name;
|
||||
set scriptstring names;
|
||||
set count names boneCount[9];
|
||||
set count notify notifyCount;
|
||||
set count deltaPart 1;
|
||||
set count dataByte dataByteCount;
|
||||
set count dataShort dataShortCount;
|
||||
set count dataInt dataIntCount;
|
||||
set count randomDataShort randomDataShortCount;
|
||||
set count randomDataByte randomDataByteCount;
|
||||
set count randomDataInt randomDataIntCount;
|
||||
set count indices::_1 indexCount;
|
||||
set count indices::_2 indexCount;
|
||||
set condition indices::_1 numframes < 256;
|
||||
set condition indices::data never;
|
||||
reorder:
|
||||
name
|
||||
names
|
||||
notify
|
||||
deltaPart
|
||||
dataByte
|
||||
dataShort
|
||||
dataInt
|
||||
randomDataShort
|
||||
randomDataByte
|
||||
randomDataInt
|
||||
indices;
|
||||
|
||||
// XAnimNotifyInfo
|
||||
set scriptstring XAnimNotifyInfo::name;
|
||||
|
||||
// XAnimDeltaPart
|
||||
use XAnimDeltaPart;
|
||||
set count trans 1;
|
||||
set count quat 1;
|
||||
|
||||
// XAnimPartTrans
|
||||
use XAnimPartTrans;
|
||||
set condition u::frames size > 0;
|
||||
set condition u::frames::indices::_1 XAnimParts::numframes < 256;
|
||||
set arraysize u::frames::indices::_1 size + 1;
|
||||
set arraysize u::frames::indices::_2 size + 1;
|
||||
set condition u::frames::frames::_1 smallTrans;
|
||||
set count u::frames::frames::_1 size + 1;
|
||||
set count u::frames::frames::_2 size + 1;
|
||||
|
||||
// XAnimPartTransFrames
|
||||
reorder XAnimPartTransFrames:
|
||||
indices
|
||||
frames;
|
||||
|
||||
// XAnimDeltaPartQuat
|
||||
use XAnimDeltaPartQuat;
|
||||
set condition u::frames size > 0;
|
||||
set condition u::frames::indices::_1 XAnimParts::numframes < 256;
|
||||
set arraysize u::frames::indices::_1 size + 1;
|
||||
set arraysize u::frames::indices::_2 size + 1;
|
||||
set count u::frames::frames size + 1;
|
||||
|
||||
// XAnimDeltaPartQuatDataFrames
|
||||
reorder XAnimDeltaPartQuatDataFrames:
|
||||
indices
|
||||
frames;
|
||||
@@ -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;
|
||||
@@ -0,0 +1,85 @@
|
||||
// =========================================
|
||||
// clipMap_t
|
||||
// =========================================
|
||||
use clipMap_t;
|
||||
set block XFILE_BLOCK_TEMP;
|
||||
set string name;
|
||||
set reusable planes;
|
||||
set count planes planeCount;
|
||||
set count staticModelList numStaticModels;
|
||||
set count materials numMaterials;
|
||||
set count brushsides numBrushSides;
|
||||
set count brushEdges numBrushEdges;
|
||||
set count nodes numNodes;
|
||||
set count leafs numLeafs;
|
||||
set count leafbrushNodes leafbrushNodesCount;
|
||||
set count leafbrushes numLeafBrushes;
|
||||
set count leafsurfaces numLeafSurfaces;
|
||||
set count verts vertCount;
|
||||
set count brushVerts numBrushVerts;
|
||||
set count uinds nuinds;
|
||||
set count triIndices 3 * triCount;
|
||||
set count triEdgeIsWalkable ((3 * triCount + 31) / 32) * 4;
|
||||
set count borders borderCount;
|
||||
set count partitions partitionCount;
|
||||
set allocalign aabbTrees 16;
|
||||
set count aabbTrees aabbTreeCount;
|
||||
set count cmodels numSubModels;
|
||||
set count brushes numBrushes;
|
||||
set count visibility numClusters * clusterBytes;
|
||||
set reusable box_brush;
|
||||
set count dynEntDefList[0] dynEntCount[0];
|
||||
set count dynEntDefList[1] dynEntCount[1];
|
||||
set block dynEntPoseList XFILE_BLOCK_RUNTIME;
|
||||
set count dynEntPoseList[0] dynEntCount[0];
|
||||
set count dynEntPoseList[1] dynEntCount[1];
|
||||
set block dynEntClientList XFILE_BLOCK_RUNTIME;
|
||||
set count dynEntClientList[0] dynEntCount[0];
|
||||
set count dynEntClientList[1] dynEntCount[1];
|
||||
set block dynEntServerList XFILE_BLOCK_RUNTIME;
|
||||
set count dynEntServerList[0] dynEntCount[2];
|
||||
set count dynEntServerList[1] dynEntCount[3];
|
||||
set block dynEntCollList XFILE_BLOCK_RUNTIME;
|
||||
set count dynEntCollList[0] dynEntCount[0];
|
||||
set count dynEntCollList[1] dynEntCount[1];
|
||||
set count dynEntCollList[2] dynEntCount[2];
|
||||
set count dynEntCollList[3] dynEntCount[3];
|
||||
set count constraints num_constraints;
|
||||
reorder:
|
||||
...
|
||||
leafs
|
||||
leafbrushes
|
||||
leafbrushNodes
|
||||
leafsurfaces;
|
||||
|
||||
// cbrushside_t
|
||||
set reusable cbrushside_t::plane;
|
||||
|
||||
// cNode_t
|
||||
set reusable cNode_t::plane;
|
||||
|
||||
// cLeafBrushNode_s
|
||||
use cLeafBrushNode_s;
|
||||
set condition data::leaf leafBrushCount > 0;
|
||||
set reusable data::leaf::brushes;
|
||||
set count data::leaf::brushes leafBrushCount;
|
||||
|
||||
// CollisionPartition
|
||||
use CollisionPartition;
|
||||
set reusable borders;
|
||||
|
||||
// cbrush_t
|
||||
use cbrush_t;
|
||||
set reusable sides;
|
||||
set reusable baseAdjacentSide;
|
||||
set reusable verts;
|
||||
|
||||
// DynEntityDef
|
||||
use DynEntityDef;
|
||||
set reusable destroyPieces;
|
||||
set scriptstring targetname;
|
||||
|
||||
// XModelPieces
|
||||
use XModelPieces;
|
||||
set string name;
|
||||
set count pieces numpieces;
|
||||
@@ -0,0 +1,80 @@
|
||||
// =========================================
|
||||
// menuDef_t
|
||||
// =========================================
|
||||
use menuDef_t;
|
||||
set block XFILE_BLOCK_TEMP;
|
||||
set string window::name;
|
||||
set string font;
|
||||
set string onOpen;
|
||||
set string onFocus;
|
||||
set string onClose;
|
||||
set string onESC;
|
||||
set reusable visibleExp;
|
||||
set string allowedBinding;
|
||||
set string soundName;
|
||||
set reusable rectXExp;
|
||||
set reusable rectYExp;
|
||||
set count items itemCount;
|
||||
|
||||
// windowDef_t
|
||||
use windowDef_t;
|
||||
set string name;
|
||||
set string group;
|
||||
|
||||
// ItemKeyHandler
|
||||
set string ItemKeyHandler::action;
|
||||
|
||||
// statement_s
|
||||
set count statement_s::entries numEntries;
|
||||
|
||||
// expressionEntry
|
||||
set condition expressionEntry::data::operand type == EET_OPERAND;
|
||||
|
||||
// Operand
|
||||
use Operand;
|
||||
set condition internals::intVal dataType == VAL_INT;
|
||||
set condition internals::floatVal dataType == VAL_FLOAT;
|
||||
set condition internals::string dataType == VAL_STRING;
|
||||
set string internals::string;
|
||||
|
||||
// itemDef_s
|
||||
use itemDef_s;
|
||||
set string text;
|
||||
set condition parent never;
|
||||
set string mouseEnterText;
|
||||
set string mouseExitText;
|
||||
set string mouseEnter;
|
||||
set string mouseExit;
|
||||
set string action;
|
||||
set string onAccept;
|
||||
set string onFocus;
|
||||
set string leaveFocus;
|
||||
set string dvar;
|
||||
set string dvarTest;
|
||||
set string onListboxSelectionChange;
|
||||
set string enableDvar;
|
||||
|
||||
// itemDefData_t
|
||||
use itemDefData_t;
|
||||
set string enumDvarName;
|
||||
set condition data never;
|
||||
set condition listBox itemDef_s::type == ITEM_TYPE_LISTBOX;
|
||||
set condition editField itemDef_s::type == ITEM_TYPE_TEXT
|
||||
|| itemDef_s::type == ITEM_TYPE_EDITFIELD
|
||||
|| itemDef_s::type == ITEM_TYPE_NUMERICFIELD
|
||||
|| itemDef_s::type == ITEM_TYPE_SLIDER
|
||||
|| itemDef_s::type == ITEM_TYPE_YESNO
|
||||
|| itemDef_s::type == ITEM_TYPE_BIND
|
||||
|| itemDef_s::type == ITEM_TYPE_VALIDFILEFIELD
|
||||
|| itemDef_s::type == ITEM_TYPE_DECIMALFIELD
|
||||
|| itemDef_s::type == ITEM_TYPE_UPREDITFIELD;
|
||||
set condition multi itemDef_s::type == ITEM_TYPE_MULTI;
|
||||
set condition enumDvarName itemDef_s::type == ITEM_TYPE_DVARENUM;
|
||||
|
||||
// listBoxDef_s
|
||||
set string listBoxDef_s::doubleClick;
|
||||
|
||||
// multiDef_s
|
||||
use multiDef_s;
|
||||
set string dvarList;
|
||||
set string dvarStr;
|
||||
@@ -0,0 +1,44 @@
|
||||
// =========================================
|
||||
// snd_alias_list_t
|
||||
// =========================================
|
||||
use snd_alias_list_t;
|
||||
set block XFILE_BLOCK_TEMP;
|
||||
set string aliasName;
|
||||
set reusable head;
|
||||
set count head count;
|
||||
|
||||
// snd_alias_t
|
||||
use snd_alias_t;
|
||||
set string aliasName;
|
||||
set string subtitle;
|
||||
set string secondaryAliasName;
|
||||
set string chainAliasName;
|
||||
set reusable soundFile;
|
||||
|
||||
// SoundFile
|
||||
use SoundFile;
|
||||
set condition u::loadSnd type == SAT_LOADED;
|
||||
set reusable u::streamSnd;
|
||||
|
||||
// LoadedSound
|
||||
set string LoadedSound::name;
|
||||
|
||||
// snd_asset
|
||||
use snd_asset;
|
||||
set count data data_size;
|
||||
|
||||
// StreamedSound
|
||||
use StreamedSound;
|
||||
set reusable primeSnd;
|
||||
|
||||
// StreamFileName
|
||||
use StreamFileName;
|
||||
set string dir;
|
||||
set string name;
|
||||
|
||||
// PrimedSound
|
||||
use PrimedSound;
|
||||
set string name;
|
||||
set count buffer size;
|
||||
set block buffer XFILE_BLOCK_LARGE;
|
||||
set allocalign buffer 2048;
|
||||
Reference in New Issue
Block a user