IW5 support initial commit

This commit is contained in:
Jan
2021-07-23 01:12:36 +02:00
parent c6ea52018a
commit f201dfafd8
102 changed files with 8835 additions and 0 deletions

View File

@ -0,0 +1 @@
# This file exists for automatically generating zone loading code.

View File

@ -0,0 +1,8 @@
#pragma once
// Entry point for IW5 code generation
#include "../Common.h"
#include "../../../Common/Game/IW5/IW5_Assets.h"
// EOF

View File

@ -0,0 +1,97 @@
// Game: Modern Warfare 3 (IW5)
game IW5;
architecture x86;
// Game Assets
asset PhysPreset ASSET_TYPE_PHYSPRESET;
asset PhysCollmap ASSET_TYPE_PHYSCOLLMAP;
asset XAnimParts ASSET_TYPE_XANIMPARTS;
asset XModelSurfs ASSET_TYPE_XMODEL_SURFS;
asset XModel ASSET_TYPE_XMODEL;
asset Material ASSET_TYPE_MATERIAL;
asset MaterialPixelShader ASSET_TYPE_PIXELSHADER;
asset MaterialVertexShader ASSET_TYPE_VERTEXSHADER;
asset MaterialVertexDeclaration ASSET_TYPE_VERTEXDECL;
asset MaterialTechniqueSet ASSET_TYPE_TECHNIQUE_SET;
asset GfxImage ASSET_TYPE_IMAGE;
asset snd_alias_list_t ASSET_TYPE_SOUND;
asset SndCurve ASSET_TYPE_SOUND_CURVE;
asset LoadedSound ASSET_TYPE_LOADED_SOUND;
asset clipMap_t ASSET_TYPE_CLIPMAP;
asset ComWorld ASSET_TYPE_COMWORLD;
asset GlassWorld ASSET_TYPE_GLASSWORLD;
asset PathData ASSET_TYPE_PATHDATA;
asset VehicleTrack ASSET_TYPE_VEHICLE_TRACK;
asset MapEnts ASSET_TYPE_MAP_ENTS;
asset FxWorld ASSET_TYPE_FXWORLD;
asset GfxWorld ASSET_TYPE_GFXWORLD;
asset GfxLightDef ASSET_TYPE_LIGHT_DEF;
asset Font_s ASSET_TYPE_FONT;
asset MenuList ASSET_TYPE_MENULIST;
asset menuDef_t ASSET_TYPE_MENU;
asset LocalizeEntry ASSET_TYPE_LOCALIZE_ENTRY;
asset WeaponAttachment ASSET_TYPE_ATTACHMENT;
asset WeaponCompleteDef ASSET_TYPE_WEAPON;
asset FxEffectDef ASSET_TYPE_FX;
asset FxImpactTable ASSET_TYPE_IMPACT_FX;
asset SurfaceFxTable ASSET_TYPE_SURFACE_FX;
asset RawFile ASSET_TYPE_RAWFILE;
asset ScriptFile ASSET_TYPE_SCRIPTFILE;
asset StringTable ASSET_TYPE_STRINGTABLE;
asset LeaderboardDef ASSET_TYPE_LEADERBOARD;
asset StructuredDataDefSet ASSET_TYPE_STRUCTURED_DATA_DEF;
asset TracerDef ASSET_TYPE_TRACER;
asset VehicleDef ASSET_TYPE_VEHICLE;
asset AddonMapEnts ASSET_TYPE_ADDON_MAP_ENTS;
// Setup blocks
block temp XFILE_BLOCK_TEMP default;
block normal XFILE_BLOCK_PHYSICAL;
block runtime XFILE_BLOCK_RUNTIME default;
block normal XFILE_BLOCK_VIRTUAL default;
block normal XFILE_BLOCK_LARGE;
block normal XFILE_BLOCK_CALLBACK;
block normal XFILE_BLOCK_SCRIPT;
#include "XAssets/PhysPreset.txt"
#include "XAssets/PhysCollmap.txt"
#include "XAssets/XAnimParts.txt"
#include "XAssets/XModelSurfs.txt"
#include "XAssets/XModel.txt"
#include "XAssets/Material.txt"
#include "XAssets/MaterialPixelShader.txt"
#include "XAssets/MaterialVertexShader.txt"
#include "XAssets/MaterialVertexDeclaration.txt"
#include "XAssets/MaterialTechniqueSet.txt"
#include "XAssets/GfxImage.txt"
#include "XAssets/snd_alias_list_t.txt"
#include "XAssets/SndCurve.txt"
#include "XAssets/LoadedSound.txt"
#include "XAssets/clipMap_t.txt"
#include "XAssets/ComWorld.txt"
#include "XAssets/GlassWorld.txt"
#include "XAssets/PathData.txt"
#include "XAssets/VehicleTrack.txt"
#include "XAssets/MapEnts.txt"
#include "XAssets/FxWorld.txt"
#include "XAssets/GfxWorld.txt"
#include "XAssets/GfxLightDef.txt"
#include "XAssets/Font_s.txt"
#include "XAssets/MenuList.txt"
#include "XAssets/menuDef_t.txt"
#include "XAssets/LocalizeEntry.txt"
#include "XAssets/WeaponAttachment.txt"
#include "XAssets/WeaponCompleteDef.txt"
#include "XAssets/FxEffectDef.txt"
#include "XAssets/FxImpactTable.txt"
#include "XAssets/SurfaceFxTable.txt"
#include "XAssets/RawFile.txt"
#include "XAssets/ScriptFile.txt"
#include "XAssets/StringTable.txt"
#include "XAssets/LeaderboardDef.txt"
#include "XAssets/StructuredDataDefSet.txt"
#include "XAssets/TracerDef.txt"
#include "XAssets/VehicleDef.txt"
#include "XAssets/AddonMapEnts.txt"
// EOF

