mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2026-11-07 01:01:59 +00:00
fix: correct QoS PC asset definitions (#1049)
This commit is contained in:
3 files changed
+98
-35
No files matched your search
@@ -768,7 +768,8 @@ namespace QOS
|
||||
struct MaterialTechniqueSet
|
||||
{
|
||||
const char* name;
|
||||
char unknown[8];
|
||||
char unknown[4];
|
||||
MaterialTechniqueSet* remappedTechniqueSet;
|
||||
MaterialTechnique* techniques[TECHNIQUE_COUNT];
|
||||
};
|
||||
|
||||
@@ -1000,23 +1001,42 @@ namespace QOS
|
||||
struct SndCurve
|
||||
{
|
||||
const char* name;
|
||||
char unknown0[68];
|
||||
int knotCount;
|
||||
float knots[8][2];
|
||||
};
|
||||
|
||||
enum QosSoundFileType
|
||||
enum snd_alias_type_t
|
||||
{
|
||||
// Only the primed branch is identified so far. Other values use the inline MssSound branch.
|
||||
QOS_SOUND_FILE_TYPE_PRIMED = 3,
|
||||
SAT_UNKNOWN = 0x0,
|
||||
SAT_LOADED = 0x1,
|
||||
SAT_STREAMED = 0x2,
|
||||
SAT_PRIMED = 0x3,
|
||||
SAT_COUNT = 0x4,
|
||||
};
|
||||
|
||||
struct QosMssSound
|
||||
enum QosSoundFormat : int
|
||||
{
|
||||
// Largely matches an MSS sound info block, but only the embedded data size is confirmed.
|
||||
int unknown0;
|
||||
unsigned char* unknownDataPtr0;
|
||||
unsigned int dataSize;
|
||||
char unknown1[24];
|
||||
unsigned char* unknownDataPtr1;
|
||||
QOS_SOUND_FORMAT_PCM = 0x1,
|
||||
QOS_SOUND_FORMAT_IMA_ADPCM = 0x11,
|
||||
};
|
||||
|
||||
struct AILSOUNDINFO
|
||||
{
|
||||
QosSoundFormat format;
|
||||
const void* data_ptr;
|
||||
unsigned int data_len;
|
||||
unsigned int rate;
|
||||
int bits;
|
||||
int channels;
|
||||
unsigned int channel_mask;
|
||||
unsigned int samples;
|
||||
unsigned int block_size;
|
||||
const void* initial_ptr;
|
||||
};
|
||||
|
||||
struct MssSound
|
||||
{
|
||||
AILSOUNDINFO info;
|
||||
unsigned char data[1];
|
||||
};
|
||||
|
||||
@@ -1031,18 +1051,22 @@ namespace QOS
|
||||
|
||||
union QosSoundFileRef
|
||||
{
|
||||
QosMssSound* mssSound;
|
||||
MssSound* mssSound;
|
||||
QosPrimedSound* primeSnd;
|
||||
};
|
||||
|
||||
struct SoundFile
|
||||
{
|
||||
const char* unknownString0;
|
||||
const char* unknownString1;
|
||||
const char* dir;
|
||||
const char* name;
|
||||
QosSoundFileRef u;
|
||||
// Scalar fields between the file reference and the type discriminator.
|
||||
char unknown0[184];
|
||||
QosSoundFileType type;
|
||||
// Nonzero when the referenced streamed sound was found at load time.
|
||||
unsigned int exists;
|
||||
// Per-language package index; 99 selects a loose sound file instead of bxpackNNN.bin.
|
||||
int packageIndex[15];
|
||||
unsigned int packageOffset[15];
|
||||
unsigned int packageSize[15];
|
||||
snd_alias_type_t type;
|
||||
};
|
||||
|
||||
struct snd_alias_t
|
||||
@@ -1160,9 +1184,9 @@ namespace QOS
|
||||
struct CollisionAabbTree
|
||||
{
|
||||
float origin[3];
|
||||
float halfSize[3];
|
||||
uint16_t materialIndex;
|
||||
uint16_t childCount;
|
||||
float halfSize[3];
|
||||
CollisionAabbTreeIndex u;
|
||||
};
|
||||
|
||||
@@ -1190,11 +1214,19 @@ namespace QOS
|
||||
vec3_t* verts;
|
||||
};
|
||||
|
||||
struct GfxPlacement
|
||||
{
|
||||
float quat[4];
|
||||
float origin[3];
|
||||
};
|
||||
|
||||
struct DynEntityDef
|
||||
{
|
||||
char unknown0[32]; // Includes type and placement data.
|
||||
unsigned int type;
|
||||
GfxPlacement pose;
|
||||
XModel* xModel;
|
||||
char unknown1[4]; // Matches IW-era brushModel/physicsBrushModel area.
|
||||
unsigned short brushModel;
|
||||
unsigned short physicsBrushModel;
|
||||
FxEffectDef* destroyFx;
|
||||
XModelPieces* destroyPieces;
|
||||
PhysPreset* physPreset;
|
||||
@@ -1218,7 +1250,11 @@ namespace QOS
|
||||
|
||||
struct type_align(4) DynEntityPhysConstraint
|
||||
{
|
||||
char unknown[72];
|
||||
unsigned int type;
|
||||
unsigned short entityIds[2];
|
||||
unsigned short enabled;
|
||||
unsigned char entityCategories[2];
|
||||
char unknown[60];
|
||||
};
|
||||
|
||||
enum DynEntityDrawType
|
||||
@@ -1291,7 +1327,8 @@ namespace QOS
|
||||
int unknown2;
|
||||
MapEnts* mapEnts;
|
||||
cbrush_t* box_brush;
|
||||
char unknown1[74];
|
||||
char unknown1[72];
|
||||
unsigned short dynEntFirstRuntimeModel;
|
||||
uint16_t dynEntCount[DYNENT_COLL_COUNT];
|
||||
DynEntityDef* dynEntDefList[DYNENT_DRAW_COUNT];
|
||||
DynEntityClient* dynEntClientList[DYNENT_DRAW_COUNT];
|
||||
@@ -1556,9 +1593,17 @@ namespace QOS
|
||||
int startSurfIndex;
|
||||
};
|
||||
|
||||
struct GfxPackedPlacement
|
||||
{
|
||||
float origin[3];
|
||||
float axis[3][3];
|
||||
float scale;
|
||||
};
|
||||
|
||||
struct GfxStaticModelDrawInst
|
||||
{
|
||||
char unknown[56];
|
||||
float cullDist;
|
||||
GfxPackedPlacement placement;
|
||||
XModel* model;
|
||||
unsigned int unknown2;
|
||||
};
|
||||
@@ -1575,7 +1620,10 @@ namespace QOS
|
||||
|
||||
struct GfxAabbTree
|
||||
{
|
||||
char unknown[32];
|
||||
float mins[3];
|
||||
float maxs[3];
|
||||
unsigned int surfaceCount;
|
||||
unsigned int startSurfIndex;
|
||||
unsigned int smodelIndexCount;
|
||||
unsigned int* smodelIndexes;
|
||||
unsigned int childCount;
|
||||
@@ -1721,6 +1769,20 @@ namespace QOS
|
||||
char unknown[24];
|
||||
};
|
||||
|
||||
struct SunLightParseParams
|
||||
{
|
||||
char name[64];
|
||||
float ambientScale;
|
||||
float ambientColor[3];
|
||||
float diffuseFraction;
|
||||
float sunLight;
|
||||
float sunColor[3];
|
||||
float diffuseColor[3];
|
||||
bool diffuseColorHasBeenSet;
|
||||
char pad[3];
|
||||
float angles[3];
|
||||
};
|
||||
|
||||
struct GfxWorld
|
||||
{
|
||||
const char* name;
|
||||
@@ -1744,9 +1806,9 @@ namespace QOS
|
||||
GfxWorldVertexData vd;
|
||||
unsigned int vertexLayerDataSize;
|
||||
GfxWorldVertexLayerData vld;
|
||||
char unknown2[128];
|
||||
SunLightParseParams sunParse;
|
||||
GfxLight* sunLight;
|
||||
char unknown3[12];
|
||||
float sunColorFromBsp[3];
|
||||
unsigned int sunPrimaryLightIndex;
|
||||
unsigned int primaryLightCount;
|
||||
char unknown4[4];
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
use MaterialTechniqueSet;
|
||||
set block XFILE_BLOCK_TEMP;
|
||||
set string name;
|
||||
set condition remappedTechniqueSet never;
|
||||
set reusable techniques;
|
||||
|
||||
// MaterialTechnique
|
||||
|
||||
@@ -17,16 +17,16 @@ set reusable soundFile;
|
||||
|
||||
// SoundFile
|
||||
use SoundFile;
|
||||
set string unknownString0;
|
||||
set string unknownString1;
|
||||
set condition u::primeSnd type == QOS_SOUND_FILE_TYPE_PRIMED;
|
||||
set string dir;
|
||||
set string name;
|
||||
set condition u::primeSnd type == SAT_PRIMED;
|
||||
set reusable u::primeSnd;
|
||||
|
||||
// QosMssSound
|
||||
use QosMssSound;
|
||||
set arraysize data dataSize;
|
||||
set condition unknownDataPtr0 never;
|
||||
set condition unknownDataPtr1 never;
|
||||
// MssSound
|
||||
use MssSound;
|
||||
set arraysize data info::data_len;
|
||||
set condition info::data_ptr never;
|
||||
set condition info::initial_ptr never;
|
||||
|
||||
// QosPrimedSound
|
||||
use QosPrimedSound;
|
||||
|
||||
Reference in new issue
Block a user