70 std::vector<PixelTile<IndexPixel>>
tiles;
95 gsl::not_null<const UserDiagnostics *> diag, gsl::not_null<const TilePrinter *> tile_printer);
116 const std::string &anim_name,
119 const Rgba32 &extrinsic_transparency,
Service that mangles duplicate key frame tiles to make them unique.
ChainableResult< MangleResult > mangle_duplicates(const std::string &anim_name, std::vector< PixelTile< IndexPixel > > tiles, const std::vector< const Palette< Rgba32, pal::max_size > * > &palettes, const Rgba32 &extrinsic_transparency, const std::set< PixelTile< IndexPixel > > &existing_tiles) const
Mangles duplicate tiles to make them unique.
virtual ~AnimKeyFrameMangler()=default
A result type that maintains a chainable sequence of errors for debugging and error reporting.
Represents an indexed color pixel.
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.
Represents a 32-bit RGBA color.
A collection of printer functions for various tile types.
Abstract class for structured error reporting and diagnostic output.
Result of the mangling operation.
std::set< TileMangleRecord > mangle_records
Record of all modifications made (ordered by tile_index)
std::vector< PixelTile< IndexPixel > > tiles
The tiles after mangling (unique)
A single pixel modification within a tile.
std::size_t pixel_index
Which pixel in the tile (0-63, linear index)
IndexPixel mangled_pixel
The pixel value after mangling.
IndexPixel original_pixel
The pixel value before mangling.
Record of all pixel modifications made to a single tile during mangling.
std::size_t tile_index
Which tile in the key frame (0-based index, unique across records)
friend bool operator==(const TileMangleRecord &lhs, const TileMangleRecord &rhs)
friend auto operator<=>(const TileMangleRecord &lhs, const TileMangleRecord &rhs)
Orders records by tile_index, enabling storage in std::set to enforce the non-overlapping invariant.
std::vector< PixelMangleChange > pixel_changes
One or more pixel modifications applied to this tile.