![]() |
Gamedev Framework (gf) 1.2.0
A C++17 framework for 2D games
|
A TMX map. More...
#include <gf/Tmx.h>
Public Member Functions | |
const TmxTileset * | getTileSetFromGID (uint32_t gid) const noexcept |
Get the tileset corresponding to a global id. More... | |
void | visitLayers (TmxVisitor &visitor) const |
Visit the layers with a visitor. More... | |
bool | loadFromFile (const Path &filename) |
Load a TMX file. More... | |
Public Attributes | |
TmxProperties | properties |
The properties of the map. More... | |
std::string | version |
The version of the map. More... | |
std::string | tiledVersion |
The tiled version of the map. More... | |
CellOrientation | orientation |
The orientation of the map. More... | |
TmxRenderOrder | renderOrder |
The render order of the map. More... | |
bool | infinite |
Is the map infinite? More... | |
Vector2i | mapSize |
The size of the map. More... | |
Vector2i | tileSize |
The size of the tiles. More... | |
int | hexSideLength |
The length of the side for hexagonal map. More... | |
CellAxis | cellAxis |
The stagger axis for hexagonal map. More... | |
CellIndex | cellIndex |
The stagger index for hexagonal map. More... | |
Color4u | backgroundColor |
The background color. More... | |
int | nextObjectId |
The next object id. More... | |
std::vector< TmxTileset > | tilesets |
The tilesets used in the map. More... | |
std::vector< std::unique_ptr< TmxLayer > > | layers |
The layers of the map. More... | |
A TMX map.
|
noexcept |
Get the tileset corresponding to a global id.
gid | A global id |
bool gf::TmxLayers::loadFromFile | ( | const Path & | filename | ) |
Load a TMX file.
filename | The name of the TMX file |
void gf::TmxLayers::visitLayers | ( | TmxVisitor & | visitor | ) | const |
Visit the layers with a visitor.
visitor | the visitor |
Color4u gf::TmxLayers::backgroundColor |
The background color.
CellAxis gf::TmxLayers::cellAxis |
The stagger axis for hexagonal map.
CellIndex gf::TmxLayers::cellIndex |
The stagger index for hexagonal map.
int gf::TmxLayers::hexSideLength |
The length of the side for hexagonal map.
bool gf::TmxLayers::infinite |
Is the map infinite?
std::vector<std::unique_ptr<TmxLayer> > gf::TmxLayers::layers |
The layers of the map.
Vector2i gf::TmxLayers::mapSize |
The size of the map.
int gf::TmxLayers::nextObjectId |
The next object id.
CellOrientation gf::TmxLayers::orientation |
The orientation of the map.
TmxProperties gf::TmxLayers::properties |
The properties of the map.
TmxRenderOrder gf::TmxLayers::renderOrder |
The render order of the map.
std::string gf::TmxLayers::tiledVersion |
The tiled version of the map.
std::vector<TmxTileset> gf::TmxLayers::tilesets |
The tilesets used in the map.
Vector2i gf::TmxLayers::tileSize |
The size of the tiles.
std::string gf::TmxLayers::version |
The version of the map.