![]() |
Gamedev Framework (gf)
0.10.0
A C++14 framework for 2D games
|
A set of tiles in a single file (image or TSX file) More...
#include <gf/Tmx.h>
Public Member Functions | |
const TmxTile * | getTile (unsigned id) const noexcept |
Get the tile corresponding to an id. More... | |
RectU | getSubTexture (unsigned id, Vector2u size) const noexcept |
Get the rectangle of a tile corresponding to an id. More... | |
Public Attributes | |
TmxProperties | properties |
The properties of the tileset. More... | |
unsigned | firstGid |
The first global id of the tileset. More... | |
std::string | name |
The name of the tileset. More... | |
Vector2u | tileSize |
The size of the tileset. More... | |
unsigned | spacing |
The spacing between tiles (in pixels) More... | |
unsigned | margin |
The margin around tiles (in pixels) More... | |
unsigned | tileCount |
The number of tiles. More... | |
unsigned | columnCount |
The number of columns. More... | |
Vector2i | offset |
The offset of the tileset. More... | |
std::unique_ptr< TmxImage > | image |
The image of the tileset. More... | |
std::vector< TmxTerrain > | terrains |
The terrains of the tileset. More... | |
std::vector< TmxTile > | tiles |
The tiles of the tileset. More... | |
A set of tiles in a single file (image or TSX file)
Get the rectangle of a tile corresponding to an id.
id | The id of the tile |
size | The size of the image corresponding to the tile |
|
noexcept |
Get the tile corresponding to an id.
id | The id of the tile |
unsigned gf::TmxTileset::columnCount |
The number of columns.
unsigned gf::TmxTileset::firstGid |
The first global id of the tileset.
std::unique_ptr<TmxImage> gf::TmxTileset::image |
The image of the tileset.
unsigned gf::TmxTileset::margin |
The margin around tiles (in pixels)
std::string gf::TmxTileset::name |
The name of the tileset.
Vector2i gf::TmxTileset::offset |
The offset of the tileset.
TmxProperties gf::TmxTileset::properties |
The properties of the tileset.
unsigned gf::TmxTileset::spacing |
The spacing between tiles (in pixels)
std::vector<TmxTerrain> gf::TmxTileset::terrains |
The terrains of the tileset.
unsigned gf::TmxTileset::tileCount |
The number of tiles.
std::vector<TmxTile> gf::TmxTileset::tiles |
The tiles of the tileset.
Vector2u gf::TmxTileset::tileSize |
The size of the tileset.