From e3a3d012e61857cdfeb76dcaf917cb2339be84b3 Mon Sep 17 00:00:00 2001 From: Jan Date: Wed, 12 May 2021 19:23:27 +0200 Subject: [PATCH] Add Commands for T5 --- src/Common/Game/T5/T5_Assets.h | 337 ++++++++++++++-- src/ZoneCode/Game/T5/T5_Commands.txt | 2 + src/ZoneCode/Game/T5/XAssets/ComWorld.txt | 16 + .../Game/T5/XAssets/DestructibleDef.txt | 21 + src/ZoneCode/Game/T5/XAssets/EmblemSet.txt | 21 + src/ZoneCode/Game/T5/XAssets/Font_s.txt | 9 + src/ZoneCode/Game/T5/XAssets/FxEffectDef.txt | 48 +++ .../Game/T5/XAssets/FxImpactTable.txt | 8 + src/ZoneCode/Game/T5/XAssets/GameWorldMp.txt | 7 + src/ZoneCode/Game/T5/XAssets/GameWorldSp.txt | 38 ++ src/ZoneCode/Game/T5/XAssets/GfxImage.txt | 23 ++ src/ZoneCode/Game/T5/XAssets/GfxLightDef.txt | 7 + src/ZoneCode/Game/T5/XAssets/GfxWorld.txt | 159 ++++++++ src/ZoneCode/Game/T5/XAssets/Glasses.txt | 21 + .../Game/T5/XAssets/LocalizeEntry.txt | 8 + src/ZoneCode/Game/T5/XAssets/MapEnts.txt | 8 + src/ZoneCode/Game/T5/XAssets/Material.txt | 23 ++ .../Game/T5/XAssets/MaterialTechniqueSet.txt | 50 +++ src/ZoneCode/Game/T5/XAssets/MenuList.txt | 8 + src/ZoneCode/Game/T5/XAssets/PackIndex.txt | 8 + .../Game/T5/XAssets/PhysConstraints.txt | 14 + src/ZoneCode/Game/T5/XAssets/PhysPreset.txt | 8 + src/ZoneCode/Game/T5/XAssets/RawFile.txt | 8 + src/ZoneCode/Game/T5/XAssets/SndBank.txt | 50 +++ .../Game/T5/XAssets/SndDriverGlobals.txt | 13 + src/ZoneCode/Game/T5/XAssets/SndPatch.txt | 10 + src/ZoneCode/Game/T5/XAssets/StringTable.txt | 12 + .../Game/T5/XAssets/WeaponVariantDef.txt | 166 ++++++++ src/ZoneCode/Game/T5/XAssets/XAnimParts.txt | 69 ++++ src/ZoneCode/Game/T5/XAssets/XGlobals.txt | 7 + src/ZoneCode/Game/T5/XAssets/XModel.txt | 90 +++++ src/ZoneCode/Game/T5/XAssets/clipMap_t.txt | 85 ++++ src/ZoneCode/Game/T5/XAssets/ddlRoot_t.txt | 28 ++ src/ZoneCode/Game/T5/XAssets/menuDef_t.txt | 127 ++++++ .../Game/T6/XAssets/WeaponVariantDef.txt | 10 +- src/ZoneCommon/Game/T5/GameAssetPoolT5.cpp | 379 ++++++++++++++++++ src/ZoneCommon/Game/T5/GameAssetPoolT5.h | 60 +++ .../T5/XAssets/gfximage/gfximage_actions.cpp | 24 ++ .../T5/XAssets/gfximage/gfximage_actions.h | 16 + 39 files changed, 1950 insertions(+), 48 deletions(-) diff --git a/src/Common/Game/T5/T5_Assets.h b/src/Common/Game/T5/T5_Assets.h index f0c64260..baa5a094 100644 --- a/src/Common/Game/T5/T5_Assets.h +++ b/src/Common/Game/T5/T5_Assets.h @@ -184,9 +184,9 @@ namespace T5 float piecesUpwardVelocity; int canFloat; float gravityScale; - float centerOfMassOffset[3]; - float buoyancyBoxMin[3]; - float buoyancyBoxMax[3]; + vec3_t centerOfMassOffset; + vec3_t buoyancyBoxMin; + vec3_t buoyancyBoxMax; }; enum ConstraintType @@ -225,10 +225,10 @@ namespace T5 int target_index2; uint16_t target_ent2; const char* target_bone2; - float offset[3]; - float pos[3]; - float pos2[3]; - float dir[3]; + vec3_t offset; + vec3_t pos; + vec3_t pos2; + vec3_t dir; int flags; int timeout; int min_health; @@ -236,7 +236,7 @@ namespace T5 float distance; float damp; float power; - float scale[3]; + vec3_t scale; float spin_scale; float minAngle; float maxAngle; @@ -391,8 +391,8 @@ namespace T5 bool bLeftHandGripIK; bool bStreamable; unsigned int streamedFileSize; - char boneCount[10]; - char notifyCount; + unsigned char boneCount[10]; + unsigned char notifyCount; char assetType; bool isDefault; unsigned int randomDataShortCount; @@ -491,6 +491,8 @@ namespace T5 XSurfaceCollisionTree* collisionTree; }; + typedef tdef_align(16) unsigned short r_index16_t; + struct XSurface { char tileMode; @@ -500,7 +502,7 @@ namespace T5 uint16_t triCount; uint16_t baseTriIndex; uint16_t baseVertIndex; - uint16_t* triIndices; + r_index16_t(*triIndices)[3]; XSurfaceVertexInfo vertInfo; GfxPackedVertex* verts0; void/*IDirect3DVertexBuffer9*/* vb0; @@ -560,7 +562,7 @@ namespace T5 struct cplane_s { - float normal[3]; + vec3_t normal; float dist; char type; char signbits; @@ -574,17 +576,17 @@ namespace T5 int sflags; }; - struct BrushWrapper + struct type_align(16) BrushWrapper { - float mins[3]; + vec3_t mins; int contents; - float maxs[3]; + vec3_t maxs; unsigned int numsides; cbrushside_t* sides; int axial_cflags[2][3]; int axial_sflags[2][3]; unsigned int numverts; - float(*verts)[3]; + vec3_t* verts; cplane_s* planes; }; @@ -592,15 +594,17 @@ namespace T5 { BrushWrapper* brush; int type; - float orientation[3][3]; - float offset[3]; - float halfLengths[3]; + vec3_t orientation[3]; + vec3_t offset; + vec3_t halfLengths; }; + typedef tdef_align(16) PhysGeomInfo PhysGeomInfo16; + struct PhysGeomList { unsigned int count; - PhysGeomInfo* geoms; + PhysGeomInfo16* geoms; int contents; }; @@ -618,8 +622,8 @@ namespace T5 char lodRampType; uint16_t* boneNames; char* parentList; - int16_t* quats; - float* trans; + int16_t(*quats)[4]; + float(*trans)[4]; char* partClassification; DObjAnimMat* baseMat; XSurface* surfs; @@ -821,12 +825,28 @@ namespace T5 union MaterialArgumentDef { - const float* literalConst; + const float(*literalConst)[4]; MaterialArgumentCodeConst codeConst; unsigned int codeSampler; unsigned int nameHash; }; + enum MaterialShaderArgumentType + { + MTL_ARG_MATERIAL_VERTEX_CONST = 0x0, + MTL_ARG_LITERAL_VERTEX_CONST = 0x1, + MTL_ARG_MATERIAL_PIXEL_SAMPLER = 0x2, + MTL_ARG_CODE_PRIM_BEGIN = 0x3, + MTL_ARG_CODE_VERTEX_CONST = 0x3, + MTL_ARG_CODE_PIXEL_SAMPLER = 0x4, + MTL_ARG_CODE_PIXEL_CONST = 0x5, + MTL_ARG_CODE_PRIM_END = 0x6, + MTL_ARG_MATERIAL_PIXEL_CONST = 0x6, + MTL_ARG_LITERAL_PIXEL_CONST = 0x7, + + MLT_ARG_COUNT + }; + struct MaterialShaderArgument { uint16_t type; @@ -892,6 +912,52 @@ namespace T5 int platform[2]; }; + enum TextureSemantic + { + TS_2D = 0x0, + TS_FUNCTION = 0x1, + TS_COLOR_MAP = 0x2, + TS_UNUSED_1 = 0x3, + TS_UNUSED_2 = 0x4, + TS_NORMAL_MAP = 0x5, + TS_UNUSED_3 = 0x6, + TS_UNUSED_4 = 0x7, + TS_SPECULAR_MAP = 0x8, + TS_UNUSED_5 = 0x9, + TS_UNUSED_6 = 0xA, + TS_WATER_MAP = 0xB, + TS_COLOR0_MAP = 0xC, + TS_COLOR1_MAP = 0xD, + TS_COLOR2_MAP = 0xE, + TS_COLOR3_MAP = 0xF, + TS_COLOR4_MAP = 0x10, + TS_COLOR5_MAP = 0x11, + TS_COLOR6_MAP = 0x12, + TS_COLOR7_MAP = 0x13, + TS_COLOR8_MAP = 0x14, + TS_COLOR9_MAP = 0x15, + TS_COLOR10_MAP = 0x16, + TS_COLOR11_MAP = 0x17, + TS_COLOR12_MAP = 0x18, + TS_COLOR13_MAP = 0x19, + TS_COLOR14_MAP = 0x1A, + TS_COLOR15_MAP = 0x1B, + TS_THROW_MAP = 0x1C, + }; + + enum ImageCategory + { + IMG_CATEGORY_UNKNOWN = 0x0, + IMG_CATEGORY_AUTO_GENERATED = 0x1, + IMG_CATEGORY_LIGHTMAP = 0x2, + IMG_CATEGORY_LOAD_FROM_FILE = 0x3, + IMG_CATEGORY_RAW = 0x4, + IMG_CATEGORY_FIRST_UNMANAGED = 0x5, + IMG_CATEGORY_WATER = 0x5, + IMG_CATEGORY_RENDERTARGET = 0x6, + IMG_CATEGORY_TEMP = 0x7, + }; + struct GfxImage { GfxTexture texture; @@ -947,6 +1013,8 @@ namespace T5 SND_ASSET_FLAG_PAD_LOOP_BUFFER = 0x2, }; + typedef tdef_align(2048) char snd_align_char; + struct snd_asset { unsigned int version; @@ -962,7 +1030,7 @@ namespace T5 unsigned int seek_table_count; unsigned int* seek_table; unsigned int data_size; - char* data; + snd_align_char* data; }; struct LoadedSound @@ -971,10 +1039,12 @@ namespace T5 snd_asset sound; }; + typedef tdef_align(2048) char char_align_2048; + struct PrimedSound { const char* name; - char* buffer; + char_align_2048* buffer; unsigned int size; }; @@ -990,6 +1060,15 @@ namespace T5 StreamedSound* streamSnd; }; + enum snd_alias_type_t + { + SAT_UNKNOWN = 0x0, + SAT_LOADED = 0x1, + SAT_STREAMED = 0x2, + SAT_PRIMED = 0x3, + SAT_COUNT = 0x4, + }; + struct SoundFile { SoundFileRef u; @@ -1232,7 +1311,7 @@ namespace T5 int axial_cflags[2][3]; int axial_sflags[2][3]; unsigned int numverts; - float(*verts)[3]; + vec3_t* verts; }; enum DynEntityType @@ -1406,9 +1485,9 @@ namespace T5 unsigned int numLeafSurfaces; unsigned int* leafsurfaces; unsigned int vertCount; - float(*verts)[3]; + vec3_t* verts; unsigned int numBrushVerts; - float(*brushVerts)[3]; + vec3_t* brushVerts; unsigned int nuinds; uint16_t* uinds; int triCount; @@ -1832,7 +1911,7 @@ namespace T5 GfxPortalWritable writable; DpvsPlane plane; GfxCell* cell; - float(*vertices)[3]; + vec3_t* vertices; char vertexCount; float hullAxis[2][3]; }; @@ -1938,6 +2017,8 @@ namespace T5 char rgb[56][3]; }; + typedef tdef_align(4) char aligned_byte_pointer; + struct GfxLightGrid { bool hasLightRegions; @@ -1948,7 +2029,7 @@ namespace T5 unsigned int colAxis; uint16_t* rowDataStart; unsigned int rawRowDataSize; - char* rawRowData; + aligned_byte_pointer* rawRowData; unsigned int entryCount; GfxLightGridEntry* entries; unsigned int colorCount; @@ -2130,14 +2211,14 @@ namespace T5 char* surfaceVisData[3]; char* smodelVisDataCameraSaved; char* surfaceVisDataCameraSaved; - unsigned int* lodData; + raw_uint128* lodData; uint16_t* sortedSurfIndex; GfxStaticModelInst* smodelInsts; GfxSurface* surfaces; GfxCullGroup* cullGroups; GfxStaticModelDrawInst* smodelDrawInsts; GfxDrawSurf* surfaceMaterials; - unsigned int* surfaceCastsSunShadow; + raw_uint128* surfaceCastsSunShadow; volatile int usageCount; }; @@ -2167,7 +2248,7 @@ namespace T5 struct GfxWaterBuffer { unsigned int bufferSize; - float(*buffer)[4]; + vec4_t* buffer; }; struct Occluder @@ -2385,6 +2466,14 @@ namespace T5 operandInternalDataUnion internals; }; + enum expressionRpnEnum + { + RPN_CONSTANT = 0x0, + RPN_CMD_IDX = 0x1, + RPN_CMD = 0x2, + RPN_END = 0x3, + }; + union expressionRpnDataUnion { Operand constant; @@ -2897,6 +2986,140 @@ namespace T5 MISSILE_GUIDANCE_COUNT = 0x7, }; + enum weapAnimFiles_t + { + WEAP_ANIM_ROOT = 0x0, + WEAP_ANIM_IDLE = 0x1, + WEAP_ANIM_EMPTY_IDLE = 0x2, + WEAP_ANIM_FIRE = 0x3, + WEAP_ANIM_HOLD_FIRE = 0x4, + WEAP_ANIM_LASTSHOT = 0x5, + WEAP_ANIM_RECHAMBER = 0x6, + WEAP_ANIM_MELEE = 0x7, + WEAP_ANIM_MELEE_CHARGE = 0x8, + WEAP_ANIM_RELOAD = 0x9, + WEAP_ANIM_RELOAD_RIGHT = 0xA, + WEAP_ANIM_RELOAD_EMPTY = 0xB, + WEAP_ANIM_RELOAD_START = 0xC, + WEAP_ANIM_RELOAD_END = 0xD, + WEAP_ANIM_RELOAD_QUICK = 0xE, + WEAP_ANIM_RELOAD_QUICK_EMPTY = 0xF, + WEAP_ANIM_RAISE = 0x10, + WEAP_ANIM_FIRST_RAISE = 0x11, + WEAP_ANIM_DROP = 0x12, + WEAP_ANIM_ALT_RAISE = 0x13, + WEAP_ANIM_ALT_DROP = 0x14, + WEAP_ANIM_QUICK_RAISE = 0x15, + WEAP_ANIM_QUICK_DROP = 0x16, + WEAP_ANIM_EMPTY_RAISE = 0x17, + WEAP_ANIM_EMPTY_DROP = 0x18, + WEAP_ANIM_SPRINT_IN = 0x19, + WEAP_ANIM_SPRINT_LOOP = 0x1A, + WEAP_ANIM_SPRINT_OUT = 0x1B, + WEAP_ANIM_SPRINT_EMPTY_IN = 0x1C, + WEAP_ANIM_SPRINT_EMPTY_LOOP = 0x1D, + WEAP_ANIM_SPRINT_EMPTY_OUT = 0x1E, + WEAP_ANIM_LOWREADY_IN = 0x1F, + WEAP_ANIM_LOWREADY_LOOP = 0x20, + WEAP_ANIM_LOWREADY_OUT = 0x21, + WEAP_ANIM_CONT_FIRE_IN = 0x22, + WEAP_ANIM_CONT_FIRE_LOOP = 0x23, + WEAP_ANIM_CONT_FIRE_OUT = 0x24, + WEAP_ANIM_DEPLOY = 0x25, + WEAP_ANIM_BREAKDOWN = 0x26, + WEAP_ANIM_DETONATE = 0x27, + WEAP_ANIM_NIGHTVISION_WEAR = 0x28, + WEAP_ANIM_NIGHTVISION_REMOVE = 0x29, + WEAP_ANIM_ADS_FIRE = 0x2A, + WEAP_ANIM_ADS_LASTSHOT = 0x2B, + WEAP_ANIM_ADS_RECHAMBER = 0x2C, + WEAP_ANIM_DTP_IN = 0x2D, + WEAP_ANIM_DTP_LOOP = 0x2E, + WEAP_ANIM_DTP_OUT = 0x2F, + WEAP_ANIM_DTP_EMPTY_IN = 0x30, + WEAP_ANIM_DTP_EMPTY_LOOP = 0x31, + WEAP_ANIM_DTP_EMPTY_OUT = 0x32, + WEAP_ANIM_SLIDE_IN = 0x33, + WEAP_ANIM_MANTLE = 0x34, + WEAP_ANIM_CAMERA_SPRINT_LOOP = 0x35, + WEAP_ANIM_CAMERA_DTP_IN = 0x36, + WEAP_ANIM_CAMERA_DTP_LOOP = 0x37, + WEAP_ANIM_CAMERA_DTP_OUT = 0x38, + WEAP_ANIM_CAMERA_MANTLE = 0x39, + WEAP_ANIM_FIRE_LEFT = 0x3A, + WEAP_ANIM_LASTSHOT_LEFT = 0x3B, + WEAP_ANIM_IDLE_LEFT = 0x3C, + WEAP_ANIM_EMPTY_IDLE_LEFT = 0x3D, + WEAP_ANIM_RELOAD_EMPTY_LEFT = 0x3E, + WEAP_ANIM_RELOAD_LEFT = 0x3F, + WEAP_ANIM_ADS_UP = 0x40, + WEAP_ANIM_ADS_DOWN = 0x41, + + NUM_WEAP_ANIMS + }; + + enum materialSurfType_t + { + SURF_TYPE_DEFAULT, + SURF_TYPE_BARK, + SURF_TYPE_BRICK, + SURF_TYPE_CARPET, + SURF_TYPE_CLOTH, + SURF_TYPE_CONCRETE, + SURF_TYPE_DIRT, + SURF_TYPE_FLESH, + SURF_TYPE_FOLIAGE, + SURF_TYPE_GLASS, + SURF_TYPE_GRASS, + SURF_TYPE_GRAVEL, + SURF_TYPE_ICE, + SURF_TYPE_METAL, + SURF_TYPE_MUD, + SURF_TYPE_PAPER, + SURF_TYPE_PLASTER, + SURF_TYPE_ROCK, + SURF_TYPE_SAND, + SURF_TYPE_SNOW, + SURF_TYPE_WATER, + SURF_TYPE_WOOD, + SURF_TYPE_ASPHALT, + SURF_TYPE_CERAMIC, + SURF_TYPE_PLASTIC, + SURF_TYPE_RUBBER, + SURF_TYPE_CUSHION, + SURF_TYPE_FRUIT, + SURF_TYPE_PAINTED_METAL, + SURF_TYPE_PLAYER, + SURF_TYPE_TALL_GRASS, + + SURF_TYPE_NUM + }; + + enum hitLocation_t + { + HITLOC_NONE = 0x0, + HITLOC_HELMET = 0x1, + HITLOC_HEAD = 0x2, + HITLOC_NECK = 0x3, + HITLOC_TORSO_UPR = 0x4, + HITLOC_TORSO_LWR = 0x5, + HITLOC_R_ARM_UPR = 0x6, + HITLOC_L_ARM_UPR = 0x7, + HITLOC_R_ARM_LWR = 0x8, + HITLOC_L_ARM_LWR = 0x9, + HITLOC_R_HAND = 0xA, + HITLOC_L_HAND = 0xB, + HITLOC_R_LEG_UPR = 0xC, + HITLOC_L_LEG_UPR = 0xD, + HITLOC_R_LEG_LWR = 0xE, + HITLOC_L_LEG_LWR = 0xF, + HITLOC_R_FOOT = 0x10, + HITLOC_L_FOOT = 0x11, + HITLOC_GUN = 0x12, + + HITLOC_NUM + }; + struct flameTable { float flameVar_streamChunkGravityStart; @@ -3467,9 +3690,17 @@ namespace T5 float fHipViewScatterMax; float fightDist; float maxDist; - const char* accuracyGraphName[2]; - vec2_t* accuracyGraphKnots[2]; - vec2_t* originalAccuracyGraphKnots[2]; + //const char *accuracyGraphName[2]; // TODO: Order is accuracyGraphName[0] -> accuracyGraphKnots[0] -> originalAccuracyGraphKnots[0] -> accuracyGraphName[1] -> ... + // Which is currently not possible to do in code generation. Afaik this is the only place where this is the case. + // So might be something to fix but on the other hand it might be too much work for this little inconvenience. + const char* accuracyGraphName0; + const char* accuracyGraphName1; + //vec2_t *accuracyGraphKnots[2]; + vec2_t* accuracyGraphKnots0; + vec2_t* accuracyGraphKnots1; + //vec2_t *originalAccuracyGraphKnots[2]; + vec2_t* originalAccuracyGraphKnots0; + vec2_t* originalAccuracyGraphKnots1; int accuracyGraphKnotCount[2]; int originalAccuracyGraphKnotCount[2]; int iPositionReloadTransTime; @@ -3833,6 +4064,26 @@ namespace T5 const char* spawnSound; }; + enum FxElemType : char + { + FX_ELEM_TYPE_SPRITE_BILLBOARD = 0x0, + FX_ELEM_TYPE_SPRITE_ORIENTED = 0x1, + FX_ELEM_TYPE_SPRITE_ROTATED = 0x2, + FX_ELEM_TYPE_TAIL = 0x3, + FX_ELEM_TYPE_LINE = 0x4, + FX_ELEM_TYPE_TRAIL = 0x5, + FX_ELEM_TYPE_CLOUD = 0x6, + FX_ELEM_TYPE_MODEL = 0x7, + FX_ELEM_TYPE_OMNI_LIGHT = 0x8, + FX_ELEM_TYPE_SPOT_LIGHT = 0x9, + FX_ELEM_TYPE_SOUND = 0xA, + FX_ELEM_TYPE_DECAL = 0xB, + FX_ELEM_TYPE_RUNNER = 0xC, + FX_ELEM_TYPE_COUNT = 0xD, + FX_ELEM_TYPE_LAST_SPRITE = 0x5, + FX_ELEM_TYPE_LAST_DRAWN = 0x9, + }; + struct FxElemDef { int flags; @@ -4038,15 +4289,15 @@ namespace T5 GlassDef* glassDef; unsigned int index; unsigned int brushModel; - float origin[3]; - float angles[3]; - float absmin[3]; - float absmax[3]; + vec3_t origin; + vec3_t angles; + vec3_t absmin; + vec3_t absmax; bool isPlanar; char numOutlineVerts; - float(*outline)[2]; - float outlineAxis[3][3]; - float outlineOrigin[3]; + vec2_t* outline; + vec3_t outlineAxis[3]; + vec3_t outlineOrigin; float uvScale; float thickness; }; diff --git a/src/ZoneCode/Game/T5/T5_Commands.txt b/src/ZoneCode/Game/T5/T5_Commands.txt index 659a9f4d..0613abc4 100644 --- a/src/ZoneCode/Game/T5/T5_Commands.txt +++ b/src/ZoneCode/Game/T5/T5_Commands.txt @@ -30,6 +30,7 @@ asset FxEffectDef ASSET_TYPE_FX; asset FxImpactTable ASSET_TYPE_IMPACT_FX; asset RawFile ASSET_TYPE_RAWFILE; asset StringTable ASSET_TYPE_STRINGTABLE; +asset PackIndex ASSET_TYPE_PACK_INDEX; asset XGlobals ASSET_TYPE_XGLOBALS; asset ddlRoot_t ASSET_TYPE_DDL; asset Glasses ASSET_TYPE_GLASSES; @@ -72,6 +73,7 @@ block normal XFILE_BLOCK_PHYSICAL; #include "XAssets/FxImpactTable.txt" #include "XAssets/RawFile.txt" #include "XAssets/StringTable.txt" +#include "XAssets/PackIndex.txt" #include "XAssets/XGlobals.txt" #include "XAssets/ddlRoot_t.txt" #include "XAssets/Glasses.txt" diff --git a/src/ZoneCode/Game/T5/XAssets/ComWorld.txt b/src/ZoneCode/Game/T5/XAssets/ComWorld.txt index e69de29b..4d13305e 100644 --- a/src/ZoneCode/Game/T5/XAssets/ComWorld.txt +++ b/src/ZoneCode/Game/T5/XAssets/ComWorld.txt @@ -0,0 +1,16 @@ +// ========================================= +// ComWorld +// ========================================= +use ComWorld; +set block XFILE_BLOCK_TEMP; +set string name; +set name name; +set count primaryLights primaryLightCount; +set count waterCells numWaterCells; +set count burnableCells numBurnableCells; + +// ComPrimaryLight +set string ComPrimaryLight::defName; + +// ComBurnableCell +set count ComBurnableCell::data 32; \ No newline at end of file diff --git a/src/ZoneCode/Game/T5/XAssets/DestructibleDef.txt b/src/ZoneCode/Game/T5/XAssets/DestructibleDef.txt index e69de29b..2060abe7 100644 --- a/src/ZoneCode/Game/T5/XAssets/DestructibleDef.txt +++ b/src/ZoneCode/Game/T5/XAssets/DestructibleDef.txt @@ -0,0 +1,21 @@ +// ========================================= +// DestructibleDef +// ========================================= +use DestructibleDef; +set block XFILE_BLOCK_TEMP; +set string name; +set name name; +set count pieces numPieces; + +// DestructiblePiece +use DestructiblePiece; +set string damageSound; +set string burnSound; +set scriptstring enableLabel; + +// DestructibleStage +use DestructibleStage; +set string breakSound; +set string breakNotify; +set string loopSound; +set scriptstring showBone; \ No newline at end of file diff --git a/src/ZoneCode/Game/T5/XAssets/EmblemSet.txt b/src/ZoneCode/Game/T5/XAssets/EmblemSet.txt index e69de29b..65615283 100644 --- a/src/ZoneCode/Game/T5/XAssets/EmblemSet.txt +++ b/src/ZoneCode/Game/T5/XAssets/EmblemSet.txt @@ -0,0 +1,21 @@ +// ========================================= +// EmblemSet +// ========================================= +use EmblemSet; +set block XFILE_BLOCK_TEMP; +set count layers layerCount; +set count categories categoryCount; +set count icons iconCount; +set count backgrounds backgroundCount; +set count backgroundLookup backgroundLookupCount; + +// EmblemCategory +use EmblemCategory; +set string name; +set string description; + +// EmblemIcon +set string EmblemIcon::description; + +// EmblemBackground +set string EmblemBackground::description; \ No newline at end of file diff --git a/src/ZoneCode/Game/T5/XAssets/Font_s.txt b/src/ZoneCode/Game/T5/XAssets/Font_s.txt index e69de29b..f37cf707 100644 --- a/src/ZoneCode/Game/T5/XAssets/Font_s.txt +++ b/src/ZoneCode/Game/T5/XAssets/Font_s.txt @@ -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; \ No newline at end of file diff --git a/src/ZoneCode/Game/T5/XAssets/FxEffectDef.txt b/src/ZoneCode/Game/T5/XAssets/FxEffectDef.txt index e69de29b..a7a32ce5 100644 --- a/src/ZoneCode/Game/T5/XAssets/FxEffectDef.txt +++ b/src/ZoneCode/Game/T5/XAssets/FxEffectDef.txt @@ -0,0 +1,48 @@ +// ========================================= +// FxEffectDef +// ========================================= +use FxEffectDef; +set block XFILE_BLOCK_TEMP; +set string name; +set name name; +set count elemDefs elemDefCountLooping + elemDefCountOneShot + elemDefCountEmission; + +// 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_SPRITE_ROTATED +|| FxElemDef::elemType == FX_ELEM_TYPE_TAIL +|| FxElemDef::elemType == FX_ELEM_TYPE_LINE +|| FxElemDef::elemType == FX_ELEM_TYPE_TRAIL +|| FxElemDef::elemType == FX_ELEM_TYPE_CLOUD; + +// FxEffectDefRef +use FxEffectDefRef; +set condition handle never; +set string name; + +// FxTrailDef +use FxTrailDef; +set count verts vertCount; +set count inds indCount; + +// FxElemSpawnSound +set string FxElemSpawnSound::spawnSound; \ No newline at end of file diff --git a/src/ZoneCode/Game/T5/XAssets/FxImpactTable.txt b/src/ZoneCode/Game/T5/XAssets/FxImpactTable.txt index e69de29b..5545afd5 100644 --- a/src/ZoneCode/Game/T5/XAssets/FxImpactTable.txt +++ b/src/ZoneCode/Game/T5/XAssets/FxImpactTable.txt @@ -0,0 +1,8 @@ +// ========================================= +// FxImpactTable +// ========================================= +use FxImpactTable; +set block XFILE_BLOCK_TEMP; +set string name; +//set name name; +set count table 21; \ No newline at end of file diff --git a/src/ZoneCode/Game/T5/XAssets/GameWorldMp.txt b/src/ZoneCode/Game/T5/XAssets/GameWorldMp.txt index e69de29b..27732a84 100644 --- a/src/ZoneCode/Game/T5/XAssets/GameWorldMp.txt +++ b/src/ZoneCode/Game/T5/XAssets/GameWorldMp.txt @@ -0,0 +1,7 @@ +// ========================================= +// GameWorldMp +// ========================================= +use GameWorldMp; +set block XFILE_BLOCK_TEMP; +set string name; +set name name; \ No newline at end of file diff --git a/src/ZoneCode/Game/T5/XAssets/GameWorldSp.txt b/src/ZoneCode/Game/T5/XAssets/GameWorldSp.txt index e69de29b..bf5ad36d 100644 --- a/src/ZoneCode/Game/T5/XAssets/GameWorldSp.txt +++ b/src/ZoneCode/Game/T5/XAssets/GameWorldSp.txt @@ -0,0 +1,38 @@ +// ========================================= +// GameWorldSp +// ========================================= +use GameWorldSp; +set block XFILE_BLOCK_TEMP; +set string name; +set name name; + +// PathData +use PathData; +set count nodes nodeCount + 128; +set block basenodes XFILE_BLOCK_RUNTIME; +set count basenodes nodeCount + 128; +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_tree_t +use pathnode_tree_t; +set condition u::s axis < 0; +set reusable u::child; + +// pathnode_tree_nodes_t +use pathnode_tree_nodes_t; +set count nodes nodeCount; \ No newline at end of file diff --git a/src/ZoneCode/Game/T5/XAssets/GfxImage.txt b/src/ZoneCode/Game/T5/XAssets/GfxImage.txt index e69de29b..2a43500a 100644 --- a/src/ZoneCode/Game/T5/XAssets/GfxImage.txt +++ b/src/ZoneCode/Game/T5/XAssets/GfxImage.txt @@ -0,0 +1,23 @@ +// ========================================= +// GfxImage +// ========================================= +use GfxImage; +set block XFILE_BLOCK_TEMP; +set action OnImageLoaded(GfxImage); +set string name; +set name name; +set condition pixels never; +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; \ No newline at end of file diff --git a/src/ZoneCode/Game/T5/XAssets/GfxLightDef.txt b/src/ZoneCode/Game/T5/XAssets/GfxLightDef.txt index e69de29b..ca07fc87 100644 --- a/src/ZoneCode/Game/T5/XAssets/GfxLightDef.txt +++ b/src/ZoneCode/Game/T5/XAssets/GfxLightDef.txt @@ -0,0 +1,7 @@ +// ========================================= +// GfxLightDef +// ========================================= +use GfxLightDef; +set block XFILE_BLOCK_TEMP; +set string name; +set name name; \ No newline at end of file diff --git a/src/ZoneCode/Game/T5/XAssets/GfxWorld.txt b/src/ZoneCode/Game/T5/XAssets/GfxWorld.txt index e69de29b..d8d0c1cf 100644 --- a/src/ZoneCode/Game/T5/XAssets/GfxWorld.txt +++ b/src/ZoneCode/Game/T5/XAssets/GfxWorld.txt @@ -0,0 +1,159 @@ +// ========================================= +// GfxWorld +// ========================================= +use GfxWorld; +set block XFILE_BLOCK_TEMP; +set string name; +set name name; +set string baseName; +set count skyStartSurfs skySurfCount; +set string skyBoxModel; +set reusable sunLight; +set count coronas coronaCount; +set count shadowMapVolumes shadowMapVolumeCount; +set count shadowMapVolumePlanes shadowMapVolumePlaneCount; +set count exposureVolumes exposureVolumeCount; +set count exposureVolumePlanes exposureVolumePlaneCount; +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 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; +set count occluders numOccluders; +set count outdoorBounds numOutdoorBounds; +set count heroLights heroLightCount; +set count heroLightTree heroLightTreeCount; + +// GfxWorldStreamInfo +use GfxWorldStreamInfo; +set count aabbTrees aabbTreeCount; +set count leafRefs leafRefCount; + +// 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; + +// 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; + +// GfxWorldDraw +use GfxWorldDraw; +set count reflectionProbes 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 block lightmapSecondaryTexturesB XFILE_BLOCK_RUNTIME; +set count lightmapSecondaryTexturesB lightmapCount; +set count indices indexCount; + +// GfxReflectionProbe +use GfxReflectionProbe; +set count probeVolumes probeVolumeCount; + +// GfxWorldVertexData +use GfxWorldVertexData; +set count vertices GfxWorldDraw::vertexCount; +set condition worldVb never; + +// GfxWorldVertexLayerData +use GfxWorldVertexLayerData; +set count data GfxWorldDraw::vertexLayerDataSize; +set condition layerVb never; + +// 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 +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 smodelVisDataCameraSaved XFILE_BLOCK_RUNTIME; +set count smodelVisDataCameraSaved smodelCount; +set block surfaceVisDataCameraSaved XFILE_BLOCK_RUNTIME; +set count surfaceVisDataCameraSaved 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 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; \ No newline at end of file diff --git a/src/ZoneCode/Game/T5/XAssets/Glasses.txt b/src/ZoneCode/Game/T5/XAssets/Glasses.txt index e69de29b..8bbd95a4 100644 --- a/src/ZoneCode/Game/T5/XAssets/Glasses.txt +++ b/src/ZoneCode/Game/T5/XAssets/Glasses.txt @@ -0,0 +1,21 @@ +// ========================================= +// Glasses +// ========================================= +use Glasses; +set block XFILE_BLOCK_TEMP; +set string name; +set name name; +set count glasses numGlasses; +set condition workMemory never; + +// Glass +use Glass; +set reusable glassDef; +set count outline numOutlineVerts; + +// GlassDef +use GlassDef; +set string name; +set string crackSound; +set string shatterShound; +set string autoShatterShound; \ No newline at end of file diff --git a/src/ZoneCode/Game/T5/XAssets/LocalizeEntry.txt b/src/ZoneCode/Game/T5/XAssets/LocalizeEntry.txt index e69de29b..6dc49902 100644 --- a/src/ZoneCode/Game/T5/XAssets/LocalizeEntry.txt +++ b/src/ZoneCode/Game/T5/XAssets/LocalizeEntry.txt @@ -0,0 +1,8 @@ +// ========================================= +// LocalizeEntry +// ========================================= +use LocalizeEntry; +set block XFILE_BLOCK_TEMP; +set string value; +set string name; +set name name; \ No newline at end of file diff --git a/src/ZoneCode/Game/T5/XAssets/MapEnts.txt b/src/ZoneCode/Game/T5/XAssets/MapEnts.txt index e69de29b..7540ff74 100644 --- a/src/ZoneCode/Game/T5/XAssets/MapEnts.txt +++ b/src/ZoneCode/Game/T5/XAssets/MapEnts.txt @@ -0,0 +1,8 @@ +// ========================================= +// MapEnts +// ========================================= +use MapEnts; +set block XFILE_BLOCK_TEMP; +set string name; +set name name; +set count entityString numEntityChars; \ No newline at end of file diff --git a/src/ZoneCode/Game/T5/XAssets/Material.txt b/src/ZoneCode/Game/T5/XAssets/Material.txt index e69de29b..b0f52d34 100644 --- a/src/ZoneCode/Game/T5/XAssets/Material.txt +++ b/src/ZoneCode/Game/T5/XAssets/Material.txt @@ -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; \ No newline at end of file diff --git a/src/ZoneCode/Game/T5/XAssets/MaterialTechniqueSet.txt b/src/ZoneCode/Game/T5/XAssets/MaterialTechniqueSet.txt index e69de29b..c9ba1e54 100644 --- a/src/ZoneCode/Game/T5/XAssets/MaterialTechniqueSet.txt +++ b/src/ZoneCode/Game/T5/XAssets/MaterialTechniqueSet.txt @@ -0,0 +1,50 @@ +// ========================================= +// MaterialTechniqueSet +// ========================================= +use MaterialTechniqueSet; +set block XFILE_BLOCK_TEMP; +set string name; +set name name; +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 vertexShader; +set reusable vertexDecl; +set reusable pixelShader; + +// MaterialVertexStreamRouting +set condition MaterialVertexStreamRouting::decl never; + +// MaterialVertexShader +set string MaterialVertexShader::name; + +// MaterialVertexShaderProgram +set condition MaterialVertexShaderProgram::vs never; + +// GfxVertexShaderLoadDef +set count GfxVertexShaderLoadDef::program programSize; + +// MaterialPixelShader; +set string MaterialPixelShader::name; + +// MaterialPixelShaderProgram +set condition MaterialPixelShaderProgram::ps never; + +// GfxPixelShaderLoadDef +set count GfxPixelShaderLoadDef::program programSize; + +// MaterialShaderArgument +use MaterialShaderArgument; +set condition u::literalConst type == MTL_ARG_LITERAL_VERTEX_CONST +|| type == MTL_ARG_LITERAL_PIXEL_CONST; +set reusable u::literalConst; \ No newline at end of file diff --git a/src/ZoneCode/Game/T5/XAssets/MenuList.txt b/src/ZoneCode/Game/T5/XAssets/MenuList.txt index e69de29b..5db2bd62 100644 --- a/src/ZoneCode/Game/T5/XAssets/MenuList.txt +++ b/src/ZoneCode/Game/T5/XAssets/MenuList.txt @@ -0,0 +1,8 @@ +// ========================================= +// MenuList +// ========================================= +use MenuList; +set block XFILE_BLOCK_TEMP; +set string name; +set name name; +set count menus menuCount; \ No newline at end of file diff --git a/src/ZoneCode/Game/T5/XAssets/PackIndex.txt b/src/ZoneCode/Game/T5/XAssets/PackIndex.txt index e69de29b..017d6922 100644 --- a/src/ZoneCode/Game/T5/XAssets/PackIndex.txt +++ b/src/ZoneCode/Game/T5/XAssets/PackIndex.txt @@ -0,0 +1,8 @@ +// ========================================= +// PackIndex +// ========================================= +use PackIndex; +set block XFILE_BLOCK_TEMP; +set string name; +set name name; +set count entries header::count; \ No newline at end of file diff --git a/src/ZoneCode/Game/T5/XAssets/PhysConstraints.txt b/src/ZoneCode/Game/T5/XAssets/PhysConstraints.txt index e69de29b..6a476b3e 100644 --- a/src/ZoneCode/Game/T5/XAssets/PhysConstraints.txt +++ b/src/ZoneCode/Game/T5/XAssets/PhysConstraints.txt @@ -0,0 +1,14 @@ +// ========================================= +// PhysConstraints +// ========================================= +use PhysConstraints; +set block XFILE_BLOCK_TEMP; +set string name; +set name name; + +use PhysConstraint; +set scriptstring targetname; +set scriptstring target_ent1; +set string target_bone1; +set scriptstring target_ent2; +set string target_bone2; \ No newline at end of file diff --git a/src/ZoneCode/Game/T5/XAssets/PhysPreset.txt b/src/ZoneCode/Game/T5/XAssets/PhysPreset.txt index e69de29b..38346b9b 100644 --- a/src/ZoneCode/Game/T5/XAssets/PhysPreset.txt +++ b/src/ZoneCode/Game/T5/XAssets/PhysPreset.txt @@ -0,0 +1,8 @@ +// ========================================= +// PhysPreset +// ========================================= +use PhysPreset; +set block XFILE_BLOCK_TEMP; +set string name; +set name name; +set string sndAliasPrefix; \ No newline at end of file diff --git a/src/ZoneCode/Game/T5/XAssets/RawFile.txt b/src/ZoneCode/Game/T5/XAssets/RawFile.txt index e69de29b..29e05132 100644 --- a/src/ZoneCode/Game/T5/XAssets/RawFile.txt +++ b/src/ZoneCode/Game/T5/XAssets/RawFile.txt @@ -0,0 +1,8 @@ +// ========================================= +// RawFile +// ========================================= +use RawFile; +set block XFILE_BLOCK_TEMP; +set string name; +set name name; +set count buffer len + 1; \ No newline at end of file diff --git a/src/ZoneCode/Game/T5/XAssets/SndBank.txt b/src/ZoneCode/Game/T5/XAssets/SndBank.txt index e69de29b..3ea395a1 100644 --- a/src/ZoneCode/Game/T5/XAssets/SndBank.txt +++ b/src/ZoneCode/Game/T5/XAssets/SndBank.txt @@ -0,0 +1,50 @@ +// ========================================= +// SndBank +// ========================================= +use SndBank; +set block XFILE_BLOCK_TEMP; +set string name; +set name name; +set count alias aliasCount; +set count aliasIndex aliasCount; +set count radverbs radverbCount; +set count snapshots snapshotCount; + +// snd_alias_list_t +use snd_alias_list_t; +set string name; +set reusable head; +set count head count; + +// snd_alias_t +use snd_alias_t; +set string name; +set string subtitle; +set string secondaryname; +set reusable soundFile; + +// SoundFile +use SoundFile; +set condition u::loadSnd type == SAT_LOADED; +set reusable u::loadSnd; +set reusable u::streamSnd; + +// LoadedSound +set string LoadedSound::name; + +// snd_asset +use snd_asset; +set count seek_table seek_table_count; +set count data data_size; +set block data XFILE_BLOCK_PHYSICAL; + +// StreamedSound +use StreamedSound; +set string filename; +set reusable primeSnd; + +// PrimedSound +use PrimedSound; +set string name; +set count buffer size; +set block buffer XFILE_BLOCK_LARGE; \ No newline at end of file diff --git a/src/ZoneCode/Game/T5/XAssets/SndDriverGlobals.txt b/src/ZoneCode/Game/T5/XAssets/SndDriverGlobals.txt index e69de29b..519de90b 100644 --- a/src/ZoneCode/Game/T5/XAssets/SndDriverGlobals.txt +++ b/src/ZoneCode/Game/T5/XAssets/SndDriverGlobals.txt @@ -0,0 +1,13 @@ +// ========================================= +// SndDriverGlobals +// ========================================= +use SndDriverGlobals; +set block XFILE_BLOCK_TEMP; +set string name; +set name name; +set count groups groupCount; +set count curves curveCount; +set count pans panCount; +set count snapshotGroups snapshotGroupCount; +set count contexts contextCount; +set count masters masterCount; \ No newline at end of file diff --git a/src/ZoneCode/Game/T5/XAssets/SndPatch.txt b/src/ZoneCode/Game/T5/XAssets/SndPatch.txt index e69de29b..b85ad1a6 100644 --- a/src/ZoneCode/Game/T5/XAssets/SndPatch.txt +++ b/src/ZoneCode/Game/T5/XAssets/SndPatch.txt @@ -0,0 +1,10 @@ +// ========================================= +// SndPatch +// ========================================= +use SndPatch; +set block XFILE_BLOCK_TEMP; +set string name; +set name name; +set count elements elementCount; +set count files fileCount; +set reusable files; \ No newline at end of file diff --git a/src/ZoneCode/Game/T5/XAssets/StringTable.txt b/src/ZoneCode/Game/T5/XAssets/StringTable.txt index e69de29b..b1b5e1ac 100644 --- a/src/ZoneCode/Game/T5/XAssets/StringTable.txt +++ b/src/ZoneCode/Game/T5/XAssets/StringTable.txt @@ -0,0 +1,12 @@ +// ========================================= +// StringTable +// ========================================= +use StringTable; +set block XFILE_BLOCK_TEMP; +set string name; +set name name; +set count values columnCount * rowCount; +set count cellIndex columnCount * rowCount; + +// StringTableCell +set string StringTableCell::string; \ No newline at end of file diff --git a/src/ZoneCode/Game/T5/XAssets/WeaponVariantDef.txt b/src/ZoneCode/Game/T5/XAssets/WeaponVariantDef.txt index e69de29b..5263b0c9 100644 --- a/src/ZoneCode/Game/T5/XAssets/WeaponVariantDef.txt +++ b/src/ZoneCode/Game/T5/XAssets/WeaponVariantDef.txt @@ -0,0 +1,166 @@ +// ========================================= +// WeaponVariantDef +// ========================================= +use WeaponVariantDef; +set block XFILE_BLOCK_TEMP; +set string szInternalName; +set name szInternalName; +set reusable weapDef; +set string szDisplayName; +set string szAltWeaponName; +set string szXAnims; +set count szXAnims NUM_WEAP_ANIMS; +set reusable szXAnims; +set scriptstring hideTags; +set count hideTags 32; +set reusable hideTags; +set string szAmmoName; +set string szClipName; + +// WeaponDef +use WeaponDef; +set string szOverlayName; +set count gunXModel 16; +set reusable gunXModel; +set string szModeName; +set scriptstring notetrackSoundMapKeys; +set count notetrackSoundMapKeys 20; +set reusable notetrackSoundMapKeys; +set scriptstring notetrackSoundMapValues; +set count notetrackSoundMapValues 20; +set reusable notetrackSoundMapValues; +set string parentWeaponName; +set string pickupSound; +set string pickupSoundPlayer; +set string ammoPickupSound; +set string ammoPickupSoundPlayer; +set string projectileSound; +set string pullbackSound; +set string pullbackSoundPlayer; +set string fireSound; +set string fireSoundPlayer; +set string fireLoopSound; +set string fireLoopSoundPlayer; +set string fireLoopEndSound; +set string fireLoopEndSoundPlayer; +set string fireStopSound; +set string fireStopSoundPlayer; +set string fireLastSound; +set string fireLastSoundPlayer; +set string emptyFireSound; +set string emptyFireSoundPlayer; +set string crackSound; +set string whizbySound; +set string meleeSwipeSound; +set string meleeSwipeSoundPlayer; +set string meleeHitSound; +set string meleeMissSound; +set string rechamberSound; +set string rechamberSoundPlayer; +set string reloadSound; +set string reloadSoundPlayer; +set string reloadEmptySound; +set string reloadEmptySoundPlayer; +set string reloadStartSound; +set string reloadStartSoundPlayer; +set string reloadEndSound; +set string reloadEndSoundPlayer; +set string rotateLoopSound; +set string rotateLoopSoundPlayer; +set string deploySound; +set string deploySoundPlayer; +set string finishDeploySound; +set string finishDeploySoundPlayer; +set string breakdownSound; +set string breakdownSoundPlayer; +set string finishBreakdownSound; +set string finishBreakdownSoundPlayer; +set string detonateSound; +set string detonateSoundPlayer; +set string nightVisionWearSound; +set string nightVisionWearSoundPlayer; +set string nightVisionRemoveSound; +set string nightVisionRemoveSoundPlayer; +set string altSwitchSound; +set string altSwitchSoundPlayer; +set string raiseSound; +set string raiseSoundPlayer; +set string firstRaiseSound; +set string firstRaiseSoundPlayer; +set string putawaySound; +set string putawaySoundPlayer; +set string overheatSound; +set string overheatSoundPlayer; +set string adsZoomSound; +set string bounceSound; +set count bounceSound SURF_TYPE_NUM; +set reusable bounceSound; +set string standMountedWeapdef; +set string crouchMountedWeapdef; +set string proneMountedWeapdef; +set count worldModel 16; +set reusable worldModel; +set string szSharedAmmoCapName; +set scriptstring explosionTag; +set string spinLoopSound; +set string spinLoopSoundPlayer; +set string startSpinSound; +set string startSpinSoundPlayer; +set string stopSpinSound; +set string stopSpinSoundPlayer; +set string stackSound; +set string szSpawnedGrenadeWeaponName; +set string szDualWieldWeaponName; +set string projExplosionSound; +set string projDudSound; +set string mortarShellSound; +set string tankShellSound; +set count parallelBounce SURF_TYPE_NUM; +set reusable parallelBounce; +set count perpendicularBounce SURF_TYPE_NUM; +set reusable perpendicularBounce; +set string projIgnitionSound; +set string accuracyGraphName0; +set string accuracyGraphName1; +set reusable accuracyGraphKnots0; +set reusable accuracyGraphKnots1; +set count accuracyGraphKnots0 accuracyGraphKnotCount[0]; +set count accuracyGraphKnots1 accuracyGraphKnotCount[1]; +set reusable originalAccuracyGraphKnots0; +set reusable originalAccuracyGraphKnots1; +set count originalAccuracyGraphKnots0 accuracyGraphKnotCount[0]; +set count originalAccuracyGraphKnots1 accuracyGraphKnotCount[1]; +set string szUseHintString; +set string dropHintString; +set string szScript; +set count locationDamageMultipliers HITLOC_NUM; +set reusable locationDamageMultipliers; +set string fireRumble; +set string meleeImpactRumble; +set string reloadRumble; +set string flameTableFirstPerson; +set string flameTableThirdPerson; +set reusable flameTableFirstPersonPtr; +set reusable flameTableThirdPersonPtr; + +reorder: +... +accuracyGraphName0 +accuracyGraphKnots0 +originalAccuracyGraphKnots0 +accuracyGraphName1 +accuracyGraphKnots1 +originalAccuracyGraphKnots1; + +reorder: +... +killIcon +indicatorIcon; + +// flameTable +use flameTable; +set string name; +set string flameOffLoopSound; +set string flameIgniteSound; +set string flameOnLoopSound; +set string flameCooldownSound; \ No newline at end of file diff --git a/src/ZoneCode/Game/T5/XAssets/XAnimParts.txt b/src/ZoneCode/Game/T5/XAssets/XAnimParts.txt index e69de29b..529f3cab 100644 --- a/src/ZoneCode/Game/T5/XAssets/XAnimParts.txt +++ b/src/ZoneCode/Game/T5/XAssets/XAnimParts.txt @@ -0,0 +1,69 @@ +// ========================================= +// 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 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; \ No newline at end of file diff --git a/src/ZoneCode/Game/T5/XAssets/XGlobals.txt b/src/ZoneCode/Game/T5/XAssets/XGlobals.txt index e69de29b..76653d91 100644 --- a/src/ZoneCode/Game/T5/XAssets/XGlobals.txt +++ b/src/ZoneCode/Game/T5/XAssets/XGlobals.txt @@ -0,0 +1,7 @@ +// ========================================= +// XGlobals +// ========================================= +use XGlobals; +set block XFILE_BLOCK_TEMP; +set string name; +set name name; \ No newline at end of file diff --git a/src/ZoneCode/Game/T5/XAssets/XModel.txt b/src/ZoneCode/Game/T5/XAssets/XModel.txt index e69de29b..7299b1ec 100644 --- a/src/ZoneCode/Game/T5/XAssets/XModel.txt +++ b/src/ZoneCode/Game/T5/XAssets/XModel.txt @@ -0,0 +1,90 @@ +// ========================================= +// 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 surfs numsurfs; +set count materialHandles numsurfs; +set count collSurfs numCollSurfs; +set count boneInfo numBones; +set count streamInfo::highMipBounds numsurfs; +set count collmaps numCollmaps; + +// XSurface +use XSurface; +set reusable verts0; +set count verts0 vertCount; +set condition vb0 never; +set reusable vertList; +set count vertList vertListCount; +set reusable triIndices; +set count triIndices triCount; +set condition indexBuffer never; +reorder: + vertInfo + verts0 + 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 vertCount[0] + + vertCount[1] + + vertCount[2] + + 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; + +// Collmap +set count Collmap::geomList 1; + +// PhysGeomList +set count PhysGeomList::geoms count; + +// PhysGeomInfo +use PhysGeomInfo; +set reusable brush; +set count brush 1; + +// BrushWrapper +use BrushWrapper; +set count sides numsides; +set reusable verts; +set count verts numverts; +set reusable planes; +set count planes numsides; + +// cbrushside_t +use cbrushside_t; +set reusable plane; +set count plane 1; \ No newline at end of file diff --git a/src/ZoneCode/Game/T5/XAssets/clipMap_t.txt b/src/ZoneCode/Game/T5/XAssets/clipMap_t.txt index e69de29b..975851cf 100644 --- a/src/ZoneCode/Game/T5/XAssets/clipMap_t.txt +++ b/src/ZoneCode/Game/T5/XAssets/clipMap_t.txt @@ -0,0 +1,85 @@ +// ========================================= +// 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 nodes numNodes; +set count leafs numLeafs; +set count leafbrushes numLeafBrushes; +set count leafbrushNodes leafbrushNodesCount; +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 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; +set block ropes XFILE_BLOCK_RUNTIME; +set count ropes max_ropes; +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 +set reusable CollisionPartition::borders; + +// cbrush_t +use cbrush_t; +set reusable sides; +set reusable verts; + +// DynEntityDef +use DynEntityDef; +set reusable destroyPieces; +set scriptstring targetname; +set scriptstring target; + +// XModelPieces +use XModelPieces; +set string name; +set name name; +set count pieces numpieces; \ No newline at end of file diff --git a/src/ZoneCode/Game/T5/XAssets/ddlRoot_t.txt b/src/ZoneCode/Game/T5/XAssets/ddlRoot_t.txt index e69de29b..c28279f3 100644 --- a/src/ZoneCode/Game/T5/XAssets/ddlRoot_t.txt +++ b/src/ZoneCode/Game/T5/XAssets/ddlRoot_t.txt @@ -0,0 +1,28 @@ +// ========================================= +// ddlRoot_t +// ========================================= +use ddlRoot_t; +set block XFILE_BLOCK_TEMP; +set string name; +set name name; +set count ddlDef 1; + +// ddlDef_t +use ddlDef_t; +set count structList structCount; +set count enumList enumCount; +set count next 1; + +// ddlStructDef_t +use ddlStructDef_t; +set string name; +set count members memberCount; + +// ddlMemberDef_t +set string ddlMemberDef_t::name; + +// ddlEnumDef_t +use ddlEnumDef_t; +set string name; +set string members; +set count members memberCount; \ No newline at end of file diff --git a/src/ZoneCode/Game/T5/XAssets/menuDef_t.txt b/src/ZoneCode/Game/T5/XAssets/menuDef_t.txt index e69de29b..a331eff8 100644 --- a/src/ZoneCode/Game/T5/XAssets/menuDef_t.txt +++ b/src/ZoneCode/Game/T5/XAssets/menuDef_t.txt @@ -0,0 +1,127 @@ +// ========================================= +// menuDef_t +// ========================================= +use menuDef_t; +set block XFILE_BLOCK_TEMP; +set string window::name; +set name window::name; +set string font; +set string allowedBinding; +set string soundName; +set count items itemCount; + +// windowDef_t +use windowDef_t; +set string group; + +// GenericEventHandler +use GenericEventHandler; +set string name; + +// GenericEventScript +use GenericEventScript; +set string action; + +// ExpressionStatement +use ExpressionStatement; +set string filename; +set count rpn numRpn; +set reusable rpn; + +// expressionRpn +use expressionRpn; +set condition data::constant type == RPN_CONSTANT; +set condition data::cmd never; + +// 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 dvar; +set string dvarTest; +set string enableDvar; +set condition parent never; +set condition typeData::textDef +type == 1 || type == 3 || type == 4 +|| type == 5 || type == 7 || type == 8 +|| type == 9 || type == 10 || type == 11 +|| type == 12 || type == 13 || type == 14 +|| type == 15 || type == 16 || type == 18 +|| type == 20 || type == 22; +set condition typeData::imageDef type == 2; +set condition typeData::blankButtonDef type == 19 || type == 21; +set condition typeData::ownerDrawDef type == 6; +set condition typeData::data never; + +// textDef_s +use textDef_s; +set string text; +set condition textTypeData::focusItemDef itemDef_s::type == 3 +|| itemDef_s::type == 4 || itemDef_s::type == 5 +|| itemDef_s::type == 7 || itemDef_s::type == 8 +|| itemDef_s::type == 9 || itemDef_s::type == 10 +|| itemDef_s::type == 11 || itemDef_s::type == 12 +|| itemDef_s::type == 13 || itemDef_s::type == 14 +|| itemDef_s::type == 16 || itemDef_s::type == 20 +|| itemDef_s::type == 21 || itemDef_s::type == 22 +|| itemDef_s::type == 30; +set condition textTypeData::gameMsgDef itemDef_s::type == 15; +set condition textTypeData::data never; + +// focusItemDef_s +use focusItemDef_s; +set string mouseEnterText; +set string mouseExitText; +set string mouseEnter; +set string mouseExit; +set condition focusTypeData::listBox itemDef_s::type == 4; +set condition focusTypeData::multi itemDef_s::type == 10; +set condition focusTypeData::editField itemDef_s::type == 5 +|| itemDef_s::type == 7 +|| itemDef_s::type == 8 +|| itemDef_s::type == 9 +|| itemDef_s::type == 12 +|| itemDef_s::type == 13 +|| itemDef_s::type == 14 +|| itemDef_s::type == 16 +|| itemDef_s::type == 22 +|| itemDef_s::type == 30; +set condition focusTypeData::enumDvar itemDef_s::type == 11; +set condition focusTypeData::data never; + +// listBoxDef_s +use listBoxDef_s; +set count rows maxRows; + +// MenuRow +use MenuRow; +set count cells listBoxDef_s::numColumns; +set count eventName 32; +set count onFocusEventName 32; + +// MenuCell +use MenuCell; +set count stringValue maxChars; + +// multiDef_s +use multiDef_s; +set string dvarList; +set string dvarStr; + +// enumDvarDef_s +set string enumDvarDef_s::enumDvarName; + +// UIAnimInfo +use UIAnimInfo; +set count animStates animStateCount; +set condition currentAnimState never; +set condition nextAnimState never; + +// animParamsDef_t +use animParamsDef_t; +set string name; \ No newline at end of file diff --git a/src/ZoneCode/Game/T6/XAssets/WeaponVariantDef.txt b/src/ZoneCode/Game/T6/XAssets/WeaponVariantDef.txt index a4567854..4778378c 100644 --- a/src/ZoneCode/Game/T6/XAssets/WeaponVariantDef.txt +++ b/src/ZoneCode/Game/T6/XAssets/WeaponVariantDef.txt @@ -14,7 +14,7 @@ set reusable attachments; set count attachmentUniques 95; set reusable attachmentUniques; set string szXAnims; -set count szXAnims 88; +set count szXAnims NUM_WEAP_ANIMS; set reusable szXAnims; set scriptstring hideTags; set count hideTags 32; @@ -119,7 +119,7 @@ set string adsZoomSound; set string shellCasing; set string shellCasingPlayer; set string bounceSound; -set count bounceSound 32; +set count bounceSound SURF_TYPE_NUM; set reusable bounceSound; set string standMountedWeapdef; set string crouchMountedWeapdef; @@ -141,9 +141,9 @@ set string projExplosionSound; set string projDudSound; set string mortarShellSound; set string tankShellSound; -set count parallelBounce 32; +set count parallelBounce SURF_TYPE_NUM; set reusable parallelBounce; -set count perpendicularBounce 32; +set count perpendicularBounce SURF_TYPE_NUM; set reusable perpendicularBounce; set string projIgnitionSound; set string accuracyGraphName0; @@ -159,7 +159,7 @@ set count originalAccuracyGraphKnots1 accuracyGraphKnotCount[1]; set string szUseHintString; set string dropHintString; set string szScript; -set count locationDamageMultipliers 21; +set count locationDamageMultipliers HITLOC_NUM; set reusable locationDamageMultipliers; set string fireRumble; set string meleeImpactRumble; diff --git a/src/ZoneCommon/Game/T5/GameAssetPoolT5.cpp b/src/ZoneCommon/Game/T5/GameAssetPoolT5.cpp index e69de29b..764c3730 100644 --- a/src/ZoneCommon/Game/T5/GameAssetPoolT5.cpp +++ b/src/ZoneCommon/Game/T5/GameAssetPoolT5.cpp @@ -0,0 +1,379 @@ +#include "GameAssetPoolT5.h" + +#include +#include + +#include "Pool/AssetPoolStatic.h" +#include "Pool/AssetPoolDynamic.h" + +using namespace T5; + +const char* GameAssetPoolT5::ASSET_TYPE_NAMES[] +{ + "xmodelpieces", + "physpreset", + "physconstraints", + "destructibledef", + "xanim", + "xmodel", + "material", + "techniqueset", + "image", + "soundbank", + "soundpatch", + "clipmap", + "clipmap", + "comworld", + "gameworldsp", + "gameworldmp", + "mapents", + "gfxworld", + "gfxlightdef", + "uimap", + "font", + "menulist", + "menu", + "localize", + "weapon", + "weapondef", + "weaponvariant", + "snddriverglobals", + "fx", + "fximpacttable", + "aitype", + "mptype", + "mpbody", + "mphead", + "character", + "xmodelalias", + "rawfile", + "stringtable", + "packindex", + "xglobals", + "ddl", + "glasses", + "emblemset" +}; + +GameAssetPoolT5::GameAssetPoolT5(Zone* zone, const int priority) + : ZoneAssetPools(zone), + m_priority(priority) +{ + assert(std::extent::value == ASSET_TYPE_COUNT); + + m_phys_preset = nullptr; + m_phys_constraints = nullptr; + m_destructible_def = nullptr; + m_xanim_parts = nullptr; + m_xmodel = nullptr; + m_material = nullptr; + m_technique_set = nullptr; + m_image = nullptr; + m_sound_bank = nullptr; + m_sound_patch = nullptr; + m_clip_map = nullptr; + m_com_world = nullptr; + m_game_world_sp = nullptr; + m_game_world_mp = nullptr; + m_map_ents = nullptr; + m_gfx_world = nullptr; + m_gfx_light_def = nullptr; + m_font = nullptr; + m_menu_list = nullptr; + m_menu_def = nullptr; + m_localize = nullptr; + m_weapon = nullptr; + m_snd_driver_globals = nullptr; + m_fx = nullptr; + m_fx_impact_table = nullptr; + m_raw_file = nullptr; + m_string_table = nullptr; + m_pack_index = nullptr; + m_xglobals = nullptr; + m_ddl = nullptr; + m_glasses = nullptr; + m_emblem_set = nullptr; +} + +GameAssetPoolT5::~GameAssetPoolT5() +{ +#define DELETE_POOL(poolName) \ + delete (poolName); (poolName) = nullptr; + + DELETE_POOL(m_phys_preset); + DELETE_POOL(m_phys_constraints); + DELETE_POOL(m_destructible_def); + DELETE_POOL(m_xanim_parts); + DELETE_POOL(m_xmodel); + DELETE_POOL(m_material); + DELETE_POOL(m_technique_set); + DELETE_POOL(m_image); + DELETE_POOL(m_sound_bank); + DELETE_POOL(m_sound_patch); + DELETE_POOL(m_clip_map); + DELETE_POOL(m_com_world); + DELETE_POOL(m_game_world_sp); + DELETE_POOL(m_game_world_mp); + DELETE_POOL(m_map_ents); + DELETE_POOL(m_gfx_world); + DELETE_POOL(m_gfx_light_def); + DELETE_POOL(m_font); + DELETE_POOL(m_menu_list); + DELETE_POOL(m_menu_def); + DELETE_POOL(m_localize); + DELETE_POOL(m_weapon); + DELETE_POOL(m_snd_driver_globals); + DELETE_POOL(m_fx); + DELETE_POOL(m_fx_impact_table); + DELETE_POOL(m_raw_file); + DELETE_POOL(m_string_table); + DELETE_POOL(m_pack_index); + DELETE_POOL(m_xglobals); + DELETE_POOL(m_ddl); + DELETE_POOL(m_glasses); + DELETE_POOL(m_emblem_set); + +#undef DELETE_POOL +} + +void GameAssetPoolT5::InitPoolStatic(const asset_type_t type, const size_t capacity) +{ +#define CASE_INIT_POOL_STATIC(assetType, poolName, poolType) \ + case assetType: \ + { \ + if((poolName) == nullptr && capacity > 0) \ + { \ + (poolName) = new AssetPoolStatic(capacity, m_priority, (assetType)); \ + } \ + break; \ + } + + switch (type) + { + CASE_INIT_POOL_STATIC(ASSET_TYPE_PHYSPRESET, m_phys_preset, PhysPreset); + CASE_INIT_POOL_STATIC(ASSET_TYPE_PHYSCONSTRAINTS, m_phys_constraints, PhysConstraints); + CASE_INIT_POOL_STATIC(ASSET_TYPE_DESTRUCTIBLEDEF, m_destructible_def, DestructibleDef); + CASE_INIT_POOL_STATIC(ASSET_TYPE_XANIMPARTS, m_xanim_parts, XAnimParts); + CASE_INIT_POOL_STATIC(ASSET_TYPE_XMODEL, m_xmodel, XModel); + CASE_INIT_POOL_STATIC(ASSET_TYPE_MATERIAL, m_material, Material); + CASE_INIT_POOL_STATIC(ASSET_TYPE_TECHNIQUE_SET, m_technique_set, MaterialTechniqueSet); + CASE_INIT_POOL_STATIC(ASSET_TYPE_IMAGE, m_image, GfxImage); + CASE_INIT_POOL_STATIC(ASSET_TYPE_SOUND, m_sound_bank, SndBank); + CASE_INIT_POOL_STATIC(ASSET_TYPE_SOUND_PATCH, m_sound_patch, SndPatch); + CASE_INIT_POOL_STATIC(ASSET_TYPE_CLIPMAP, m_clip_map, clipMap_t); + CASE_INIT_POOL_STATIC(ASSET_TYPE_CLIPMAP_PVS, m_clip_map, clipMap_t); + CASE_INIT_POOL_STATIC(ASSET_TYPE_COMWORLD, m_com_world, ComWorld); + CASE_INIT_POOL_STATIC(ASSET_TYPE_GAMEWORLD_SP, m_game_world_sp, GameWorldSp); + CASE_INIT_POOL_STATIC(ASSET_TYPE_GAMEWORLD_MP, m_game_world_mp, GameWorldMp); + CASE_INIT_POOL_STATIC(ASSET_TYPE_MAP_ENTS, m_map_ents, MapEnts); + CASE_INIT_POOL_STATIC(ASSET_TYPE_GFXWORLD, m_gfx_world, GfxWorld); + CASE_INIT_POOL_STATIC(ASSET_TYPE_LIGHT_DEF, m_gfx_light_def, GfxLightDef); + CASE_INIT_POOL_STATIC(ASSET_TYPE_FONT, m_font, Font_s); + CASE_INIT_POOL_STATIC(ASSET_TYPE_MENULIST, m_menu_list, MenuList); + CASE_INIT_POOL_STATIC(ASSET_TYPE_MENU, m_menu_def, menuDef_t); + CASE_INIT_POOL_STATIC(ASSET_TYPE_LOCALIZE_ENTRY, m_localize, LocalizeEntry); + CASE_INIT_POOL_STATIC(ASSET_TYPE_WEAPON, m_weapon, WeaponVariantDef); + CASE_INIT_POOL_STATIC(ASSET_TYPE_SNDDRIVER_GLOBALS, m_snd_driver_globals, SndDriverGlobals); + CASE_INIT_POOL_STATIC(ASSET_TYPE_FX, m_fx, FxEffectDef); + CASE_INIT_POOL_STATIC(ASSET_TYPE_IMPACT_FX, m_fx_impact_table, FxImpactTable); + CASE_INIT_POOL_STATIC(ASSET_TYPE_RAWFILE, m_raw_file, RawFile); + CASE_INIT_POOL_STATIC(ASSET_TYPE_STRINGTABLE, m_string_table, StringTable); + CASE_INIT_POOL_STATIC(ASSET_TYPE_PACK_INDEX, m_pack_index, PackIndex); + CASE_INIT_POOL_STATIC(ASSET_TYPE_XGLOBALS, m_xglobals, XGlobals); + CASE_INIT_POOL_STATIC(ASSET_TYPE_DDL, m_ddl, ddlRoot_t); + CASE_INIT_POOL_STATIC(ASSET_TYPE_GLASSES, m_glasses, Glasses); + CASE_INIT_POOL_STATIC(ASSET_TYPE_EMBLEMSET, m_emblem_set, EmblemSet); + + default: + assert(type >= 0 && type < ASSET_TYPE_COUNT); + break; + } + +#undef CASE_INIT_POOL_STATIC +} + +void GameAssetPoolT5::InitPoolDynamic(const asset_type_t type) +{ +#define CASE_INIT_POOL_DYNAMIC(assetType, poolName, poolType) \ + case assetType: \ + { \ + if((poolName) == nullptr) \ + { \ + (poolName) = new AssetPoolDynamic(m_priority, (assetType)); \ + } \ + break; \ + } + + switch (type) + { + CASE_INIT_POOL_DYNAMIC(ASSET_TYPE_PHYSPRESET, m_phys_preset, PhysPreset); + CASE_INIT_POOL_DYNAMIC(ASSET_TYPE_PHYSCONSTRAINTS, m_phys_constraints, PhysConstraints); + CASE_INIT_POOL_DYNAMIC(ASSET_TYPE_DESTRUCTIBLEDEF, m_destructible_def, DestructibleDef); + CASE_INIT_POOL_DYNAMIC(ASSET_TYPE_XANIMPARTS, m_xanim_parts, XAnimParts); + CASE_INIT_POOL_DYNAMIC(ASSET_TYPE_XMODEL, m_xmodel, XModel); + CASE_INIT_POOL_DYNAMIC(ASSET_TYPE_MATERIAL, m_material, Material); + CASE_INIT_POOL_DYNAMIC(ASSET_TYPE_TECHNIQUE_SET, m_technique_set, MaterialTechniqueSet); + CASE_INIT_POOL_DYNAMIC(ASSET_TYPE_IMAGE, m_image, GfxImage); + CASE_INIT_POOL_DYNAMIC(ASSET_TYPE_SOUND, m_sound_bank, SndBank); + CASE_INIT_POOL_DYNAMIC(ASSET_TYPE_SOUND_PATCH, m_sound_patch, SndPatch); + CASE_INIT_POOL_DYNAMIC(ASSET_TYPE_CLIPMAP, m_clip_map, clipMap_t); + CASE_INIT_POOL_DYNAMIC(ASSET_TYPE_CLIPMAP_PVS, m_clip_map, clipMap_t); + CASE_INIT_POOL_DYNAMIC(ASSET_TYPE_COMWORLD, m_com_world, ComWorld); + CASE_INIT_POOL_DYNAMIC(ASSET_TYPE_GAMEWORLD_SP, m_game_world_sp, GameWorldSp); + CASE_INIT_POOL_DYNAMIC(ASSET_TYPE_GAMEWORLD_MP, m_game_world_mp, GameWorldMp); + CASE_INIT_POOL_DYNAMIC(ASSET_TYPE_MAP_ENTS, m_map_ents, MapEnts); + CASE_INIT_POOL_DYNAMIC(ASSET_TYPE_GFXWORLD, m_gfx_world, GfxWorld); + CASE_INIT_POOL_DYNAMIC(ASSET_TYPE_LIGHT_DEF, m_gfx_light_def, GfxLightDef); + CASE_INIT_POOL_DYNAMIC(ASSET_TYPE_FONT, m_font, Font_s); + CASE_INIT_POOL_DYNAMIC(ASSET_TYPE_MENULIST, m_menu_list, MenuList); + CASE_INIT_POOL_DYNAMIC(ASSET_TYPE_MENU, m_menu_def, menuDef_t); + CASE_INIT_POOL_DYNAMIC(ASSET_TYPE_LOCALIZE_ENTRY, m_localize, LocalizeEntry); + CASE_INIT_POOL_DYNAMIC(ASSET_TYPE_WEAPON, m_weapon, WeaponVariantDef); + CASE_INIT_POOL_DYNAMIC(ASSET_TYPE_SNDDRIVER_GLOBALS, m_snd_driver_globals, SndDriverGlobals); + CASE_INIT_POOL_DYNAMIC(ASSET_TYPE_FX, m_fx, FxEffectDef); + CASE_INIT_POOL_DYNAMIC(ASSET_TYPE_IMPACT_FX, m_fx_impact_table, FxImpactTable); + CASE_INIT_POOL_DYNAMIC(ASSET_TYPE_RAWFILE, m_raw_file, RawFile); + CASE_INIT_POOL_DYNAMIC(ASSET_TYPE_STRINGTABLE, m_string_table, StringTable); + CASE_INIT_POOL_DYNAMIC(ASSET_TYPE_PACK_INDEX, m_pack_index, PackIndex); + CASE_INIT_POOL_DYNAMIC(ASSET_TYPE_XGLOBALS, m_xglobals, XGlobals); + CASE_INIT_POOL_DYNAMIC(ASSET_TYPE_DDL, m_ddl, ddlRoot_t); + CASE_INIT_POOL_DYNAMIC(ASSET_TYPE_GLASSES, m_glasses, Glasses); + CASE_INIT_POOL_DYNAMIC(ASSET_TYPE_EMBLEMSET, m_emblem_set, EmblemSet); + + default: + assert(type >= 0 && type < ASSET_TYPE_COUNT); + break; + } + +#undef CASE_INIT_POOL_STATIC +} + +XAssetInfoGeneric* GameAssetPoolT5::AddAssetToPool(asset_type_t type, std::string name, void* asset, std::vector dependencies, std::vector usedScriptStrings, + Zone* zone) +{ + XAsset xAsset{}; + + xAsset.type = static_cast(type); + xAsset.header.data = asset; + +#define CASE_ADD_TO_POOL(assetType, poolName, headerName) \ + case assetType: \ + { \ + assert((poolName) != nullptr); \ + return (poolName)->AddAsset(std::move(name), xAsset.header.headerName, zone, std::move(dependencies), std::move(usedScriptStrings)); \ + } + + switch (xAsset.type) + { + CASE_ADD_TO_POOL(ASSET_TYPE_PHYSPRESET, m_phys_preset, physPreset); + CASE_ADD_TO_POOL(ASSET_TYPE_PHYSCONSTRAINTS, m_phys_constraints, physConstraints); + CASE_ADD_TO_POOL(ASSET_TYPE_DESTRUCTIBLEDEF, m_destructible_def, destructibleDef); + CASE_ADD_TO_POOL(ASSET_TYPE_XANIMPARTS, m_xanim_parts, parts); + CASE_ADD_TO_POOL(ASSET_TYPE_XMODEL, m_xmodel, model); + CASE_ADD_TO_POOL(ASSET_TYPE_MATERIAL, m_material, material); + CASE_ADD_TO_POOL(ASSET_TYPE_TECHNIQUE_SET, m_technique_set, techniqueSet); + CASE_ADD_TO_POOL(ASSET_TYPE_IMAGE, m_image, image); + CASE_ADD_TO_POOL(ASSET_TYPE_SOUND, m_sound_bank, sound); + CASE_ADD_TO_POOL(ASSET_TYPE_SOUND_PATCH, m_sound_patch, soundPatch); + CASE_ADD_TO_POOL(ASSET_TYPE_CLIPMAP, m_clip_map, clipMap); + CASE_ADD_TO_POOL(ASSET_TYPE_CLIPMAP_PVS, m_clip_map, clipMap); + CASE_ADD_TO_POOL(ASSET_TYPE_COMWORLD, m_com_world, comWorld); + CASE_ADD_TO_POOL(ASSET_TYPE_GAMEWORLD_SP, m_game_world_sp, gameWorldSp); + CASE_ADD_TO_POOL(ASSET_TYPE_GAMEWORLD_MP, m_game_world_mp, gameWorldMp); + CASE_ADD_TO_POOL(ASSET_TYPE_MAP_ENTS, m_map_ents, mapEnts); + CASE_ADD_TO_POOL(ASSET_TYPE_GFXWORLD, m_gfx_world, gfxWorld); + CASE_ADD_TO_POOL(ASSET_TYPE_LIGHT_DEF, m_gfx_light_def, lightDef); + CASE_ADD_TO_POOL(ASSET_TYPE_FONT, m_font, font); + CASE_ADD_TO_POOL(ASSET_TYPE_MENULIST, m_menu_list, menuList); + CASE_ADD_TO_POOL(ASSET_TYPE_MENU, m_menu_def, menu); + CASE_ADD_TO_POOL(ASSET_TYPE_LOCALIZE_ENTRY, m_localize, localize); + CASE_ADD_TO_POOL(ASSET_TYPE_WEAPON, m_weapon, weapon); + CASE_ADD_TO_POOL(ASSET_TYPE_SNDDRIVER_GLOBALS, m_snd_driver_globals, sndDriverGlobals); + CASE_ADD_TO_POOL(ASSET_TYPE_FX, m_fx, fx); + CASE_ADD_TO_POOL(ASSET_TYPE_IMPACT_FX, m_fx_impact_table, impactFx); + CASE_ADD_TO_POOL(ASSET_TYPE_RAWFILE, m_raw_file, rawfile); + CASE_ADD_TO_POOL(ASSET_TYPE_STRINGTABLE, m_string_table, stringTable); + CASE_ADD_TO_POOL(ASSET_TYPE_PACK_INDEX, m_pack_index, packIndex); + CASE_ADD_TO_POOL(ASSET_TYPE_XGLOBALS, m_xglobals, xGlobals); + CASE_ADD_TO_POOL(ASSET_TYPE_DDL, m_ddl, ddlRoot); + CASE_ADD_TO_POOL(ASSET_TYPE_GLASSES, m_glasses, glasses); + CASE_ADD_TO_POOL(ASSET_TYPE_EMBLEMSET, m_emblem_set, emblemSet); + + default: + assert(false); + break; + } + + return nullptr; + +#undef CASE_ADD_TO_POOL +} + +XAssetInfoGeneric* GameAssetPoolT5::GetAsset(const asset_type_t type, std::string name) const +{ +#define CASE_GET_ASSET(assetType, poolName) \ + case assetType: \ + { \ + if((poolName) != nullptr) \ + return (poolName)->GetAsset(std::move(name)); \ + break; \ + } + + switch (type) + { + CASE_GET_ASSET(ASSET_TYPE_PHYSPRESET, m_phys_preset); + CASE_GET_ASSET(ASSET_TYPE_PHYSCONSTRAINTS, m_phys_constraints); + CASE_GET_ASSET(ASSET_TYPE_DESTRUCTIBLEDEF, m_destructible_def); + CASE_GET_ASSET(ASSET_TYPE_XANIMPARTS, m_xanim_parts); + CASE_GET_ASSET(ASSET_TYPE_XMODEL, m_xmodel); + CASE_GET_ASSET(ASSET_TYPE_MATERIAL, m_material); + CASE_GET_ASSET(ASSET_TYPE_TECHNIQUE_SET, m_technique_set); + CASE_GET_ASSET(ASSET_TYPE_IMAGE, m_image); + CASE_GET_ASSET(ASSET_TYPE_SOUND, m_sound_bank); + CASE_GET_ASSET(ASSET_TYPE_SOUND_PATCH, m_sound_patch); + CASE_GET_ASSET(ASSET_TYPE_CLIPMAP, m_clip_map); + CASE_GET_ASSET(ASSET_TYPE_CLIPMAP_PVS, m_clip_map); + CASE_GET_ASSET(ASSET_TYPE_COMWORLD, m_com_world); + CASE_GET_ASSET(ASSET_TYPE_GAMEWORLD_SP, m_game_world_sp); + CASE_GET_ASSET(ASSET_TYPE_GAMEWORLD_MP, m_game_world_mp); + CASE_GET_ASSET(ASSET_TYPE_MAP_ENTS, m_map_ents); + CASE_GET_ASSET(ASSET_TYPE_GFXWORLD, m_gfx_world); + CASE_GET_ASSET(ASSET_TYPE_LIGHT_DEF, m_gfx_light_def); + CASE_GET_ASSET(ASSET_TYPE_FONT, m_font); + CASE_GET_ASSET(ASSET_TYPE_MENULIST, m_menu_list); + CASE_GET_ASSET(ASSET_TYPE_MENU, m_menu_def); + CASE_GET_ASSET(ASSET_TYPE_LOCALIZE_ENTRY, m_localize); + CASE_GET_ASSET(ASSET_TYPE_WEAPON, m_weapon); + CASE_GET_ASSET(ASSET_TYPE_SNDDRIVER_GLOBALS, m_snd_driver_globals); + CASE_GET_ASSET(ASSET_TYPE_FX, m_fx); + CASE_GET_ASSET(ASSET_TYPE_IMPACT_FX, m_fx_impact_table); + CASE_GET_ASSET(ASSET_TYPE_RAWFILE, m_raw_file); + CASE_GET_ASSET(ASSET_TYPE_STRINGTABLE, m_string_table); + CASE_GET_ASSET(ASSET_TYPE_PACK_INDEX, m_pack_index); + CASE_GET_ASSET(ASSET_TYPE_XGLOBALS, m_xglobals); + CASE_GET_ASSET(ASSET_TYPE_DDL, m_ddl); + CASE_GET_ASSET(ASSET_TYPE_GLASSES, m_glasses); + CASE_GET_ASSET(ASSET_TYPE_EMBLEMSET, m_emblem_set); + + default: + assert(false); + break; + } + + return nullptr; + +#undef CASE_GET_ASSET +} + +const char* GameAssetPoolT5::AssetTypeNameByType(asset_type_t assetType) +{ + if (assetType >= 0 && assetType < static_cast(std::extent::value)) + return ASSET_TYPE_NAMES[assetType]; + + return ASSET_TYPE_INVALID; +} + +const char* GameAssetPoolT5::GetAssetTypeName(const asset_type_t assetType) const +{ + return AssetTypeNameByType(assetType); +} diff --git a/src/ZoneCommon/Game/T5/GameAssetPoolT5.h b/src/ZoneCommon/Game/T5/GameAssetPoolT5.h index e69de29b..1180213e 100644 --- a/src/ZoneCommon/Game/T5/GameAssetPoolT5.h +++ b/src/ZoneCommon/Game/T5/GameAssetPoolT5.h @@ -0,0 +1,60 @@ +#pragma once + +#include "Pool/ZoneAssetPools.h" +#include "Pool/AssetPool.h" +#include "Game/T5/T5.h" + +class GameAssetPoolT5 final : public ZoneAssetPools +{ + int m_priority; + + static constexpr const char* ASSET_TYPE_INVALID = "invalid_asset_type"; + static const char* ASSET_TYPE_NAMES[]; + +protected: + XAssetInfoGeneric* AddAssetToPool(asset_type_t type, std::string name, void* asset, std::vector dependencies, std::vector usedScriptStrings, Zone* zone) override; + +public: + AssetPool* m_phys_preset; + AssetPool* m_phys_constraints; + AssetPool* m_destructible_def; + AssetPool* m_xanim_parts; + AssetPool* m_xmodel; + AssetPool* m_material; + AssetPool* m_technique_set; + AssetPool* m_image; + AssetPool* m_sound_bank; + AssetPool* m_sound_patch; + AssetPool* m_clip_map; + AssetPool* m_com_world; + AssetPool* m_game_world_sp; + AssetPool* m_game_world_mp; + AssetPool* m_map_ents; + AssetPool* m_gfx_world; + AssetPool* m_gfx_light_def; + AssetPool* m_font; + AssetPool* m_menu_list; + AssetPool* m_menu_def; + AssetPool* m_localize; + AssetPool* m_weapon; + AssetPool* m_snd_driver_globals; + AssetPool* m_fx; + AssetPool* m_fx_impact_table; + AssetPool* m_raw_file; + AssetPool* m_string_table; + AssetPool* m_pack_index; + AssetPool* m_xglobals; + AssetPool* m_ddl; + AssetPool* m_glasses; + AssetPool* m_emblem_set; + + GameAssetPoolT5(Zone* zone, int priority); + ~GameAssetPoolT5() override; + + void InitPoolStatic(asset_type_t type, size_t capacity) override; + void InitPoolDynamic(asset_type_t type) override; + + XAssetInfoGeneric* GetAsset(asset_type_t type, std::string name) const override; + static const char* AssetTypeNameByType(asset_type_t assetType); + const char* GetAssetTypeName(asset_type_t assetType) const override; +}; diff --git a/src/ZoneLoading/Game/T5/XAssets/gfximage/gfximage_actions.cpp b/src/ZoneLoading/Game/T5/XAssets/gfximage/gfximage_actions.cpp index e69de29b..1185ee45 100644 --- a/src/ZoneLoading/Game/T5/XAssets/gfximage/gfximage_actions.cpp +++ b/src/ZoneLoading/Game/T5/XAssets/gfximage/gfximage_actions.cpp @@ -0,0 +1,24 @@ +#include "gfximage_actions.h" + +#include +#include + +using namespace T5; + +Actions_GfxImage::Actions_GfxImage(Zone* zone) + : AssetLoadingActions(zone) +{ +} + +void Actions_GfxImage::OnImageLoaded(GfxImage* image) const +{ + image->loadedSize = 0; +} + +void Actions_GfxImage::LoadImageData(GfxImageLoadDef* loadDef, GfxImage* image) const +{ + const size_t loadDefSize = offsetof(GfxImageLoadDef, data) + loadDef->resourceSize; + + image->texture.loadDef = static_cast(m_zone->GetMemory()->Alloc(loadDefSize)); + memcpy(image->texture.loadDef, loadDef, loadDefSize); +} diff --git a/src/ZoneLoading/Game/T5/XAssets/gfximage/gfximage_actions.h b/src/ZoneLoading/Game/T5/XAssets/gfximage/gfximage_actions.h index e69de29b..e5f252b9 100644 --- a/src/ZoneLoading/Game/T5/XAssets/gfximage/gfximage_actions.h +++ b/src/ZoneLoading/Game/T5/XAssets/gfximage/gfximage_actions.h @@ -0,0 +1,16 @@ +#pragma once + +#include "Loading/AssetLoadingActions.h" +#include "Game/T5/T5.h" + +namespace T5 +{ + class Actions_GfxImage final : public AssetLoadingActions + { + public: + explicit Actions_GfxImage(Zone* zone); + + void OnImageLoaded(GfxImage* image) const; + void LoadImageData(GfxImageLoadDef* loadDef, GfxImage* image) const; + }; +}