91 std::vector<PackedPalette>
pals_;
134 [[nodiscard]]
virtual std::string
name()
const = 0;
A result type that maintains a chainable sequence of errors for debugging and error reporting.
Abstract interface for palette packing algorithms.
virtual ChainableResult< PackingOutput > pack(const PackingInput &input) const =0
Packs tile colors into palettes according to the strategy's algorithm.
virtual std::string name() const =0
Returns the human-readable name of this strategy.
virtual ~PackingStrategy()=default
Manages allocation of hardware palette indexes with stack-based checkout semantics.
constexpr std::size_t max_size
The final palette assignments after a successful packing operation.
std::map< PackableTile::Id, std::size_t > tile_to_pal_
Maps tile IDs to their assigned hardware palette indices.
std::vector< PackedPalette > pals_
The packed palettes with their colors and assigned tiles.