X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fobject%2Flantern.hpp;h=1177374c964d1d14bf7dcd5b339d49d672ff3115;hb=634111449bef8b030090510475857adde9f3f87e;hp=f9911058527bcc6d4c80a93b8a60b9d7c47e6c3c;hpb=9f9a92cd9d8433c6d4d63b0178fd038a95b9e1a1;p=supertux.git diff --git a/src/object/lantern.hpp b/src/object/lantern.hpp index f99110585..1177374c9 100644 --- a/src/object/lantern.hpp +++ b/src/object/lantern.hpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux - Lantern // Copyright (C) 2006 Wolfgang Becker // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,13 +12,11 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// along with this program. If not, see . -#ifndef __SUPERTUX_LANTERN_H__ -#define __SUPERTUX_LANTERN_H___ +#ifndef HEADER_SUPERTUX_OBJECT_LANTERN_HPP +#define HEADER_SUPERTUX_OBJECT_LANTERN_HPP -#include "object/moving_sprite.hpp" #include "object/rock.hpp" /** @@ -29,7 +25,8 @@ class Lantern : public Rock { public: - Lantern(const lisp::Lisp& reader); + Lantern(const Vector& pos); + Lantern(const Reader& reader); void draw(DrawingContext& context); ~Lantern(); @@ -38,10 +35,28 @@ 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; + SpritePtr lightsprite; void updateColor(); + +private: + Lantern(const Lantern&); + Lantern& operator=(const Lantern&); }; #endif + +/* EOF */