class
#include <ldtk_tileset_definition.h>
tileset_definition
Public functions
-
template<typename Enum>auto get_enum_tag(Enum value) -> const tileset_
enum_ tag& constexpr - Looks up the enum tag via the enum value.
-
auto find_custom_data(tile_
index tile_id) -> const tileset_ custom_ data* constexpr - Linear searches the custom data associated with the tile index.
- auto bg_item() const -> const bn::regular_bg_item& constexpr
- Background item (actual tileset data)
- auto tiles_count() const -> int constexpr
- Number of tiles this tileset has.
-
auto custom_data() const -> const bn::span<const tileset_
custom_ data>& constexpr - An array of custom tile metadata.
-
auto enum_tags() const -> const bn::span<const tileset_
enum_ tag>& constexpr - Tileset tags using Enum values specified by
tags_source_enum_id
.
This array contains 1 element per Enum value, which contains an array of all Tile IDs that are tagged with it. - auto identifier() const -> gen::tileset_ident constexpr
- User defined unique identifier.
- auto tags() const -> const bn::span<const gen::tileset_tag>& constexpr
- An array of user-defined tags to organize the Tilesets.
- auto tags_source_enum_id() const -> const bn::optional<bn::type_id_t>& constexpr
- Optional Enum definition ID used for this tileset meta-data.
- auto tile_grid_size() const -> int constexpr
- auto uid() const -> int constexpr
- Unique Intidentifier.
Function documentation
template<typename Enum>
const tileset_ enum_ tag& ldtk:: tileset_definition:: get_enum_tag(Enum value) constexpr
Looks up the enum tag via the enum value.
const tileset_ custom_ data* ldtk:: tileset_definition:: find_custom_data(tile_ index tile_id) constexpr
Linear searches the custom data associated with the tile index.
Returns | Pointer to the custom data, or nullptr if no custom data is associated with the tile index. |
---|