-// $Id$
-//
// SuperTux
// Copyright (C) 2006 Matthias Braun <matze@braunis.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_TILEMAP_H
-#define SUPERTUX_TILEMAP_H
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
-#include <vector>
-#include <stdint.h>
-#include <string>
+#ifndef HEADER_SUPERTUX_OBJECT_TILEMAP_HPP
+#define HEADER_SUPERTUX_OBJECT_TILEMAP_HPP
-#include "game_object.hpp"
-#include "serializable.hpp"
-#include "math/vector.hpp"
-#include "video/drawing_context.hpp"
-#include "object/path.hpp"
#include "object/path_walker.hpp"
-#include "script_interface.hpp"
+#include "supertux/game_object.hpp"
+#include "supertux/script_interface.hpp"
+#include "video/drawing_context.hpp"
namespace lisp {
class Lisp;
/**
* This class is responsible for drawing the level tiles
*/
-class TileMap : public GameObject, public Serializable, public ScriptInterface
+class TileMap : public GameObject,
+ public ScriptInterface
{
public:
TileMap(const TileSet *tileset);
- TileMap(const lisp::Lisp& reader);
+ TileMap(const Reader& reader);
TileMap(const TileSet *tileset, std::string name, int z_pos, bool solid_,
size_t width_, size_t height_);
virtual ~TileMap();
- virtual void write(lisp::Writer& writer);
-
virtual void update(float elapsed_time);
virtual void draw(DrawingContext& context);
virtual void unexpose(HSQUIRRELVM vm, SQInteger table_idx);
void set(int width, int height, const std::vector<unsigned int>& vec,
- int z_pos, bool solid);
+ int z_pos, bool solid);
/** resizes the tilemap to a new width and height (tries to not destroy the
* existing map)
std::auto_ptr<PathWalker> walker;
DrawingContext::Target draw_target; /**< set to LIGHTMAP to draw to lightmap */
+
+private:
+ TileMap(const TileMap&);
+ TileMap& operator=(const TileMap&);
};
#endif /*SUPERTUX_TILEMAP_H*/
+
+/* EOF */