View File

@ -0,0 +1,8 @@
// =========================================
// AddonMapEnts
// =========================================
use AddonMapEnts;
set block XFILE_BLOCK_TEMP;
set string name;
set name name;
set count entityString numEntityChars;

View File

@ -0,0 +1,11 @@
// =========================================
// ComWorld
// =========================================
use ComWorld;
set block XFILE_BLOCK_TEMP;
set string name;
set name name;
set count primaryLights primaryLightCount;
// ComPrimaryLight
set string ComPrimaryLight::defName;

View File

@ -0,0 +1,9 @@
// =========================================
// Font_s
// =========================================
use Font_s;
set block XFILE_BLOCK_TEMP;
set string fontName;
set name fontName;
set reusable glyphs;
set count glyphs glyphCount;

View File

@ -0,0 +1,50 @@
// =========================================
// FxEffectDef
// =========================================
use FxEffectDef;
set block XFILE_BLOCK_TEMP;
set string name;
set name 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
|| FxElemDef::elemType == FX_ELEM_TYPE_SPARK_FOUNTAIN;
// FxEffectDefRef
use FxEffectDefRef;
set condition handle never;
set string name;
// FxElemExtendedDefPtr
use FxElemExtendedDefPtr;
set condition trailDef FxElemDef::elemType == FX_ELEM_TYPE_TRAIL;
set condition sparkFountainDef FxElemDef::elemType == FX_ELEM_TYPE_SPARK_FOUNTAIN;
// FxTrailDef
use FxTrailDef;
set count verts vertCount;
set count inds indCount;

View File

@ -0,0 +1,8 @@
// =========================================
// FxImpactTable
// =========================================
use FxImpactTable;
set block XFILE_BLOCK_TEMP;
set string name;
set name name;
set count table 15;

View File

@ -0,0 +1,38 @@
// =========================================
// FxWorld
// =========================================
use FxWorld;
set block XFILE_BLOCK_TEMP;
set string name;
set name name;
// FxGlassSystem
use FxGlassSystem;
set count defs defCount;
set block piecePlaces XFILE_BLOCK_RUNTIME;
set count piecePlaces pieceLimit;
set block pieceStates XFILE_BLOCK_RUNTIME;
set count pieceStates pieceLimit;
set block pieceDynamics XFILE_BLOCK_RUNTIME;
set count pieceDynamics pieceLimit;
set block geoData XFILE_BLOCK_RUNTIME;
set count geoData geoDataLimit;
set block isInUse XFILE_BLOCK_RUNTIME;
set count isInUse pieceWordCount;
set block cellBits XFILE_BLOCK_RUNTIME;
set count cellBits pieceWordCount * cellCount;
set block visData XFILE_BLOCK_RUNTIME;
set count visData (pieceLimit + 15) / 16 * 16;
set block linkOrg XFILE_BLOCK_RUNTIME;
set count linkOrg pieceLimit;
set block halfThickness XFILE_BLOCK_RUNTIME;
set count halfThickness (pieceLimit + 3) / 4 * 4;
set count lightingHandles initPieceCount;
set count initPieceStates initPieceCount;
set count initGeoData initGeoDataCount;
// FxGlassDef
reorder FxGlassDef:
physPreset
material
materialShattered;

