mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-04-20 16:15:43 +00:00
ZoneCode: Add commands for GfxWorld
This commit is contained in:
parent
971d198f59
commit
94369e3ecf
@ -599,6 +599,180 @@ set reusable slabs;
|
|||||||
use GfxWorld;
|
use GfxWorld;
|
||||||
set string name;
|
set string name;
|
||||||
set name name;
|
set name name;
|
||||||
|
set string baseName;
|
||||||
|
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 worldFogVolumes worldFogVolumeCount;
|
||||||
|
set count worldFogVolumePlanes worldFogVolumePlaneCount;
|
||||||
|
set count worldFogModifierVolumes worldFogModifierVolumeCount;
|
||||||
|
set count worldFogModifierVolumePlanes worldFogModifierVolumePlaneCount;
|
||||||
|
set count lutVolumes lutVolumeCount;
|
||||||
|
set count lutVolumePlanes lutVolumePlaneCount;
|
||||||
|
set count cells dpvsPlanes::cellCount;
|
||||||
|
set count models modelCount;
|
||||||
|
set count materialMemory materialMemoryCount;
|
||||||
|
set block cellCasterBits XFILE_BLOCK_RUNTIME_VIRTUAL;
|
||||||
|
set count cellCasterBits dpvsPlanes::cellCount * ((dpvsPlanes::cellCount + 31) / 32);
|
||||||
|
set block sceneDynModel XFILE_BLOCK_RUNTIME_VIRTUAL;
|
||||||
|
set count sceneDynModel dpvsDyn::dynEntClientCount[0];
|
||||||
|
set block sceneDynBrush XFILE_BLOCK_RUNTIME_VIRTUAL;
|
||||||
|
set count sceneDynBrush dpvsDyn::dynEntClientCount[1];
|
||||||
|
set block primaryLightEntityShadowVis XFILE_BLOCK_RUNTIME_VIRTUAL;
|
||||||
|
set count primaryLightEntityShadowVis (primaryLightCount - sunPrimaryLightIndex - 1) * 0x2000;
|
||||||
|
set block primaryLightDynEntShadowVis XFILE_BLOCK_RUNTIME_VIRTUAL;
|
||||||
|
set count primaryLightDynEntShadowVis[0] dpvsDyn::dynEntClientCount[0] * (primaryLightCount - sunPrimaryLightIndex - 1);
|
||||||
|
set count primaryLightDynEntShadowVis[1] dpvsDyn::dynEntClientCount[1] * (primaryLightCount - sunPrimaryLightIndex - 1);
|
||||||
|
set count siegeSkinInsts numSiegeSkinInsts;
|
||||||
|
set count shadowGeom primaryLightCount;
|
||||||
|
set count lightRegion primaryLightCount;
|
||||||
|
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_VIRTUAL;
|
||||||
|
set count sceneEntCellBits cellCount * 0x200;
|
||||||
|
|
||||||
|
// GfxCell
|
||||||
|
use GfxCell;
|
||||||
|
set count aabbTree aabbTreeCount;
|
||||||
|
set count portals portalCount;
|
||||||
|
set count reflectionProbes reflectionProbeCount;
|
||||||
|
|
||||||
|
// GfxAabbTree
|
||||||
|
use GfxAabbTree;
|
||||||
|
set reusable smodelIndexes;
|
||||||
|
set count smodelIndexes smodelIndexCount;
|
||||||
|
|
||||||
|
// GfxPortal
|
||||||
|
use GfxPortal;
|
||||||
|
set reusable cell;
|
||||||
|
set count vertices vertexCount;
|
||||||
|
|
||||||
|
// GfxWorldDraw
|
||||||
|
use GfxWorldDraw;
|
||||||
|
set count reflectionProbes reflectionProbeCount;
|
||||||
|
set block reflectionProbeTextures XFILE_BLOCK_RUNTIME_VIRTUAL;
|
||||||
|
set count reflectionProbeTextures reflectionProbeCount;
|
||||||
|
set count lightmaps lightmapCount;
|
||||||
|
set block lightmapPrimaryTextures XFILE_BLOCK_RUNTIME_VIRTUAL;
|
||||||
|
set count lightmapPrimaryTextures lightmapCount;
|
||||||
|
set block lightmapSecondaryTextures XFILE_BLOCK_RUNTIME_VIRTUAL;
|
||||||
|
set count lightmapSecondaryTextures lightmapCount;
|
||||||
|
set count indices indexCount;
|
||||||
|
set condition indexBuffer never;
|
||||||
|
|
||||||
|
// GfxReflectionProbe
|
||||||
|
use GfxReflectionProbe;
|
||||||
|
set count probeVolumes probeVolumeCount;
|
||||||
|
|
||||||
|
// GfxWorldVertexData0
|
||||||
|
use GfxWorldVertexData0;
|
||||||
|
set count data GfxWorldDraw::vertexDataSize0;
|
||||||
|
set condition vb never;
|
||||||
|
|
||||||
|
// GfxWorldVertexData1
|
||||||
|
use GfxWorldVertexData1;
|
||||||
|
set count data GfxWorldDraw::vertexDataSize1;
|
||||||
|
set condition vb never;
|
||||||
|
|
||||||
|
// GfxLightGrid
|
||||||
|
use GfxLightGrid;
|
||||||
|
set count rowDataStart maxs[rowAxis] - mins[rowAxis] + 1;
|
||||||
|
set count rawRowData rawRowDataSize;
|
||||||
|
set count entries entryCount;
|
||||||
|
set count colors colorCount;
|
||||||
|
set count coeffs coeffCount;
|
||||||
|
set count skyGridVolumes skyGridVolumeCount;
|
||||||
|
|
||||||
|
// SSkinInstance
|
||||||
|
use SSkinInstance;
|
||||||
|
set reusable shaders;
|
||||||
|
set reusable model;
|
||||||
|
set reusable anim;
|
||||||
|
set count instVerts model::numVerts;
|
||||||
|
|
||||||
|
// SSkinShaders
|
||||||
|
use SSkinShaders;
|
||||||
|
set count pixelShaderAlign pixelShaderSize;
|
||||||
|
set count pixelShader pixelShaderSize;
|
||||||
|
set count vertexShader vertexShaderSize;
|
||||||
|
|
||||||
|
// SSkinModel
|
||||||
|
use SSkinModel;
|
||||||
|
set count verts numVerts;
|
||||||
|
set count tris numTris;
|
||||||
|
|
||||||
|
// SSkinAnim
|
||||||
|
use SSkinAnim;
|
||||||
|
set count data 4 * width * frames;
|
||||||
|
|
||||||
|
// GfxWorldDpvsStatic
|
||||||
|
use GfxWorldDpvsStatic;
|
||||||
|
set block smodelVisData XFILE_BLOCK_RUNTIME_VIRTUAL;
|
||||||
|
set count smodelVisData smodelVisDataCount;
|
||||||
|
set block surfaceVisData XFILE_BLOCK_RUNTIME_VIRTUAL;
|
||||||
|
set count surfaceVisData surfaceVisDataCount;
|
||||||
|
set block smodelVisDataCameraSaved XFILE_BLOCK_RUNTIME_VIRTUAL;
|
||||||
|
set count smodelVisDataCameraSaved smodelVisDataCount;
|
||||||
|
set block surfaceVisDataCameraSaved XFILE_BLOCK_RUNTIME_VIRTUAL;
|
||||||
|
set count surfaceVisDataCameraSaved surfaceVisDataCount;
|
||||||
|
set block surfaceCastsSunShadow XFILE_BLOCK_RUNTIME_VIRTUAL;
|
||||||
|
set count surfaceCastsSunShadow surfaceVisDataCount;
|
||||||
|
set block surfaceCastsShadow XFILE_BLOCK_RUNTIME_VIRTUAL;
|
||||||
|
set count surfaceCastsShadow surfaceVisDataCount;
|
||||||
|
set count smodelCastsShadow smodelVisDataCount;
|
||||||
|
set count sortedSurfIndex staticSurfaceCount;
|
||||||
|
set count smodelInsts smodelCount;
|
||||||
|
set count surfaces GfxWorld::surfaceCount;
|
||||||
|
set count smodelDrawInsts smodelCount;
|
||||||
|
set block surfaceMaterials XFILE_BLOCK_RUNTIME_VIRTUAL;
|
||||||
|
set count surfaceMaterials staticSurfaceCount;
|
||||||
|
reorder:
|
||||||
|
smodelVisData
|
||||||
|
surfaceVisData
|
||||||
|
smodelVisDataCameraSaved
|
||||||
|
surfaceVisDataCameraSaved
|
||||||
|
surfaceCastsSunShadow
|
||||||
|
surfaceCastsShadow
|
||||||
|
smodelCastsShadow
|
||||||
|
sortedSurfIndex
|
||||||
|
smodelInsts
|
||||||
|
surfaces
|
||||||
|
smodelDrawInsts
|
||||||
|
surfaceMaterials;
|
||||||
|
|
||||||
|
// 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];
|
||||||
|
|
||||||
|
// GfxWaterBuffer
|
||||||
|
use GfxWaterBuffer;
|
||||||
|
set count buffer bufferSize / 16;
|
||||||
|
|
||||||
// =========================================
|
// =========================================
|
||||||
// GfxLightDef
|
// GfxLightDef
|
||||||
|
@ -8,8 +8,17 @@ namespace T6
|
|||||||
{
|
{
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef __declspec(align(32)) char byte32;
|
|
||||||
typedef __declspec(align(16)) char char16;
|
typedef __declspec(align(16)) char char16;
|
||||||
|
typedef __declspec(align(32)) char byte32;
|
||||||
|
typedef __declspec(align(128)) char byte128;
|
||||||
|
|
||||||
|
typedef __declspec(align(4)) char char_align4;
|
||||||
|
typedef __declspec(align(128)) char char_align128;
|
||||||
|
|
||||||
|
typedef __declspec(align(16)) char raw_byte16;
|
||||||
|
typedef __declspec(align(128)) char raw_byte128;
|
||||||
|
|
||||||
|
typedef __declspec(align(128)) float float_align128;
|
||||||
|
|
||||||
struct dvar_t;
|
struct dvar_t;
|
||||||
struct MenuCell;
|
struct MenuCell;
|
||||||
@ -1081,14 +1090,14 @@ namespace T6
|
|||||||
|
|
||||||
struct GfxWorldVertexData0
|
struct GfxWorldVertexData0
|
||||||
{
|
{
|
||||||
char* data;
|
byte128* data;
|
||||||
ID3D11Buffer* vb;
|
ID3D11Buffer* vb;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
struct GfxWorldVertexData1
|
struct GfxWorldVertexData1
|
||||||
{
|
{
|
||||||
char* data;
|
byte128* data;
|
||||||
ID3D11Buffer* vb;
|
ID3D11Buffer* vb;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1112,6 +1121,7 @@ namespace T6
|
|||||||
ID3D11Buffer* indexBuffer;
|
ID3D11Buffer* indexBuffer;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
typedef __declspec(align(4)) char aligned_byte_pointer;
|
||||||
|
|
||||||
struct GfxLightGrid
|
struct GfxLightGrid
|
||||||
{
|
{
|
||||||
@ -1123,7 +1133,7 @@ namespace T6
|
|||||||
unsigned int colAxis;
|
unsigned int colAxis;
|
||||||
unsigned __int16* rowDataStart;
|
unsigned __int16* rowDataStart;
|
||||||
unsigned int rawRowDataSize;
|
unsigned int rawRowDataSize;
|
||||||
char* rawRowData;
|
aligned_byte_pointer* rawRowData;
|
||||||
unsigned int entryCount;
|
unsigned int entryCount;
|
||||||
GfxLightGridEntry* entries;
|
GfxLightGridEntry* entries;
|
||||||
unsigned int colorCount;
|
unsigned int colorCount;
|
||||||
@ -1162,6 +1172,7 @@ namespace T6
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
struct GfxWorldDpvsStatic
|
struct GfxWorldDpvsStatic
|
||||||
{
|
{
|
||||||
unsigned int smodelCount;
|
unsigned int smodelCount;
|
||||||
@ -1176,18 +1187,18 @@ namespace T6
|
|||||||
unsigned int emissiveTransSurfsEnd;
|
unsigned int emissiveTransSurfsEnd;
|
||||||
unsigned int smodelVisDataCount;
|
unsigned int smodelVisDataCount;
|
||||||
unsigned int surfaceVisDataCount;
|
unsigned int surfaceVisDataCount;
|
||||||
char* smodelVisData[3];
|
raw_byte128* smodelVisData[3];
|
||||||
char* surfaceVisData[3];
|
raw_byte128* surfaceVisData[3];
|
||||||
char* smodelVisDataCameraSaved;
|
raw_byte128* smodelVisDataCameraSaved;
|
||||||
char* surfaceVisDataCameraSaved;
|
raw_byte128* surfaceVisDataCameraSaved;
|
||||||
unsigned __int16* sortedSurfIndex;
|
unsigned __int16* sortedSurfIndex;
|
||||||
GfxStaticModelInst* smodelInsts;
|
GfxStaticModelInst* smodelInsts;
|
||||||
GfxSurface* surfaces;
|
GfxSurface* surfaces;
|
||||||
GfxStaticModelDrawInst* smodelDrawInsts;
|
GfxStaticModelDrawInst* smodelDrawInsts;
|
||||||
GfxDrawSurf* surfaceMaterials;
|
GfxDrawSurf* surfaceMaterials;
|
||||||
char* surfaceCastsSunShadow;
|
raw_byte128* surfaceCastsSunShadow;
|
||||||
char* surfaceCastsShadow;
|
raw_byte128* surfaceCastsShadow;
|
||||||
char* smodelCastsShadow;
|
raw_byte128* smodelCastsShadow;
|
||||||
volatile int usageCount;
|
volatile int usageCount;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1197,7 +1208,7 @@ namespace T6
|
|||||||
unsigned int dynEntClientWordCount[2];
|
unsigned int dynEntClientWordCount[2];
|
||||||
unsigned int dynEntClientCount[2];
|
unsigned int dynEntClientCount[2];
|
||||||
unsigned int* dynEntCellBits[2];
|
unsigned int* dynEntCellBits[2];
|
||||||
char* dynEntVisData[2][3];
|
raw_byte16* dynEntVisData[2][3];
|
||||||
volatile int usageCount;
|
volatile int usageCount;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -3277,7 +3288,7 @@ namespace T6
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
struct GfxStreamingAabbTree
|
struct __declspec(align(16)) GfxStreamingAabbTree
|
||||||
{
|
{
|
||||||
vec4_t mins;
|
vec4_t mins;
|
||||||
vec4_t maxs;
|
vec4_t maxs;
|
||||||
@ -3291,7 +3302,7 @@ namespace T6
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
struct float44
|
struct __declspec(align(16)) float44
|
||||||
{
|
{
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
@ -3301,7 +3312,7 @@ namespace T6
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
struct GfxLight
|
struct __declspec(align(16)) GfxLight
|
||||||
{
|
{
|
||||||
char type;
|
char type;
|
||||||
char canUseShadowMap;
|
char canUseShadowMap;
|
||||||
@ -3326,7 +3337,6 @@ namespace T6
|
|||||||
vec4_t cookieControl0;
|
vec4_t cookieControl0;
|
||||||
vec4_t cookieControl1;
|
vec4_t cookieControl1;
|
||||||
vec4_t cookieControl2;
|
vec4_t cookieControl2;
|
||||||
/*__declspec(align(16))*/
|
|
||||||
float44 viewMatrix;
|
float44 viewMatrix;
|
||||||
float44 projMatrix;
|
float44 projMatrix;
|
||||||
GfxLightDef* def;
|
GfxLightDef* def;
|
||||||
@ -3572,7 +3582,7 @@ namespace T6
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
struct SSkinInstance
|
struct __declspec(align(16)) SSkinInstance
|
||||||
{
|
{
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
@ -3629,7 +3639,7 @@ namespace T6
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
struct GfxSurface
|
struct __declspec(align(16)) GfxSurface
|
||||||
{
|
{
|
||||||
srfTriangles_t tris;
|
srfTriangles_t tris;
|
||||||
Material* material;
|
Material* material;
|
||||||
@ -5533,9 +5543,9 @@ namespace T6
|
|||||||
|
|
||||||
struct SSkinShaders
|
struct SSkinShaders
|
||||||
{
|
{
|
||||||
char* pixelShaderAlign;
|
char_align128* pixelShaderAlign;
|
||||||
char* pixelShader;
|
char_align4* pixelShader;
|
||||||
char* vertexShader;
|
char_align128* vertexShader;
|
||||||
int pixelShaderSize;
|
int pixelShaderSize;
|
||||||
int vertexShaderSize;
|
int vertexShaderSize;
|
||||||
};
|
};
|
||||||
@ -5555,7 +5565,7 @@ namespace T6
|
|||||||
int bones;
|
int bones;
|
||||||
int width;
|
int width;
|
||||||
int frames;
|
int frames;
|
||||||
float* data;
|
float_align128* data;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user