73 void set(std::size_t row, std::size_t col);
85 void unset(std::size_t row, std::size_t col);
98 [[nodiscard]]
bool get(std::size_t row, std::size_t col)
const;
110 [[nodiscard]]
const std::array<uint8_t, 8> &
rows()
const
116 std::array<uint8_t, tile::side_length_pix> rows_{};
134 for (
const uint8_t
byte : tm.rows()) {
Represents which pixels in an 8x8 tile are non-transparent.
const std::array< uint8_t, 8 > & rows() const
ShapeMask(const std::array< uint8_t, tile::side_length_pix > &rows)
Constructs a ShapeMask from an array of row data.
bool is_transparent() const
Checks if this entire ShapeMask is transparent.
ShapeMask flip(bool h, bool v) const
Returns a flipped version of this mask.
void unset(std::size_t row, std::size_t col)
Sets the bit at the specified row and column to 0.
bool get(std::size_t row, std::size_t col) const
Gets the bit value at the specified row and column.
auto operator<=>(const ShapeMask &) const =default
void set(std::size_t row, std::size_t col)
Sets the bit at the specified row and column to 1.
size_t operator()(const porytiles::ShapeMask &tm) const noexcept