X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fobject%2Fcandle.hpp;h=c82db5e31ed3996780de6add5d9f499347b51a9a;hb=08ccb17345a52f5ffd8a5dd6ecf675cad55f16a7;hp=38ea325892ab730792cfb6597f628294155c4e78;hpb=24e5b19904a9b115a92e933bd62748ff5c198613;p=supertux.git diff --git a/src/object/candle.hpp b/src/object/candle.hpp index 38ea32589..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,22 +35,29 @@ 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 */ - std::string name; /**< user-defined name for use in scripts or empty string if not scriptable */ + Surface candle_light_1; /**< drawn to lightmap */ + Surface candle_light_2; /**< drawn to lightmap (alternative image) */ }; #endif -