1 /* 2 * This code is released under the GNU General Public License. See COPYING for 3 * details. Copyright 2003 John Spray: spray_john@users.sourceforge.net 4 */ 5 6 7 #ifndef PARTICLE_H 8 #define PARTICLE_H 9 10 #include <SDL_opengl.h> 11 12 #include "Vector.h" 13 #include "Game.h" 14 15 enum BounceType{ 16 PARTICLE_BOUNCE_NONE, 17 PARTICLE_BOUNCE_SLIDE, 18 PARTICLE_BOUNCE_ONE 19 }; 20 enum DrawType{ 21 PARTICLE_DRAW_SIMPLE, 22 PARTICLE_DRAW_MOTION 23 }; 24 25 class Particle{ 26 public: 27 Particle(); 28 void Animate(float dtf); 29 int Collide(Game*); 30 Vector s; 31 Vector v; 32 Vector a; 33 float res; 34 float diffuse; 35 BounceType bounce; 36 int collide; 37 float life; 38 float startlife; 39 char texfile[128]; 40 float rad; 41 float spinoffset; //degrees 42 float spindir; 43 GLenum blendmode; 44 DrawType drawmode; 45 }; 46 47 #endif //PARTICLE_H 48