X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fobject%2Fcandle.hpp;h=c82db5e31ed3996780de6add5d9f499347b51a9a;hb=08ccb17345a52f5ffd8a5dd6ecf675cad55f16a7;hp=6b40b3e03002ad0ea62085058bf089d4ec3eb5a3;hpb=8a627e73d824b5a14249cfe066dc2fdc643ce28d;p=supertux.git diff --git a/src/object/candle.hpp b/src/object/candle.hpp index 6b40b3e03..c82db5e31 100644 --- a/src/object/candle.hpp +++ b/src/object/candle.hpp @@ -25,6 +25,7 @@ #include "lisp/lisp.hpp" #include "object/moving_sprite.hpp" #include "script_interface.hpp" +#include "video/surface.hpp" /** * A burning candle: Simple, scriptable level decoration. @@ -34,19 +35,28 @@ class Candle : public MovingSprite, public ScriptInterface public: Candle(const lisp::Lisp& lisp); virtual Candle* clone() const { return new Candle(*this); } + virtual void draw(DrawingContext& context); HitResponse collision(GameObject& other, const CollisionHit& hit); virtual void expose(HSQUIRRELVM vm, SQInteger table_idx); virtual void unexpose(HSQUIRRELVM vm, SQInteger table_idx); + /** + * @name Scriptable Methods + * @{ + */ void puff_smoke(); /**< spawn a puff of smoke */ - bool get_burning(); /**< returns true if candle is lighted */ void set_burning(bool burning); /**< true: light candle, false: extinguish candle */ + /** + * @} + */ private: bool burning; /**< true if candle is currently lighted */ + Surface candle_light_1; /**< drawn to lightmap */ + Surface candle_light_2; /**< drawn to lightmap (alternative image) */ };