Jazz2/Editor/Imaging/TileMasks.h file

Namespaces

namespace Jazz2
Root namespace of Jazz² Resurrection.
namespace Jazz2::Editor
namespace Jazz2::Editor::TileMasks
Collision masks of tiles packed a bit per pixel, as tile sets store them.

Functions

auto GetBit(const std::uint8_t* bits, std::int32_t index) -> bool
Returns whether a pixel of a packed mask is solid.
void SetBit(std::uint8_t* bits, std::int32_t index)
Makes a pixel of a packed mask solid.
void Pack(const std::uint8_t* values, std::uint8_t* bits)
Packs a mask of a tile, a byte per pixel (anything but 0 is solid), into BytesPerTile bytes.
void Unpack(const std::uint8_t* bits, std::uint8_t* values)
Unpacks a mask of a tile into a byte per pixel, 1 for solid, 0 otherwise.

Variables

std::int32_t PixelCount constexpr
Pixels of a tile.
std::int32_t BytesPerTile constexpr
Bytes of a packed mask of a tile.