51 return anims_.contains(
name);
56 return anims_.at(
name);
61 return metatiles_bin_;
66 return metatiles_bin_;
71 metatiles_bin_ = new_entries;
76 return metatile_attributes_;
94 [[nodiscard]]
const std::map<std::string, Animation<IndexPixel>> &
anims()
const
99 [[nodiscard]] std::map<std::string, Animation<IndexPixel>> &
anims()
105 std::vector<TilemapEntry> metatiles_bin_;
106 std::vector<MetatileAttribute> metatile_attributes_;
109 std::map<std::string, Animation<IndexPixel>> anims_;
A complete tileset animation with name, configuration, and frame data.
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 generic palette container for colors that support transparency checking.
const std::map< std::string, Animation< IndexPixel > > & anims() const
void tiles_png(const Image< IndexPixel > &tiles_png)
PorymapTilesetComponent()
const std::vector< TilemapEntry > & metatiles_bin() const
const Animation< IndexPixel > & anim_for_name(const std::string &name) const
const Palette< Rgba32, palette::max_size > & palette_at(std::size_t palette_index) const
ChainableResult< LayerMode > detect_layer_mode() const
void metatiles_bin(const std::vector< TilemapEntry > &new_entries)
bool has_anim(const std::string &name) const
void add_anim(Animation< IndexPixel > anim)
std::map< std::string, Animation< IndexPixel > > & anims()
const std::vector< MetatileAttribute > & metatile_attributes_bin() const
void set_palette(std::size_t palette_index, Palette< Rgba32, palette::max_size > palette)
void push_back_tilemap_entry(TilemapEntry entry)
Add a TilemapEntry to the end of the entry vector.
void push_back_attribute(MetatileAttribute attribute)
Add a MetatileAttribute to the end of the attribute vector.
const Image< IndexPixel > & tiles_png() const
std::vector< TilemapEntry > & metatiles_bin()
const std::array< Palette< Rgba32, palette::max_size >, palette::num_palettes > & palettes() const
Represents a tilemap entry referencing a tile with palette and flip attributes.
constexpr std::size_t num_palettes