Support rgbgfx -c dmg to imply -c dmg=e4

Fixes #1776
This commit is contained in:
Rangi42
2025-08-05 14:18:25 -04:00
parent 504a45a4ed
commit a3983b7b0f
5 changed files with 21 additions and 3 deletions

View File

@@ -692,7 +692,11 @@ void parseDmgPalSpec(char const * const rawArg) {
return;
}
options.palSpecDmg = toHex(arg[0], arg[1]);
parseDmgPalSpec(toHex(arg[0], arg[1]));
}
void parseDmgPalSpec(uint8_t palSpecDmg) {
options.palSpecDmg = palSpecDmg;
// Map gray shades to their DMG color indexes for fast lookup by `Rgba::grayIndex`
for (uint8_t i = 0; i < 4; ++i) {