2025-06-07 11:20:47 -04:00
|
|
|
#ifndef EFFECTDEF_H
|
|
|
|
|
#define EFFECTDEF_H
|
|
|
|
|
|
|
|
|
|
#include "material.h"
|
2025-08-14 17:30:25 -04:00
|
|
|
#include "xmodel.h"
|
2025-06-07 11:20:47 -04:00
|
|
|
|
|
|
|
|
struct FxSpawnDefLooping
|
|
|
|
|
{
|
|
|
|
|
int intervalMsec;
|
|
|
|
|
int count;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct FxIntRange
|
|
|
|
|
{
|
|
|
|
|
int base;
|
|
|
|
|
int amplitude;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct FxSpawnDefOneShot
|
|
|
|
|
{
|
|
|
|
|
FxIntRange count;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
union FxSpawnDef
|
|
|
|
|
{
|
|
|
|
|
FxSpawnDefLooping looping;
|
|
|
|
|
FxSpawnDefOneShot oneShot;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct FxFloatRange
|
|
|
|
|
{
|
|
|
|
|
float base;
|
|
|
|
|
float amplitude;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct FxElemAtlas
|
|
|
|
|
{
|
|
|
|
|
unsigned __int8 behavior;
|
|
|
|
|
unsigned __int8 index;
|
|
|
|
|
unsigned __int8 fps;
|
|
|
|
|
unsigned __int8 loopCount;
|
|
|
|
|
unsigned __int8 colIndexBits;
|
|
|
|
|
unsigned __int8 rowIndexBits;
|
|
|
|
|
__int16 entryCount;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct FxElemVec3Range
|
|
|
|
|
{
|
|
|
|
|
float base[3];
|
|
|
|
|
float amplitude[3];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct FxElemVelStateInFrame
|
|
|
|
|
{
|
|
|
|
|
FxElemVec3Range velocity;
|
|
|
|
|
FxElemVec3Range totalDelta;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct FxElemVelStateSample
|
|
|
|
|
{
|
|
|
|
|
FxElemVelStateInFrame local;
|
|
|
|
|
FxElemVelStateInFrame world;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct FxElemVisualState
|
|
|
|
|
{
|
|
|
|
|
unsigned __int8 color[4];
|
|
|
|
|
float rotationDelta;
|
|
|
|
|
float rotationTotal;
|
|
|
|
|
float size[2];
|
|
|
|
|
float scale;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct FxElemVisStateSample
|
|
|
|
|
{
|
|
|
|
|
FxElemVisualState base;
|
|
|
|
|
FxElemVisualState amplitude;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct FxElemMarkVisuals
|
|
|
|
|
{
|
2025-07-10 00:04:52 -04:00
|
|
|
qint32 materialPtrs[2];
|
|
|
|
|
QVector<Material> materials;
|
2025-06-07 11:20:47 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct EffectDef;
|
|
|
|
|
union EffectDefRef
|
|
|
|
|
{
|
2025-07-10 00:04:52 -04:00
|
|
|
qint32 handlePtr;
|
2025-06-07 11:20:47 -04:00
|
|
|
const EffectDef *handle;
|
2025-07-10 00:04:52 -04:00
|
|
|
|
|
|
|
|
qint32 namePtr;
|
2025-06-07 11:20:47 -04:00
|
|
|
const char *name;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
union FxElemVisuals
|
|
|
|
|
{
|
2025-07-10 00:04:52 -04:00
|
|
|
qint32 anonymousPtr;
|
2025-06-07 11:20:47 -04:00
|
|
|
const void *anonymous;
|
2025-07-10 00:04:52 -04:00
|
|
|
|
|
|
|
|
qint32 materialPtr;
|
2025-06-07 11:20:47 -04:00
|
|
|
Material *material;
|
2025-07-10 00:04:52 -04:00
|
|
|
|
|
|
|
|
qint32 modelPtr;
|
2025-06-07 11:20:47 -04:00
|
|
|
Model *model;
|
2025-07-10 00:04:52 -04:00
|
|
|
|
2025-06-07 11:20:47 -04:00
|
|
|
EffectDefRef effectDef;
|
2025-07-10 00:04:52 -04:00
|
|
|
|
|
|
|
|
qint32 soundNamePtr;
|
2025-06-07 11:20:47 -04:00
|
|
|
const char *soundName;
|
|
|
|
|
};
|
|
|
|
|
|
2025-07-10 00:04:52 -04:00
|
|
|
struct FxElemDefVisuals
|
2025-06-07 11:20:47 -04:00
|
|
|
{
|
2025-07-10 00:04:52 -04:00
|
|
|
qint32 markArrayPtr;
|
|
|
|
|
QVector<FxElemMarkVisuals> markArray;
|
|
|
|
|
|
|
|
|
|
qint32 arrayPtr;
|
|
|
|
|
QVector<FxElemVisuals> array;
|
|
|
|
|
|
2025-06-07 11:20:47 -04:00
|
|
|
FxElemVisuals instance;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct FxTrailVertex
|
|
|
|
|
{
|
|
|
|
|
float pos[2];
|
|
|
|
|
float normal[2];
|
|
|
|
|
float texCoord;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct FxTrailDef
|
|
|
|
|
{
|
|
|
|
|
int scrollTimeMsec;
|
|
|
|
|
int repeatDist;
|
|
|
|
|
int splitDist;
|
|
|
|
|
int vertCount;
|
|
|
|
|
FxTrailVertex *verts;
|
|
|
|
|
int indCount;
|
|
|
|
|
unsigned __int16 *inds;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct FxElemDef
|
|
|
|
|
{
|
|
|
|
|
int flags;
|
|
|
|
|
FxSpawnDef spawn;
|
|
|
|
|
FxFloatRange spawnRange;
|
|
|
|
|
FxFloatRange fadeInRange;
|
|
|
|
|
FxFloatRange fadeOutRange;
|
|
|
|
|
float spawnFrustumCullRadius;
|
|
|
|
|
FxIntRange spawnDelayMsec;
|
|
|
|
|
FxIntRange lifeSpanMsec;
|
|
|
|
|
FxFloatRange spawnOrigin[3];
|
|
|
|
|
FxFloatRange spawnOffsetRadius;
|
|
|
|
|
FxFloatRange spawnOffsetHeight;
|
|
|
|
|
FxFloatRange spawnAngles[3];
|
|
|
|
|
FxFloatRange angularVelocity[3];
|
|
|
|
|
FxFloatRange initialRotation;
|
|
|
|
|
FxFloatRange gravity;
|
|
|
|
|
FxFloatRange reflectionFactor;
|
|
|
|
|
FxElemAtlas atlas;
|
|
|
|
|
unsigned __int8 elemType;
|
|
|
|
|
unsigned __int8 visualCount;
|
|
|
|
|
unsigned __int8 velIntervalCount;
|
|
|
|
|
unsigned __int8 visStateIntervalCount;
|
2025-07-10 00:04:52 -04:00
|
|
|
qint32 velSamplesPtr;
|
|
|
|
|
QVector<FxElemVelStateSample> velSamples;
|
|
|
|
|
qint32 visSamplesPtr;
|
|
|
|
|
QVector<FxElemVisStateSample> visSamples;
|
2025-06-07 11:20:47 -04:00
|
|
|
FxElemDefVisuals visuals;
|
|
|
|
|
float collMins[3];
|
|
|
|
|
float collMaxs[3];
|
|
|
|
|
EffectDefRef effectOnImpact;
|
|
|
|
|
EffectDefRef effectOnDeath;
|
|
|
|
|
EffectDefRef effectEmitted;
|
|
|
|
|
FxFloatRange emitDist;
|
|
|
|
|
FxFloatRange emitDistVariance;
|
2025-07-10 00:04:52 -04:00
|
|
|
|
|
|
|
|
qint32 trailDefPtr;
|
2025-06-07 11:20:47 -04:00
|
|
|
FxTrailDef *trailDef;
|
2025-07-10 00:04:52 -04:00
|
|
|
|
2025-06-07 11:20:47 -04:00
|
|
|
unsigned __int8 sortOrder;
|
|
|
|
|
unsigned __int8 lightingFrac;
|
|
|
|
|
unsigned __int8 useItemClip;
|
|
|
|
|
unsigned __int8 unused[1];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct EffectDef
|
|
|
|
|
{
|
2025-07-10 00:04:52 -04:00
|
|
|
qint32 namePtr;
|
|
|
|
|
QString name;
|
|
|
|
|
|
2025-06-07 11:20:47 -04:00
|
|
|
int flags;
|
|
|
|
|
int totalSize;
|
|
|
|
|
int msecLoopingLife;
|
|
|
|
|
int elemDefCountLooping;
|
|
|
|
|
int elemDefCountOneShot;
|
|
|
|
|
int elemDefCountEmission;
|
2025-07-10 00:04:52 -04:00
|
|
|
|
|
|
|
|
qint32 elemDefsPtr;
|
|
|
|
|
QVector<FxElemDef> elemDefs;
|
2025-06-07 11:20:47 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif // EFFECTDEF_H
|