feat: first draft of loading gltf models for t6

This commit is contained in:
Jan
2024-05-25 10:03:25 +02:00
parent f8b5734f86
commit 1f5050befa
40 changed files with 2459 additions and 67 deletions

View File

@ -4082,7 +4082,7 @@ namespace IW4
HITLOC_GUN = 0x12,
HITLOC_SHIELD = 0x13,
HITLOC_NUM,
HITLOC_COUNT,
};
struct snd_alias_list_name

View File

@ -3452,7 +3452,7 @@ namespace IW5
HITLOC_GUN = 0x12,
HITLOC_SHIELD = 0x13,
HITLOC_NUM
HITLOC_COUNT
};
enum materialSurfType_t

View File

@ -108,9 +108,49 @@ namespace T5
MAX_XFILE_COUNT
};
typedef float vec2_t[2];
typedef float vec3_t[3];
typedef float vec4_t[4];
union vec2_t
{
float v[2];
struct
{
float x;
float y;
};
};
union vec3_t
{
struct
{
float x;
float y;
float z;
};
float v[3];
};
union vec4_t
{
float v[4];
struct
{
float x;
float y;
float z;
float w;
};
struct
{
float r;
float g;
float b;
float a;
};
};
union XAssetHeader
{
@ -166,8 +206,6 @@ namespace T5
typedef tdef_align(128) float float_align128;
typedef char cbrushedge_t;
typedef float vec2_t[2];
typedef float vec3_t[3];
typedef tdef_align(128) unsigned int raw_uint128;
struct PhysPreset
@ -619,6 +657,11 @@ namespace T5
PhysGeomList* geomList;
};
struct XModelQuat
{
int16_t v[4];
};
struct XModel
{
const char* name;
@ -628,8 +671,8 @@ namespace T5
char lodRampType;
uint16_t* boneNames;
char* parentList;
int16_t (*quats)[4];
float (*trans)[4];
XModelQuat* quats;
vec4_t* trans;
char* partClassification;
DObjAnimMat* baseMat;
XSurface* surfs;
@ -3288,7 +3331,7 @@ namespace T5
HITLOC_L_FOOT = 0x11,
HITLOC_GUN = 0x12,
HITLOC_NUM
HITLOC_COUNT
};
struct flameTable

View File

@ -601,6 +601,11 @@ namespace T6
XMODEL_LOD_RAMP_COUNT
};
struct XModelQuat
{
int16_t v[4];
};
struct XModel
{
const char* name;
@ -610,9 +615,9 @@ namespace T6
XModelLodRampType lodRampType;
ScriptString* boneNames;
unsigned char* parentList;
uint16_t (*quats)[4];
float (*trans)[4];
char* partClassification;
XModelQuat* quats;
vec4_t* trans;
unsigned char* partClassification;
DObjAnimMat* baseMat;
XSurface* surfs;
Material** materialHandles;
@ -625,7 +630,7 @@ namespace T6
vec3_t mins;
vec3_t maxs;
uint16_t numLods;
uint16_t collLod;
int16_t collLod;
float* himipInvSqRadii;
int memUsage;
unsigned int flags;
@ -4324,7 +4329,8 @@ namespace T6
MISSILE_GUIDANCE_TVGUIDED = 0x6,
MISSILE_GUIDANCE_DRONE = 0x7,
MISSILE_GUIDANCE_HEATSEEKING = 0x8,
MISSILE_GUIDANCE_COUNT = 0x9,
MISSILE_GUIDANCE_COUNT
};
enum hitLocation_t
@ -4351,7 +4357,7 @@ namespace T6
HITLOC_GUN = 0x13,
HITLOC_SHIELD = 0x14,
HITLOC_NUM,
HITLOC_COUNT,
};
struct WeaponDef