1 /*! 2 \brief A special effect involving a small, stable flame, useful for candles. 3 */ 4 5 #ifndef EFFECT_CANDLE_H 6 #define EFFECT_CANDLE_H 7 8 // I N C L U D E S //////////////////////////////////////////////////////////// 9 10 #include "eye_candy.h" 11 12 namespace ec 13 { 14 15 // C L A S S E S ////////////////////////////////////////////////////////////// 16 17 class CandleEffect : public Effect 18 { 19 public: 20 CandleEffect(EyeCandy* _base, bool* _dead, Vec3* _pos, 21 const color_t _hue_adjust, const color_t _saturation_adjust, 22 const float scale, const Uint16 _LOD); 23 ~CandleEffect(); 24 get_type()25 virtual EffectEnum get_type() 26 { 27 return EC_CANDLE; 28 } 29 ; 30 bool idle(const Uint64 usec); 31 32 GradientMover* mover; 33 ParticleSpawner* spawner; 34 color_t hue_adjust; 35 color_t saturation_adjust; 36 float scale; 37 float sqrt_scale; 38 }; 39 40 class CandleParticle : public Particle 41 { 42 public: 43 CandleParticle(Effect* _effect, ParticleMover* _mover, 44 const Vec3 _pos, const Vec3 _velocity, 45 const color_t hue_adjust, const color_t saturation_adjust, 46 const float _scale, const Uint16 _LOD); ~CandleParticle()47 ~CandleParticle() 48 { 49 } 50 ; 51 52 virtual bool idle(const Uint64 delta_t); 53 virtual Uint32 get_texture(); 54 virtual float get_burn() const; estimate_light_level()55 virtual light_t estimate_light_level() const 56 { 57 return 0.0; 58 } 59 ; // Like above get_light_level()60 virtual light_t get_light_level() 61 { 62 return 0.0; 63 } 64 ; // Same. 65 66 Uint16 LOD; 67 }; 68 69 /////////////////////////////////////////////////////////////////////////////// 70 71 } // End namespace ec 72 73 #endif // defined EFFECT_CANDLE_H 74