/** resizes the tilemap to a new width and height (tries to not destroy the
* existing map)
*/
- void resize(int newwidth, int newheight);
+ void resize(int newwidth, int newheight, int fill_id = 0);
size_t get_width() const
{ return width; }
bool is_solid() const
{ return solid; }
+ /**
+ * Changes Tilemap's solidity, i.e. whether to consider it when doing collision detection.
+ */
+ void set_solid(bool solid = true);
+
/// returns tile in row y and column y (of the tilemap)
const Tile* get_tile(int x, int y) const;
/// returns tile at position pos (in world coordinates)
private:
TileManager* tilemanager;
bool solid;
- float speed;
+ float speed_x;
+ float speed_y;
int width, height;
int z_pos;
float x_offset;