-// $Id$
-//
// SuperTux - Decal
// Copyright (C) 2008 Christoph Sommer <christoph.sommer@2008.expires.deltadevelopment.de>
//
-// 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
// 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.
-
-#ifndef SUPERTUX_DECAL_H
-#define SUPERTUX_DECAL_H
-
-#include <memory>
-#include "video/surface.hpp"
-#include "video/drawing_context.hpp"
-#include "game_object.hpp"
-#include "serializable.hpp"
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
-class DisplayManager;
+#ifndef HEADER_SUPERTUX_OBJECT_DECAL_HPP
+#define HEADER_SUPERTUX_OBJECT_DECAL_HPP
-namespace lisp {
-class Lisp;
-}
+#include "object/moving_sprite.hpp"
+#include "util/reader_fwd.hpp"
/**
- * Non-interactive, decorative image
+ * A decorative image, perhaps part of the terrain
*/
-class Decal : public GameObject, public Serializable
+class Decal : public MovingSprite
{
public:
- Decal(const lisp::Lisp& reader);
+ Decal(const Reader& reader);
virtual ~Decal();
-
- virtual void write(lisp::Writer& writer);
- virtual void update(float elapsed_time);
- virtual void draw(DrawingContext& context);
-
-private:
- Vector pos; /**< coordinates of upper-left corner */
- std::string imagefile; /**< name of image to draw */
- int layer; /**< layer to draw on */
-
- std::auto_ptr<Surface> image; /**< image to draw, anchored at pos */
+ virtual HitResponse collision(GameObject& , const CollisionHit& ) {
+ return FORCE_MOVE;
+ }
};
#endif /*SUPERTUX_DECAL_H*/
+/* EOF */