/* $Id: smoke.hpp,v 1.10 2005/11/13 11:35:14 uwe Exp $ */ #ifndef _SMOKE_HPP_ #define _SMOKE_HPP_ /**********************************************************/ #include "constants.hpp" #include "noncollidableobject.hpp" /**********************************************************/ //! class for smoke effects class Smoke : public NonCollidableObject { public: Smoke(); ~Smoke(); //! \name size selection //@{ //! sets the size of the smoke object void setSize( const Sint32 size ); //! returns the minimal size constant for a smoke object Sint32 getMinSize() const { return 0; } //! returns the maximal size constant for a smoke object Sint32 getMaxSize() const { return BIGGEST_SMOKE - SMALLEST_SMOKE; } //@} //! implementation of the pure virtual function inherited from //! class Object, returns the constant defined in constants.hpp Sint32 getID() const { return SMALLEST_SMOKE + m_Size; } void update(); //! returns a pointer to object colors (length == getNumColors) virtual const Uint32* getColors() const { return m_Colors; } //! returns the number of colors, that are defined for this objet virtual Sint32 getNumColors() const { return NUM_COLORS; } //! sets the smoke color void setColor( const Sint32 col ) { m_Colors[SMOKE_COLOR] = col; m_ColorInstance = -1; } virtual Uint32 getSerializeBufferSize() const; virtual void serialize( Uint8*& bufferPointer ) const; virtual void deserialize( Uint8*& bufferPointer ); protected: enum { SMOKE_COLOR = 0, NUM_COLORS }; Uint32 m_Colors[NUM_COLORS]; //!< smoke color Sint32 m_Size; //!< size of the smoke real m_AccumulatedDT; }; /**********************************************************/ #endif // _SMOKE_HPP_