33template <SupportsTransparency PixelType>
52 frame_name_ = std::move(name);
55 [[nodiscard]]
const std::vector<PixelTile<PixelType>> &
tiles()
const
62 tiles_ = std::move(t);
67 tiles_.push_back(std::move(tile));
78 return tiles_.at(index);
83 return palette_.has_value();
88 return palette_.value();
93 palette_ = std::move(pal);
101 std::string frame_name_;
102 std::vector<PixelTile<PixelType>> tiles_;
103 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 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
void palette(Palette< Rgba32 > pal)
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.