27 panic(
"unhandled LayerMode value");
66 return metatiles_bin_;
71 return metatile_attributes_;
90 std::vector<TilemapEntry> metatiles_bin_;
91 std::vector<MetatileAttribute> metatile_attributes_;
A result type that maintains a chainable sequence of errors for debugging and error reporting.
A template for two-dimensional images with arbitrarily typed pixel values.
A palette container for colors that support transparency checking.
void push_back_tilemap_entry(TilemapEntry entry)
Add a TilemapEntry to the end of the entry vector.
void set_pal(Palette< Rgba32 > pal, unsigned int pal_index)
PorymapTilesetComponent()=default
const std::vector< TilemapEntry > & metatiles_bin() const
const std::array< Palette< Rgba32 >, pal::num_pals > & pals() const
ChainableResult< tileset::LayerMode > detect_layer_mode() const
void tiles_png(const Image< IndexPixel > &tiles_png)
void push_back_attribute(MetatileAttribute attribute)
Add a MetatileAttribute to the end of the attribute vector.
const Image< IndexPixel > & tiles_png() const
const Palette< Rgba32 > & pal_at(unsigned int pal_index) const
const std::vector< MetatileAttribute > & metatile_attributes_bin() const
Represents a tilemap entry referencing a tile with palette and flip attributes.
constexpr std::size_t num_pals
std::string to_string(LayerMode mode)
void panic(const StringViewSourceLoc &s)
Unconditionally terminates the program with a panic message.