Implement -c embedded:multiple (#2194)

This commit is contained in:
Rangi authored and GitHub committed 2026-10-03 19:26:02 +02:00
1 parent c592d665a8
commit ffa32a94e8
12 files changed
+66 -3

No files matched your search

+4
View File
@@ -28,6 +28,7 @@ struct Options {
INLINE,
EXTERNAL,
EMBEDDED,
EMBEDDED_MULTIPLE,
DMG,
} palSpecType = NO_SPEC; // -c
std::vector<std::array<std::optional<Rgba>, 4>> palSpec{};
@@ -61,6 +62,9 @@ struct Options {
uint16_t maxNbColors() const { return nbColorsPerPal * nbPalettes; }
bool hasExplicitPalSpec() const { return palSpecType == INLINE || palSpecType == EXTERNAL; }
bool hasEmbeddedPalSpec() const {
return palSpecType == EMBEDDED || palSpecType == EMBEDDED_MULTIPLE;
}
uint8_t dmgColors[4] = {};
uint8_t dmgValue(uint8_t i) const {
+1
View File
@@ -10,6 +10,7 @@
void parseInlinePalSpec(char const * const rawArg);
void parseEmbeddedPalSpec(Png const &png);
void parseEmbeddedMultiplePalSpec(Png const &png);
void parseExternalPalSpec(char const *arg);
void parseDmgPalSpec(char const * const rawArg);
void parseBackgroundPalSpec(char const *arg);