66 return hardware_index_ == other.hardware_index_;
71 return hardware_index_ <=> other.hardware_index_;
76 return hardware_index_;
88 return occupied_slots_;
93 return available_capacity_;
98 return available_capacity_ == 0;
118 std::size_t hardware_index_;
120 std::size_t available_capacity_;
121 std::size_t occupied_slots_;
A set of colors represented as a bitset.
Pre-assigned palette with wildcard support for palette packing.
std::size_t fixed_color_count() const
static PrefilledPalette fully_locked(std::size_t hardware_index, ColorSet color_set, std::size_t occupied_slots)
Creates a fully locked PrefilledPalette.
std::strong_ordering operator<=>(const PrefilledPalette &other) const
std::size_t hardware_index() const
bool is_fully_locked() const
std::size_t available_capacity() const
bool can_accommodate(const ColorSet &tile_colors) const
Checks if a tile's colors can be accommodated by this palette.
std::size_t occupied_slots() const
bool operator==(const PrefilledPalette &other) const
static PrefilledPalette partially_locked(std::size_t hardware_index, ColorSet fixed_colors, std::size_t occupied_slots, std::size_t total_capacity=pal::max_size - 1)
Creates a partially locked palette with available capacity.
const ColorSet & fixed_colors() const
constexpr std::size_t max_size