View File

@ -0,0 +1,22 @@
// =========================================
// GfxImage
// =========================================
use GfxImage;
set block XFILE_BLOCK_TEMP;
set action OnImageLoaded(GfxImage);
set string name;
set name name;
reorder:
name
texture;
// GfxTexture
use GfxTexture;
set reusable loadDef;
set block loadDef XFILE_BLOCK_TEMP;
set condition texture never;
// GfxImageLoadDef
use GfxImageLoadDef;
set action LoadImageData(GfxImageLoadDef, GfxImage);
set arraysize data resourceSize;

View File

@ -0,0 +1,7 @@
// =========================================
// GfxLightDef
// =========================================
use GfxLightDef;
set block XFILE_BLOCK_TEMP;
set string name;
set name name;

View File

@ -0,0 +1,128 @@
// =========================================
// GfxWorld
// =========================================
use GfxWorld;
set block XFILE_BLOCK_TEMP;
set string name;
set name name;
set string baseName;
set count skies skyCount;
set count aabbTreeCounts dpvsPlanes::cellCount;
set count aabbTrees dpvsPlanes::cellCount;
set count cells dpvsPlanes::cellCount;
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 cellHasSunLitSurfsBits XFILE_BLOCK_RUNTIME;
set count cellHasSunLitSurfsBits (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 - lastSunPrimaryLightIndex - 1) * 0x2000;
set block primaryLightDynEntShadowVis XFILE_BLOCK_RUNTIME;
set count primaryLightDynEntShadowVis[0] dpvsDyn::dynEntClientCount[0] * (primaryLightCount - lastSunPrimaryLightIndex - 1);
set count primaryLightDynEntShadowVis[1] dpvsDyn::dynEntClientCount[1] * (primaryLightCount - lastSunPrimaryLightIndex - 1);
set block nonSunPrimaryLightForModelDynEnt XFILE_BLOCK_RUNTIME;
set count nonSunPrimaryLightForModelDynEnt dpvsDyn::dynEntClientCount[0];
set count shadowGeom primaryLightCount;
set count lightRegion primaryLightCount;
set count heroOnlyLights heroOnlyLightCount;
// GfxSky
set count GfxSky::skyStartSurfs skySurfCount;
// 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 * 0x200;
// GfxCellTree
// Extremly dirty hack caused by IW doing an extremly dirty hack in their code as well.
// No idea why they decided to separate the count from the pointer that uses the count.
// Thank you Treyarch for doing better in your games at least.
set count GfxCellTree::aabbTree GfxWorld::aabbTreeCounts[GfxCellTree - GfxWorld::aabbTrees];
// GfxAabbTree
use GfxAabbTree;
set reusable smodelIndexes;
set count smodelIndexes smodelIndexCount;
// GfxCell
use GfxCell;
set count portals portalCount;
set count reflectionProbes reflectionProbeCount;
// GfxPortal
use GfxPortal;
set condition writable never;
set count vertices vertexCount;
// GfxWorldDraw
use GfxWorldDraw;
set count reflectionProbes reflectionProbeCount;
set count reflectionProbeOrigins reflectionProbeCount;
set block reflectionProbeTextures XFILE_BLOCK_RUNTIME;
set count reflectionProbeTextures reflectionProbeCount;
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 vd::vertices vertexCount;
set condition vd::worldVb never;
set count vld::data vertexLayerDataSize;
set condition vld::layerVb never;
set count indices indexCount;
// GfxLightGrid
use GfxLightGrid;
set count rowDataStart maxs[rowAxis] - mins[rowAxis] + 1;
set count rawRowData rawRowDataSize;
set count entries entryCount;
set count colors colorCount;
// GfxShadowGeometry
use GfxShadowGeometry;
set count sortedSurfIndex surfaceCount;
set count smodelIndex smodelCount;
// GfxLightRegion
set count GfxLightRegion::hulls hullCount;
// GfxLightRegionHull
set count GfxLightRegionHull::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 count sortedSurfIndex staticSurfaceCount + staticSurfaceCountNoDecal;
set count smodelInsts smodelCount;
set count surfaces GfxWorld::surfaceCount;
set count surfacesBounds GfxWorld::surfaceCount;
set count smodelDrawInsts smodelCount;
set block surfaceMaterials XFILE_BLOCK_RUNTIME;
set count surfaceMaterials GfxWorld::surfaceCount;
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];

