+
+ void set(int width, int height, const std::vector<unsigned int>& vec,
+ int layer, bool solid);
+
+ /** resizes the tilemap to a new width and height (tries to not destroy the
+ * existing map)
+ */
+ void resize(int newwidth, int newheight);
+
+ /** Flip the all tile map vertically. The purpose of this is to let
+ player to play the same level in a different way :) */
+ void do_vertical_flip();
+
+ size_t get_width() const
+ { return width; }
+
+ size_t get_height() const
+ { return height; }
+
+ int get_layer() const
+ { return layer; }
+
+ bool is_solid() const
+ { return solid; }
+
+ TileId& get_tile_id_at(const Vector& pos);
+
+ /// returns tile in row y and column y (of the tilemap)
+ Tile* get_tile(int x, int y) const;
+ /// returns tile at position pos (in world coordinates)
+ Tile* get_tile_at(const Vector& pos) const;
+
+ void change(int x, int y, unsigned int newtile);
+
+ void change_at(const Vector& pos, unsigned int newtile);
+
+private:
+ std::vector<TileId> tiles;