diff --git a/src/ZoneCode/Game/T6/T6_Commands.txt b/src/ZoneCode/Game/T6/T6_Commands.txt index 9975678c..2d5e6318 100644 --- a/src/ZoneCode/Game/T6/T6_Commands.txt +++ b/src/ZoneCode/Game/T6/T6_Commands.txt @@ -661,6 +661,7 @@ set count smodelIndexes smodelIndexCount; // GfxPortal use GfxPortal; +set condition writable never; set reusable cell; set count vertices vertexCount; @@ -722,6 +723,19 @@ set count tris numTris; use SSkinAnim; set count data 4 * width * frames; +// 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_VIRTUAL; @@ -757,18 +771,23 @@ reorder: smodelDrawInsts surfaceMaterials; +// GfxStaticModelLmapVertexInfo +use GfxStaticModelLmapVertexInfo; +set count lmapVertexColors numLmapVertexColors; +set condition lmapVertexColorsVB never; + // GfxWorldDpvsDynamic use GfxWorldDpvsDynamic; set block dynEntCellBits XFILE_BLOCK_RUNTIME_VIRTUAL; set count dynEntCellBits[0] dynEntClientWordCount[0] * GfxWorld::dpvsPlanes::cellCount; set count dynEntCellBits[1] dynEntClientWordCount[1] * GfxWorld::dpvsPlanes::cellCount; set block dynEntVisData XFILE_BLOCK_RUNTIME_VIRTUAL; -set count dynEntVisData[0][0] dynEntClientWordCount[0]; -set count dynEntVisData[1][0] dynEntClientWordCount[1]; -set count dynEntVisData[0][1] dynEntClientWordCount[0]; -set count dynEntVisData[1][1] dynEntClientWordCount[1]; -set count dynEntVisData[0][2] dynEntClientWordCount[0]; -set count dynEntVisData[1][2] dynEntClientWordCount[1]; +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; diff --git a/src/ZoneCommon/Game/T6/T6_Assets.h b/src/ZoneCommon/Game/T6/T6_Assets.h index 1a2d24bd..718a9c28 100644 --- a/src/ZoneCommon/Game/T6/T6_Assets.h +++ b/src/ZoneCommon/Game/T6/T6_Assets.h @@ -1122,6 +1122,7 @@ namespace T6 }; typedef __declspec(align(4)) char aligned_byte_pointer; + typedef __declspec(align(4)) GfxCompressedLightGridCoeffs GfxCompressedLightGridCoeffs_align4; struct GfxLightGrid { @@ -1139,7 +1140,7 @@ namespace T6 unsigned int colorCount; GfxCompressedLightGridColors* colors; unsigned int coeffCount; - GfxCompressedLightGridCoeffs* coeffs; + GfxCompressedLightGridCoeffs_align4* coeffs; unsigned int skyGridVolumeCount; GfxSkyGridVolume* skyGridVolumes; }; @@ -1171,6 +1172,7 @@ namespace T6 vec3_t sunFxPosition; }; + typedef __declspec(align(4)) GfxDrawSurf GfxDrawSurf_align4; struct GfxWorldDpvsStatic @@ -1195,7 +1197,7 @@ namespace T6 GfxStaticModelInst* smodelInsts; GfxSurface* surfaces; GfxStaticModelDrawInst* smodelDrawInsts; - GfxDrawSurf* surfaceMaterials; + GfxDrawSurf_align4* surfaceMaterials; raw_byte128* surfaceCastsSunShadow; raw_byte128* surfaceCastsShadow; raw_byte128* smodelCastsShadow; @@ -3463,7 +3465,7 @@ namespace T6 };*/ - struct GfxLightGridEntry + struct __declspec(align(4)) GfxLightGridEntry { unsigned __int16 colorsIndex; char primaryLightIndex; @@ -3471,7 +3473,7 @@ namespace T6 }; - struct GfxCompressedLightGridColors + struct __declspec(align(4)) GfxCompressedLightGridColors { char rgb[56][3]; }; @@ -3547,7 +3549,7 @@ namespace T6 }; - struct GfxSceneDynBrush + struct __declspec(align(4)) GfxSceneDynBrush { BModelDrawInfo info; unsigned __int16 dynEntId; @@ -5545,7 +5547,7 @@ namespace T6 { char_align128* pixelShaderAlign; char_align4* pixelShader; - char_align128* vertexShader; + char_align4* vertexShader; int pixelShaderSize; int vertexShaderSize; }; @@ -5585,7 +5587,7 @@ namespace T6 half w; }; - unsigned __int64 v; + // unsigned __int64 v; }; @@ -5601,7 +5603,7 @@ namespace T6 }; - struct SSkinVert + struct __declspec(align(4)) SSkinVert { half4 pos_bone; PackedUnitVec normal; diff --git a/src/ZoneLoading/Game/T6/ContentLoaderT6.cpp b/src/ZoneLoading/Game/T6/ContentLoaderT6.cpp index 97bd1ae2..01682bf1 100644 --- a/src/ZoneLoading/Game/T6/ContentLoaderT6.cpp +++ b/src/ZoneLoading/Game/T6/ContentLoaderT6.cpp @@ -128,7 +128,7 @@ void ContentLoaderT6::LoadXAsset(const bool atStreamStart) LOAD_ASSET(ASSET_TYPE_GAMEWORLD_SP, GameWorldSp, gameWorldSp); LOAD_ASSET(ASSET_TYPE_GAMEWORLD_MP, GameWorldMp, gameWorldMp); LOAD_ASSET(ASSET_TYPE_MAP_ENTS, MapEnts, mapEnts); - // LOAD_ASSET(ASSET_TYPE_GFXWORLD, GfxWorld, gfxWorld); + LOAD_ASSET(ASSET_TYPE_GFXWORLD, GfxWorld, gfxWorld); LOAD_ASSET(ASSET_TYPE_LIGHT_DEF, GfxLightDef, lightDef); LOAD_ASSET(ASSET_TYPE_FONT, Font_s, font); LOAD_ASSET(ASSET_TYPE_FONTICON, FontIcon, fontIcon);