View File

@ -0,0 +1,7 @@
// =========================================
// GlassWorld
// =========================================
use GlassWorld;
set block XFILE_BLOCK_TEMP;
set string name;
set name name;

View File

@ -0,0 +1,13 @@
// =========================================
// LeaderboardDef
// =========================================
use LeaderboardDef;
set block XFILE_BLOCK_TEMP;
set string name;
set name name;
set count columns columnCount;
// LbColumnDef
use LbColumnDef;
set string name;
set string statName;

View File

@ -0,0 +1,16 @@
// =========================================
// LoadedSound
// =========================================
use LoadedSound;
set block XFILE_BLOCK_TEMP;
set string name;
set name name;
// MssSound
use MssSound;
set block data XFILE_BLOCK_TEMP;
set reusable data;
set count data info::data_len;
set condition info::data_ptr never;
set condition info::initial_ptr never;
set action SetSoundData(MssSound);

View File

@ -0,0 +1,8 @@
// =========================================
// LocalizeEntry
// =========================================
use LocalizeEntry;
set block XFILE_BLOCK_TEMP;
set string name;
set name name;
set string value;

View File

@ -0,0 +1,18 @@
// =========================================
// MapEnts
// =========================================
use MapEnts;
set block XFILE_BLOCK_TEMP;
set string name;
set name name;
set count entityString numEntityChars;
set count stages stageCount;
// MapTriggers
use MapTriggers;
set count models count;
set count hulls hullCount;
set count slabs slabCount;
// Stage
set string Stage::name;

View File

@ -0,0 +1,23 @@
// =========================================
// Material
// =========================================
use Material;
set block XFILE_BLOCK_TEMP;
set string info::name;
set name 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;

View File

@ -0,0 +1,13 @@
// =========================================
// MaterialPixelShader
// =========================================
use MaterialPixelShader;
set block XFILE_BLOCK_TEMP;
set string name;
set name name;
// GfxPixelShaderLoadDef
set count GfxPixelShaderLoadDef::program programSize;
// MaterialPixelShaderProgram
set condition MaterialPixelShaderProgram::ps never;

View File

@ -0,0 +1,27 @@
// =========================================
// MaterialTechniqueSet
// =========================================
use MaterialTechniqueSet;
set block XFILE_BLOCK_TEMP;
set string name;
set name 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;
// MaterialShaderArgument
use MaterialShaderArgument;
set condition u::literalConst type == MTL_ARG_LITERAL_VERTEX_CONST
|| type == MTL_ARG_LITERAL_PIXEL_CONST;
set reusable u::literalConst;

View File

@ -0,0 +1,10 @@
// =========================================
// MaterialVertexDeclaration
// =========================================
use MaterialVertexDeclaration;
set block XFILE_BLOCK_TEMP;
set string name;
set name name;
// MaterialVertexStreamRouting
set condition MaterialVertexStreamRouting::decl never;

View File

@ -0,0 +1,13 @@
// =========================================
// MaterialVertexShader
// =========================================
use MaterialVertexShader;
set block XFILE_BLOCK_TEMP;
set string name;
set name name;
// GfxVertexShaderLoadDef
set count GfxVertexShaderLoadDef::program programSize;
// MaterialVertexShaderProgram
set condition MaterialVertexShaderProgram::vs never;

View File

@ -0,0 +1,8 @@
// =========================================
// MenuList
// =========================================
use MenuList;
set block XFILE_BLOCK_TEMP;
set string name;
set name name;
set count menus menuCount;

View File

@ -0,0 +1,7 @@
// =========================================
// PathData
// =========================================
use PathData;
set block XFILE_BLOCK_TEMP;
set string name;
set name name;

View File

@ -0,0 +1,27 @@
// =========================================
// PhysCollmap
// =========================================
use PhysCollmap;
set block XFILE_BLOCK_TEMP;
set string name;
set name name;
set count geoms count;
// PhysGeomInfo
use PhysGeomInfo;
set count brushWrapper 1;
// BrushWrapper
use BrushWrapper;
set reusable planes;
set count planes brush::numsides;
// cbrushWrapper_t
use cbrushWrapper_t;
set count sides numsides;
set count baseAdjacentSide BrushWrapper::totalEdgeCount;
// cbrushside_t
use cbrushside_t;
set reusable plane;
set count plane 1;

