53 [[nodiscard]]
bool has_anim(
const std::string &name)
const
55 return anims_.contains(name);
60 return anims_.at(name);
65 return metatiles_bin_;
70 return metatiles_bin_;
75 metatiles_bin_ = new_entries;
80 return metatile_attributes_;
98 [[nodiscard]]
const std::map<std::string, Animation<IndexPixel>> &
anims()
const
103 [[nodiscard]] std::map<std::string, Animation<IndexPixel>> &
anims()
109 std::vector<TilemapEntry> metatiles_bin_;
110 std::vector<MetatileAttribute> metatile_attributes_;
112 std::array<Palette<Rgba32, pal::max_size>,
pal::num_pals> pals_;
113 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::array< Palette< Rgba32, pal::max_size >, pal::num_pals > & pals() const
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
ChainableResult< LayerMode > detect_layer_mode() const
const Palette< Rgba32, pal::max_size > & pal_at(std::size_t pal_index) 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 push_back_tilemap_entry(TilemapEntry entry)
Add a TilemapEntry to the end of the entry vector.
void set_pal(std::size_t pal_index, Palette< Rgba32, pal::max_size > pal)
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()
Represents a tilemap entry referencing a tile with palette and flip attributes.
constexpr std::size_t num_pals