Jazz2::Tiles::TileSet class

Represents tile set used by tile map, consists of texture and collision mask.

Public static variables

static std::int32_t DefaultTileSize constexpr
Size of a tile.

Constructors, destructors, conversion operators

TileSet(std::uint16_t tileCount, std::unique_ptr<Texture> textureDiffuse, std::unique_ptr<std::uint8_t[]> mask, std::uint32_t maskSize, std::unique_ptr<Color[]> captionTile)

Public functions

auto GetTileMask(std::int32_t tileId) const -> std::uint8_t*
Returns mask for specified tile.
auto IsTileMaskEmpty(std::int32_t tileId) const -> bool
Returns true if the mask of a tile is completely empty.
auto IsTileMaskFilled(std::int32_t tileId) const -> bool
Returns true if the mask of a tile is completely filled (non-empty)
auto IsTileFilled(std::int32_t tileId) const -> bool
Returns true if the texture of a tile is completely opaque (non-transparent)
auto GetCaptionTile() const -> StaticArrayView<DefaultTileSize*DefaultTileSize, Color>
Returns a caption tile.

Public variables

std::unique_ptr<Texture> TextureDiffuse
Main (diffuse) texture.
std::int32_t TileCount
Total number of tiles.
std::int32_t TilesPerRow
Number of tiles per row.