View File

@ -0,0 +1,8 @@
// =========================================
// PhysPreset
// =========================================
use PhysPreset;
set block XFILE_BLOCK_TEMP;
set string name;
set name name;
set string sndAliasPrefix;

View File

@ -0,0 +1,10 @@
// =========================================
// RawFile
// =========================================
use RawFile;
set block XFILE_BLOCK_TEMP;
set string name;
set name name;
set condition data::compressedBuffer compressedLen > 0;
set count data::compressedBuffer compressedLen;
set count data::buffer len + 1;

View File

@ -0,0 +1,7 @@
// =========================================
// ScriptFile
// =========================================
use ScriptFile;
set block XFILE_BLOCK_TEMP;
set string name;
set name name;

View File

@ -0,0 +1,7 @@
// =========================================
// SndCurve
// =========================================
use SndCurve;
set block XFILE_BLOCK_TEMP;
set string filename;
set name filename;

View File

@ -0,0 +1,11 @@
// =========================================
// StringTable
// =========================================
use StringTable;
set block XFILE_BLOCK_TEMP;
set string name;
set name name;
set count values columnCount * rowCount;
// StringTableCell
set string StringTableCell::string;

View File

@ -0,0 +1,27 @@
// =========================================
// StructuredDataDefSet
// =========================================
use StructuredDataDefSet;
set block XFILE_BLOCK_TEMP;
set string name;
set name name;
set count defs defCount;
// StructuredDataDef
use StructuredDataDef;
set count enums enumCount;
set count structs structCount;
set count indexedArrays indexedArrayCount;
set count enumedArrays enumedArrayCount;
// StructuredDataEnum
set count StructuredDataEnum::entries entryCount;
// StructuredDataEnumEntry
set string StructuredDataEnumEntry::string;
// StructuredDataStruct
set count StructuredDataStruct::properties propertyCount;
// StructuredDataStructProperty
set string StructuredDataStructProperty::name;

View File

@ -0,0 +1,7 @@
// =========================================
// SurfaceFxTable
// =========================================
use SurfaceFxTable;
set block XFILE_BLOCK_TEMP;
set string name;
set name name;

View File

@ -0,0 +1,7 @@
// =========================================
// TracerDef
// =========================================
use TracerDef;
set block XFILE_BLOCK_TEMP;
set string name;
set name name;

View File

@ -0,0 +1,16 @@
// =========================================
// VehicleDef
// =========================================
use VehicleDef;
set block XFILE_BLOCK_TEMP;
set string name;
set name name;
set string useHintString;
set string turretWeaponName;
set scriptstring trophyTags;
set string surfaceSndPrefix;
// VehiclePhysDef
use VehiclePhysDef;
set string physPresetName;
set string accelGraphName;

View File

@ -0,0 +1,7 @@
// =========================================
// VehicleTrack
// =========================================
use VehicleTrack;
set block XFILE_BLOCK_TEMP;
set string name;
set name name;

View File

@ -0,0 +1,7 @@
// =========================================
// WeaponAttachment
// =========================================
use WeaponAttachment;
set block XFILE_BLOCK_TEMP;
set string name;
set name name;

View File

