Added chinese fonts and translation from Liu Sizhuang <oldherl@gmail.com>
[supertux.git] / src / object / lantern.hpp
index f991105..7daed4b 100644 (file)
@@ -18,7 +18,7 @@
 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 #ifndef __SUPERTUX_LANTERN_H__
-#define __SUPERTUX_LANTERN_H___
+#define __SUPERTUX_LANTERN_H__
 
 #include "object/moving_sprite.hpp"
 #include "object/rock.hpp"
@@ -29,6 +29,7 @@
 class Lantern : public Rock
 {
 public:
+  Lantern(const Vector& pos);
   Lantern(const lisp::Lisp& reader);
   void draw(DrawingContext& context);
   ~Lantern();
@@ -38,6 +39,18 @@ public:
   void grab(MovingObject& object, const Vector& pos, Direction dir);
   void ungrab(MovingObject& object, Direction dir);
 
+  /**
+   * returns true if lamp is currently open
+   */
+  bool is_open();
+
+  /**
+   * returns the lamp's color
+   */
+  Color get_color() const {
+    return lightcolor;
+  }
+
 private:
   Color lightcolor;
   Sprite* lightsprite;