Jazz2::Editor::TileRef struct

Reference to a tile of a level being edited.

A level file refers to tiles by a single ID: the tiles of the default tile set first, those of the extra tile sets after them, and the animated tiles from the top of the ID space down. Adding a tile set or an animation moves these IDs, so the editor refers to a tile by where it comes from instead, and the IDs are worked out only when the level is saved.

Public static variables

static std::uint8_t DefaultTileSet constexpr
Source of a tile of the default tile set.
static std::uint8_t LastExtraTileSet constexpr
Last source of a tile of an extra tile set, those use.
static std::uint8_t Raw constexpr
Source of a tile ID that doesn't refer to any known tile, it's kept as it is.
static std::uint8_t Animated constexpr
Source of an animated tile, Index is the index of the animation.

Public functions

auto IsEmpty() const -> bool constexpr
Returns true if it's the empty tile.
auto IsAnimated() const -> bool constexpr
Returns true if it's an animated tile.
auto operator==(const TileRef& other) const -> bool constexpr
auto operator!=(const TileRef& other) const -> bool constexpr

Public variables

std::uint16_t Index
Index of the tile within its source.
std::uint8_t Source
Where the tile comes from.
std::uint8_t Flags
Flags as the file stores them (see Formats::TileRecord).

Variable documentation

static std::uint8_t Jazz2::Editor::TileRef::LastExtraTileSet constexpr

Last source of a tile of an extra tile set, those use.

1 + index of the tile set