Represents the tile distrubution for a level.
More...
#include <TileMap.h>
|
| | TileMap (const std::string &mapPath_) |
| | The constructor. More...
|
| |
|
| ~TileMap () |
| | The destructor.
|
| |
| void | render (const double cameraX_, const double cameraY_) |
| | Renders the TileMap. More...
|
| |
|
unsigned int | getMapWidth () |
| |
|
unsigned int | getMapHeight () |
| |
|
std::vector< SDL_Rect > & | getCollisionRects () |
| |
|
std::vector< std::vector< int > > & | operator[] (int i) |
| | Returns a reference to the tile index at #x #y #z.
|
| |
|
|
void | load (const std::string &mapPath_) |
| |
|
void | addTileSet (const std::string &path_) |
| |
| void | renderLayer (const double cameraX_, const double cameraY_, const unsigned int layer_) |
| | Renders a certain layer from the TileMap. More...
|
| |
|
|
Tmx::Map * | map |
| |
|
unsigned int | layers |
| |
|
unsigned int | mapWidth |
| |
|
unsigned int | mapHeight |
| |
std::vector< std::vector
< std::vector< int > > > | tileMatrix |
| | Three-dimensional
matrix, that contains x = width, y = height, z = layers
|
| |
|
std::vector< Sprite * > | tilesetSprites |
| |
|
std::vector< SDL_Rect > | collisionRects |
| |
Represents the tile distrubution for a level.
- Todo:
- Revise Tile placement implementation.
| TileMap::TileMap |
( |
const std::string & |
mapPath_) | |
|
The constructor.
- Parameters
-
| mapPath_ | : Path to the desired Tiled map. |
| void TileMap::render |
( |
const double |
cameraX_, |
|
|
const double |
cameraY_ |
|
) |
| |
Renders the TileMap.
- Parameters
-
| cameraX_ | : The x position of the camera. |
| cameraY_ | : The y position of the camera. |
| void TileMap::renderLayer |
( |
const double |
cameraX_, |
|
|
const double |
cameraY_, |
|
|
const unsigned int |
layer_ |
|
) |
| |
|
private |
Renders a certain layer from the TileMap.
- Parameters
-
| cameraX_ | : The x position of the camera. |
| cameraY_ | : The y position of the camera. |
The documentation for this class was generated from the following files:
- /home/caio/Git/Dauphine/include/TileMap.h
- /home/caio/Git/Dauphine/src/TileMap.cpp