#ifndef ___PARTICULES_H___ #define ___PARTICULES_H___ #define MAX_FORCES 20 #define TEXTURE_INCREMENTAL 1<<0 #define TEXTURE_RANDOM 1<<1 typedef struct { char alive; int life; int collide; DWORD creationTime; u32 RGBA; Vector coords; Vector speed; // pixels per second Vector coordsDest; Vector speedDest; float scaleFactor; float width; // width or width/2 float height; // height or height/2 float rotAngle; // angle in degrees int textureIdx; // IN GRID !! int textureIdxBase; // IN GRID !! char * luaCollideCallBack; } Particules; typedef struct { Vector Gravity; float Frictions; // ration per millisecond Vector WindDirection; float WindForce; float RotationSpeed; float RotationRand; float RotationInit; float RotationInit2; int GrowFor; float GrowForInit; float GrowForEnd; float GrowForRand; int FadeFor; float FadeForInit; float FadeForEnd; float FadeForRand; int GrowForColor; u32 GrowForColorInit; u32 GrowForColorEnd; int FadeForColor; u32 FadeForColorInit; u32 FadeForColorEnd; u32 AnimSpeed; BOOL AnimRepeat; u32 AnimInit; float collisionFriction; float collisionRandAngle; } Forces; class PGENERATOR_OBJ { public: BOOL alive; BOOL Collision; UnicID ThisID; // Code For .MAT in Particles, ABONDONNED //_3D_Material *MaterialPtr; char Name[MAX_PATH]; char GeneratorName[MAX_PATH]; char MediaName[MAX_PATH]; char SceneName[MAX_PATH]; char ObjectName[MAX_PATH]; SIZE TextureGrid; int TextureIdx; u32 nbInGrid; u16 BlendMode; int AlphaThreshold; DWORD curTime; DWORD pgTime; DWORD pgTimeUnused; u32 options;//// Particules *particulesTab; int maxParticules; int nbParticules; int curParticule; int particuleRepeat; int particuleLife; float particuleLifeRand; float genSpeed; // in particules per second float genSpeedRand; float genAngleAllowed; float genPower; float genPowerRand; int genNumber; float genWidth; // width or width/2 float genHeight; // height or height/2 float genSizeRand; Forces forces; PGENERATOR_OBJ *particuleSonPtr; char son[MAX_PATH]; int sonMode; Vector Origin; Vector Direction; Vector *OriginList; Vector *DirectionList; char MassTextureName[MAX_PATH]; int MeshFaces; float MeshSurface; float *MeshSurfaceList; public: PGENERATOR_OBJ() {memset(this, 0, sizeof(*this)); TextureGrid.cx = TextureGrid.cy = 1; alive=true;}; ~PGENERATOR_OBJ() { for (int i=0; i