From 60565da6072e64240054c5fd12674bf482c013b6 Mon Sep 17 00:00:00 2001 From: Jan Date: Thu, 14 Nov 2019 14:55:18 +0100 Subject: [PATCH] ZoneCommon: Minor fixes to T6 structures --- src/ZoneCommon/Game/T6/T6_Assets.h | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/src/ZoneCommon/Game/T6/T6_Assets.h b/src/ZoneCommon/Game/T6/T6_Assets.h index 810303a6..96e46fed 100644 --- a/src/ZoneCommon/Game/T6/T6_Assets.h +++ b/src/ZoneCommon/Game/T6/T6_Assets.h @@ -3,6 +3,9 @@ #define __int32 int #define __int64 long long +typedef __declspec(align(32)) char byte32; +typedef __declspec(align(16)) char char16; + struct dvar_t; struct MenuCell; struct cplane_s; @@ -1736,7 +1739,7 @@ struct RawFile { const char *name; int len; - const char *buffer; + const char16* buffer; }; struct StringTable @@ -2309,7 +2312,7 @@ struct Qdb { const char *name; int len; - char *buffer; + byte32 *buffer; }; struct Slug @@ -4944,12 +4947,27 @@ struct MaterialArgumentCodeConst 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 = 0x8, +}; + struct MaterialShaderArgument { unsigned __int16 type;