You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
592 B
31 lines
592 B
9 years ago
|
#pragma once
|
||
|
#include "Tile.h"
|
||
|
#include <SFML/System/Vector2.hpp>
|
||
|
|
||
|
class Map {
|
||
|
public:
|
||
9 years ago
|
// Width and height of the map in individual cells
|
||
9 years ago
|
static const int CELLS_HEIGHT = 153;
|
||
|
static const int CELLS_WIDTH = 319;
|
||
|
|
||
9 years ago
|
// Constructors
|
||
9 years ago
|
Map();
|
||
|
~Map();
|
||
|
|
||
9 years ago
|
// Get the tile at the specified position, overloaded
|
||
9 years ago
|
Tile* getTile(sf::Vector2i position);
|
||
|
Tile* getTile(int x_, int y_);
|
||
9 years ago
|
|
||
9 years ago
|
bool isTileSolid(sf::Vector2i);
|
||
9 years ago
|
|
||
|
// completely replaces the data at the specified position
|
||
|
void overwriteTile(sf::Vector2i position, Tile* data);
|
||
9 years ago
|
|
||
|
private:
|
||
|
void Init();
|
||
|
|
||
9 years ago
|
// Data
|
||
9 years ago
|
Tile* tileArray[319][153];
|
||
|
};
|
||
|
|