@ -0,0 +1,84 @@
// =========================================
// WeaponCompleteDef
// =========================================
use WeaponCompleteDef;
set block XFILE_BLOCK_TEMP;
set string szInternalName;
set name szInternalName;
set reusable weapDef;
set string szDisplayName;
set reusable hideTags;
set scriptstring hideTags;
set count hideTags 32;
set string szXAnims;
set reusable szXAnims;
set count szXAnims 37;
set string szAltWeaponName;
set reusable accuracyGraphKnots;
set count accuracyGraphKnots[0] accuracyGraphKnotCount[0];
set count accuracyGraphKnots[1] accuracyGraphKnotCount[1];
// WeaponDef
use WeaponDef;
set string szOverlayName;
set reusable gunXModel;
set count gunXModel 16;
set reusable szXAnimsRightHanded;
set string szXAnimsRightHanded;
set count szXAnimsRightHanded 37;
set reusable szXAnimsLeftHanded;
set string szXAnimsLeftHanded;
set count szXAnimsLeftHanded 37;
set string szModeName;
set reusable notetrackSoundMapKeys;
set scriptstring notetrackSoundMapKeys;
set count notetrackSoundMapKeys 16;
set reusable notetrackSoundMapValues;
set scriptstring notetrackSoundMapValues;
set count notetrackSoundMapValues 16;
set reusable notetrackRumbleMapKeys;
set scriptstring notetrackRumbleMapKeys;
set count notetrackRumbleMapKeys 16;
set reusable notetrackRumbleMapValues;
set scriptstring notetrackRumbleMapValues;
set count notetrackRumbleMapValues 16;
set reusable bounceSound;
set count bounceSound 31;
set reusable worldModel;
set count worldModel 16;
set string szAmmoName;
set string szClipName;
set string szSharedAmmoCapName;
set reusable parallelBounce;
set count parallelBounce 31;
set reusable perpendicularBounce;
set count perpendicularBounce 31;
set string accuracyGraphName0;
set string accuracyGraphName1;
set reusable originalAccuracyGraphKnots0;
set reusable originalAccuracyGraphKnots1;
set count originalAccuracyGraphKnots0 WeaponCompleteDef::accuracyGraphKnotCount[0];
set count originalAccuracyGraphKnots1 WeaponCompleteDef::accuracyGraphKnotCount[1];
set string szUseHintString;
set string dropHintString;
set string szScript;
set reusable locationDamageMultipliers;
set count locationDamageMultipliers 20;
set string fireRumble;
set string meleeImpactRumble;
set string turretBarrelSpinRumble;
reorder:
...
accuracyGraphName0
originalAccuracyGraphKnots0
accuracyGraphName1
originalAccuracyGraphKnots1;
// 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;

View File

@ -0,0 +1,83 @@
// =========================================
// XAnimParts
// =========================================
use XAnimParts;
set block XFILE_BLOCK_TEMP;
set string name;
set name 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 quat2 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;
// XAnimDeltaPartQuat2
use XAnimDeltaPartQuat2;
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;
// XAnimDeltaPartQuatDataFrames2
reorder XAnimDeltaPartQuatDataFrames2:
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;

View File

@ -0,0 +1,72 @@
// =========================================
// XModel
// =========================================
use XModel;
set block XFILE_BLOCK_TEMP;
set string name;
set name 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;
set reusable partClassification;
set count partClassification numBones;
set reusable baseMat;
set count baseMat numBones;
set count materialHandles numsurfs;
set count collSurfs numCollSurfs;
set count boneInfo numBones;
// XModelLodInfo
use XModelLodInfo;
set block modelSurfs XFILE_BLOCK_TEMP;
set action modelSurfs SetModelSurfs(XModelLodInfo, XModelSurfs);
set reusable modelSurfs;
set condition surfs never;
// XModelSurfs
use XModelSurfs;
set block XFILE_BLOCK_VIRTUAL;
set string name;
set count surfs XModelLodInfo::numsurfs; // No this is not a mistake. This is how the game does it.
// XSurface
use XSurface;
set reusable verts0;
set block verts0 XFILE_BLOCK_VERTEX;
set count verts0 vertCount;
set reusable vertList;
set count vertList vertListCount;
set reusable triIndices;
set block triIndices XFILE_BLOCK_INDEX;
set count triIndices triCount;
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;

View File

@ -0,0 +1,7 @@
// =========================================
// XModelSurfs
// =========================================
use XModelSurfs;
set block XFILE_BLOCK_TEMP;
set string name;
set name name;

View File

@ -0,0 +1,71 @@
// =========================================
// clipMap_t
// =========================================
use clipMap_t;
set block XFILE_BLOCK_TEMP;
set string name;
set name 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 triIndices 3 * triCount;
set count triEdgeIsWalkable ((3 * triCount + 31) / 32) * 4;
set count borders borderCount;
set count partitions partitionCount;
set count aabbTrees aabbTreeCount;
set count cmodels numSubModels;
set count brushes numBrushes;
set count brushBounds numBrushes;
set count brushContents numBrushes;
set count smodelNodes smodelNodeCount;
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 dynEntCollList XFILE_BLOCK_RUNTIME;
set count dynEntCollList[0] dynEntCount[0];
set count dynEntCollList[1] dynEntCount[1];
reorder:
...
leafs
leafbrushes
leafbrushNodes;
reorder:
...
brushContents
smodelNodes
mapEnts;
// ClipMaterial
set string ClipMaterial::name;
// 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;

View File

