--- /dev/null
+(supertux-level
+ (version 2)
+ (name (_ "Flying Platform Test"))
+ (author "Marek Moeckel")
+ (sector
+ (name "main")
+ (ambient-light 1 1 1)
+ (background
+ (speed 0.5)
+ (image "images/background/BlueRock_Forest/blue-top.jpg")
+ )
+ (camera
+ (mode "normal")
+ )
+ (decal
+ (x 528)
+ (y 176)
+ (image "images/creatures/tux/small/walk-0.png")
+ )
+ (decal
+ (y 176)
+ (image "images/creatures/tux/small/walk-2.png")
+ )
+ (decal
+ (x 128)
+ (y 352)
+ (image "images/creatures/tux/small/jump-0.png")
+ )
+ (decal
+ (x 688)
+ (y 336)
+ (image "images/creatures/tux/small/skid-0.png")
+ )
+ (decal
+ (x 736)
+ (y 432)
+ (image "images/creatures/nolok/walk-0.png")
+ )
+ (decal
+ (x 412)
+ (y 112)
+ (image "images/creatures/nolok/walk-1.png")
+ )
+ (decal
+ (x 304)
+ (y 432)
+ (image "images/creatures/nolok/walk-1.png")
+ )
+ (decal
+ (x 752)
+ (y 400)
+ (layer -50)
+ (image "images/objects/particles/smoke-2.png")
+ )
+ (decal
+ (x 752)
+ (y 400)
+ (image "images/objects/particles/smoke-2.png")
+ )
+ (decal
+ (x 800)
+ (y 112)
+ (image "images/creatures/nolok/walk-2.png")
+ )
+ (tilemap
+ (z-pos -100)
+ (solid #f)
+ (width 40)
+ (height 19)
+ (tiles
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0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0 0 0 0 0 0 0 0
+ 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 0 0 131 131 0 0 0 0 131 131 131
+ 1311 0 0 0 0 0 0 0 0 0 0 0 0 0 131 1311 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+ 1311 0 0 0 0 0 0 0 0 0 0 0 0 0 131 1311 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 83 0 0 0 0 0 0 131 0 0 0 0 0 0 0 83 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 131 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 131 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 131 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+ 8 8 8 8 8 8 8 8 8 8 8 8 8 8 131 8 8 8 8 8 8 8 8 8 8 8 8 8 8 0 0 0 0 0 0 0 0 0 0 0
+ 14 14 14 14 14 14 14 14 14 14 14 14 14 14 131 14 14 14 14 14 14 14 14 14 14 14 14 14 14 0 0 0 0 0 0 0 0 0 0 0
+ 11 11 11 11 11 11 11 11 11 11 11 11 11 11 131 11 11 11 11 11 11 11 11 11 11 11 11 11 11 0 0 0 0 0 0 0 0 0 0 0
+ )
+ )
+ (tilemap
+ (z-pos 100)
+ (solid #f)
+ (width 40)
+ (height 19)
+ (tiles
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 131 0 0 0 0 0 0 0 0 0 0 0 0 0 131 131 131 131 131 131 131 131 131 131 131 131
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 131 0 0 0 0 0 0 0 0 0 0 0 0 0 131 131 131 131 131 131 131 131 131 131 131 131
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 131 0 0 0 0 0 0 0 0 0 0 0 0 0 131 131 131 131 131 131 131 131 131 131 131 131
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 131 0 0 0 0 0 0 0 0 0 0 0 0 0 131 131 131 131 131 131 131 131 131 131 131 131
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 131 0 0 0 0 0 0 0 0 0 0 0 0 0 131 131 131 131 131 131 131 131 131 131 131 131
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 131 0 0 0 0 0 0 0 0 0 0 0 0 0 131 131 131 131 131 131 131 131 131 131 131 131
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 131 0 0 0 0 0 0 0 0 0 0 0 0 0 131 131 131 131 131 131 131 131 131 131 131 131
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 131 0 0 0 0 0 0 0 0 0 0 0 0 0 131 131 131 131 131 131 131 131 131 131 131 131
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 131 0 0 0 0 0 0 0 0 0 0 0 0 0 131 131 131 131 131 131 131 131 131 131 131 131
+ 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 131 0 0 0 0 0 0 0 0 0 0 0 0 0 131 131 131 131 131 131 131 131 131 131 131 131
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 131 0 0 0 0 0 0 0 0 0 0 0 0 0 131 131 131 131 131 131 131 131 131 131 131 131
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 131 0 0 0 0 0 0 0 0 0 0 0 0 0 131 131 131 131 131 131 131 131 131 131 131 131
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 131 0 0 0 0 0 0 0 0 0 0 0 0 0 131 131 131 131 131 131 131 131 131 131 131 131
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 131 0 0 0 0 0 0 0 0 0 0 0 0 0 131 131 131 131 131 131 131 131 131 131 131 131
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 131 0 0 0 0 0 0 0 0 0 0 0 0 0 131 131 131 131 131 131 131 131 131 131 131 131
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 131 0 0 0 0 0 0 0 0 0 0 0 0 0 131 131 131 131 131 131 131 131 131 131 131 131
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 131 0 0 0 0 0 0 0 0 0 0 0 0 0 131 131 131 131 131 131 131 131 131 131 131 131
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 131 0 0 0 0 0 0 0 0 0 0 0 0 0 131 131 131 131 131 131 131 131 131 131 131 131
+ )
+ )
+ )
+)
--- /dev/null
+// $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 distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// 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.
+
+#include <config.h>
+
+#include <stdexcept>
+#include "decal.hpp"
+#include "camera.hpp"
+#include "video/drawing_context.hpp"
+#include "lisp/lisp.hpp"
+#include "lisp/writer.hpp"
+#include "object_factory.hpp"
+#include "resources.hpp"
+#include "main.hpp"
+#include "log.hpp"
+
+Decal::Decal(const lisp::Lisp& reader)
+ : layer(LAYER_OBJECTS)
+{
+ float px = 0;
+ float py = 0;
+ reader.get("x", px);
+ reader.get("y", py);
+ pos = Vector(px, py);
+
+ if(!reader.get("image", imagefile)) throw std::runtime_error("Must specify image for decal");
+ image.reset(new Surface(imagefile));
+
+ reader.get("layer", layer);
+}
+
+Decal::~Decal()
+{
+}
+
+void
+Decal::write(lisp::Writer& writer)
+{
+ writer.start_list("decal");
+ writer.write_float("x", pos.x);
+ writer.write_float("y", pos.y);
+ writer.write_string("image", imagefile);
+ writer.write_int("layer", layer);
+ writer.end_list("decal");
+}
+
+void
+Decal::update(float)
+{
+}
+
+void
+Decal::draw(DrawingContext& context)
+{
+ if(!image.get()) return;
+ context.draw_surface(image.get(), pos, layer);
+}
+
+IMPLEMENT_FACTORY(Decal, "decal");
+
--- /dev/null
+// $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 distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// 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"
+
+class DisplayManager;
+
+namespace lisp {
+class Lisp;
+}
+
+/**
+ * Non-interactive, decorative image
+ */
+class Decal : public GameObject, public Serializable
+{
+public:
+ Decal(const lisp::Lisp& 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 */
+};
+
+#endif /*SUPERTUX_DECAL_H*/
+