|
Aegis2D
Modular C++26 2D game engine for networked games
|
Image cut into tiles; its tiles are the global ids first_gid to first_gid + tile_count - 1.
More...
#include <aegis2d/render/tile_map.hpp>
Public Member Functions | |
| PixelRect | tile (std::uint32_t index) const |
| Rectangle of a tile in the image. | |
Public Attributes | |
| std::uint32_t | first_gid = 1 |
| Global id of its first tile. | |
| std::string | name {} |
| Name given in Tiled. | |
| std::filesystem::path | image {} |
| Image file, resolved from the folder of the file that names it. | |
| TextureSize | image_size {} |
| Size of the image. | |
| TextureSize | tile_size {} |
| Size of one tile. | |
| std::uint32_t | tile_count = 0 |
| Number of tiles. | |
| int | columns = 0 |
| Tiles per row. | |
| int | margin = 0 |
| Pixels around the tiles. | |
| int | spacing = 0 |
| Pixels between two tiles. | |
| TileProperties | properties {} |
| Custom properties. | |
Image cut into tiles; its tiles are the global ids first_gid to first_gid + tile_count - 1.
| PixelRect aegis2d::render::Tileset::tile | ( | std::uint32_t | index | ) | const |
Rectangle of a tile in the image.
| index | Tile number in this tileset, from 0 (gid - first_gid). |
| std::out_of_range | if index is not below tile_count. |
| int aegis2d::render::Tileset::columns = 0 |
Tiles per row.
| std::uint32_t aegis2d::render::Tileset::first_gid = 1 |
Global id of its first tile.
| std::filesystem::path aegis2d::render::Tileset::image {} |
Image file, resolved from the folder of the file that names it.
| TextureSize aegis2d::render::Tileset::image_size {} |
Size of the image.
| int aegis2d::render::Tileset::margin = 0 |
Pixels around the tiles.
| std::string aegis2d::render::Tileset::name {} |
Name given in Tiled.
| TileProperties aegis2d::render::Tileset::properties {} |
Custom properties.
| int aegis2d::render::Tileset::spacing = 0 |
Pixels between two tiles.
| std::uint32_t aegis2d::render::Tileset::tile_count = 0 |
Number of tiles.
| TextureSize aegis2d::render::Tileset::tile_size {} |
Size of one tile.