31template <SupportsTransparency PixelType>
50 frame_name_ = std::move(
name);
53 [[nodiscard]]
const std::vector<PixelTile<PixelType>> &
tiles()
const
60 tiles_ = std::move(t);
65 tiles_.push_back(std::move(tile));
76 return tiles_.at(index);
81 return palette_.has_value();
86 return palette_.value();
97 std::string frame_name_;
98 std::vector<PixelTile<PixelType>> tiles_;
99 std::optional<Palette<Rgba32>> palette_;
Represents a single frame of an animation, containing tiles and a frame name.
void add_tile(PixelTile< PixelType > tile)
const Palette< Rgba32 > & palette() const
AnimFrame(std::string frame_name, std::vector< PixelTile< PixelType > > tiles)
void palette(Palette< Rgba32 > palette)
void tiles(std::vector< PixelTile< PixelType > > t)
void frame_name(std::string name)
const PixelTile< PixelType > & tile_at(std::size_t index) const
const std::string & frame_name() const
std::size_t tile_count() const
const std::vector< PixelTile< PixelType > > & tiles() const
AnimFrame(std::string frame_name)
A generic palette container for colors that support transparency checking.
An 8x8 tile backed by literal-array-based per-pixel storage of an arbitrary pixel type.