@ -0,0 +1,150 @@
// =========================================
// menuDef_t
// =========================================
use menuDef_t;
set block XFILE_BLOCK_TEMP;
set string window::name;
set name window::name;
set string font;
set reusable visibleExp;
set string allowedBinding;
set string soundName;
set reusable rectXExp;
set reusable rectYExp;
set reusable rectWExp;
set reusable rectHExp;
set reusable openSoundExp;
set reusable closeSoundExp;
set count items itemCount;
set reusable expressionData;
reorder:
expressionData
window
font
onOpen
onClose
onCloseRequest
onESC
onKey
visibleExp
allowedBinding
soundName
rectXExp
rectYExp
rectWExp
rectHExp
openSoundExp
closeSoundExp
items;
// windowDef_t
use windowDef_t;
set string name;
set string group;
// MenuEventHandlerSet
set count MenuEventHandlerSet::eventHandlers eventHandlerCount;
// MenuEventHandler
use MenuEventHandler;
set string eventData::unconditionalScript;
set condition eventData::unconditionalScript eventType == EVENT_UNCONDITIONAL;
set condition eventData::conditionalScript eventType == EVENT_IF;
set condition eventData::elseScript eventType == EVENT_ELSE;
set condition eventData::setLocalVarData eventType == EVENT_SET_LOCAL_VAR_BOOL
|| eventType == EVENT_SET_LOCAL_VAR_INT
|| eventType == EVENT_SET_LOCAL_VAR_FLOAT
|| eventType == EVENT_SET_LOCAL_VAR_STRING;
// ConditionalScript
use ConditionalScript;
set reusable eventExpression;
reorder:
eventExpression
eventHandlerSet;
// SetLocalVarData
use SetLocalVarData;
set string localVarName;
set reusable expression;
// Statement_s
use Statement_s;
set count entries numEntries;
set reusable supportingData;
set condition lastResult never;
// expressionEntry
set condition expressionEntry::data::operand type == EET_OPERAND;
// Operand
use Operand;
set reusable internals::function;
set condition internals::intVal dataType == VAL_INT;
set condition internals::floatVal dataType == VAL_FLOAT;
set condition internals::stringVal dataType == VAL_STRING;
set condition internals::function dataType == VAL_FUNCTION;
// ExpressionString
set string ExpressionString::string;
// itemDef_s
use itemDef_s;
set string text;
set condition parent never;
set string dvar;
set string dvarTest;
set string enableDvar;
set string localVar;
set count floatExpressions floatExpressionCount;
set reusable visibleExp;
set reusable disabledExp;
set reusable textExp;
set reusable materialExp;
// itemDefData_t
use itemDefData_t;
set string enumDvarName;
set condition data never;
set condition listBox itemDef_s::type == 6;
set condition editField itemDef_s::type == 0
|| itemDef_s::type == 4
|| itemDef_s::type == 9
|| itemDef_s::type == 10
|| itemDef_s::type == 11
|| itemDef_s::type == 14
|| itemDef_s::type == 16
|| itemDef_s::type == 17
|| itemDef_s::type == 18
|| itemDef_s::type == 22
|| itemDef_s::type == 23;
set condition multi itemDef_s::type == 12;
set condition enumDvarName itemDef_s::type == 13;
set condition ticker itemDef_s::type == 20;
set condition scroll itemDef_s::type == 21;
// multiDef_s
use multiDef_s;
set string dvarList;
set string dvarStr;
// ItemFloatExpression
set reusable ItemFloatExpression::expression;
// UIFunctionList
use UIFunctionList;
set count functions totalFunctions;
set reusable functions; // This statement makes both the array of pointers and the pointers in the array reusable. only the second one is correct however this shouldn't be a problem with vanilla fastfiles.
// StaticDvarList
set count StaticDvarList::staticDvars numStaticDvars;
// StaticDvar
use StaticDvar;
set condition dvar never;
set string dvarName;
// StringList
use StringList;
set count strings totalStrings;
set string strings;

View File

@ -0,0 +1,30 @@
// =========================================
// snd_alias_list_t
// =========================================
use snd_alias_list_t;
set block XFILE_BLOCK_TEMP;
set string aliasName;
set name 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 string mixerGroup;
set reusable soundFile;
set reusable speakerMap;
// SoundFile
set condition SoundFile::u::loadSnd type == SAT_LOADED;
// SpeakerMap
set string SpeakerMap::name;
// StreamedSound
use StreamedSound;
set string dir;
set string name;