#ifndef EFFECTDEF_H #define EFFECTDEF_H #include "material.h" #include "model.h" 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 { Material *materials[2]; }; struct EffectDef; union EffectDefRef { const EffectDef *handle; const char *name; }; union FxElemVisuals { const void *anonymous; Material *material; Model *model; EffectDefRef effectDef; const char *soundName; }; union FxElemDefVisuals { FxElemMarkVisuals *markArray; FxElemVisuals *array; 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; const FxElemVelStateSample *velSamples; const FxElemVisStateSample *visSamples; FxElemDefVisuals visuals; float collMins[3]; float collMaxs[3]; EffectDefRef effectOnImpact; EffectDefRef effectOnDeath; EffectDefRef effectEmitted; FxFloatRange emitDist; FxFloatRange emitDistVariance; FxTrailDef *trailDef; unsigned __int8 sortOrder; unsigned __int8 lightingFrac; unsigned __int8 useItemClip; unsigned __int8 unused[1]; }; struct EffectDef { const char *name; int flags; int totalSize; int msecLoopingLife; int elemDefCountLooping; int elemDefCountOneShot; int elemDefCountEmission; const FxElemDef *elemDefs; }; #endif // EFFECTDEF_H