00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef GLTORCH_H
00019 #define GLTORCH_H
00020
00021 #include "glshape.h"
00022
00023 class GLShape;
00024
00029 class GLTorch : public GLShape {
00030 private:
00031 GLuint flameTex;
00032
00033 int PARTICLE_COUNT;
00034 ParticleStruct *particle[200];
00035
00036 GLuint torchback;
00037 int torch_dir;
00038
00039 public:
00040 GLTorch(GLuint texture[], GLuint flameTex,
00041 int width, int depth, int height,
00042 char *name, int descriptionGroup,
00043 Uint32 color, Uint8 shapePalIndex=0,
00044 GLuint torchback=0, int torch_dir=Constants::NORTH);
00045
00046 ~GLTorch();
00047
00048 void draw();
00049
00050 inline bool drawFirst() { return false; }
00051
00052 inline bool drawLater() { return true; }
00053 inline void setupBlending() { glBlendFunc(GL_SRC_ALPHA, GL_ONE); }
00054
00055
00056 protected:
00057 void initParticles();
00058 };
00059
00060 #endif