Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields

effect.h

00001 /***************************************************************************
00002                           effect.h  -  description
00003                              -------------------
00004     begin                : Thu Jul 10 2003
00005     copyright            : (C) 2003 by Gabor Torok
00006     email                : cctorok@yahoo.com
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef EFFECT_H
00019 #define EFFECT_H
00020 
00021 #include "constants.h"
00022 #include "glshape.h"
00023 #include "shapepalette.h"
00024 #include "session.h"
00025 
00030 class Session;
00031 
00032 class Effect {
00033 private:  
00034   ShapePalette *shapePal;
00035   GLuint flameTex, ringTex, rippleTex;
00036   GLShape *shape;
00037   bool deleteShape;
00038   float ringRadius, ringRotate, rippleRadius, rippleAlpha;
00039   GLint lastTimeStamp;
00040   Session *session;
00041   
00042   static const int PARTICLE_COUNT = 30;
00043   ParticleStruct *particle[PARTICLE_COUNT];
00044 
00045 public:
00046   Effect(Session *session, ShapePalette *shapePal, GLShape *shape);
00047   Effect(Session *session, ShapePalette *shapePal, int width, int height);
00048   ~Effect();
00049   
00050   void deleteParticles();
00051   void draw(int effect, int startTime);
00052 
00053   inline GLShape *getShape() { return shape; }
00054    
00055 protected:
00056   void commonInit();
00057   void glowShape(bool proceed, int startTime);
00058   void drawFlames(bool proceed);
00059   void drawTeleport(bool proceed);
00060   void drawGreen(bool proceed);
00061   void drawExplosion(bool proceed);
00062   void drawSwirl(bool proceed);
00063   void drawCastSpell(bool proceed);
00064   void drawRing(bool proceed);
00065   void drawRipple(bool proceed);
00066   void drawDust(bool proceed);
00067   void drawHail(bool proceed);
00068   void drawTower(bool proceed);
00069   
00070   // particle management
00071   void createParticle(ParticleStruct **particle);
00072   void moveParticle(ParticleStruct **particle);
00073   void drawParticle(ParticleStruct *particle);
00074    
00075 };
00076 
00077 #endif

Generated on Thu Jun 16 21:50:43 2005 for scourge by  doxygen 1.4.0