mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
@@ -322,6 +322,9 @@ static char *parseArgv(int argc, char *argv[]) {
|
||||
options.palSpecType = Options::EMBEDDED;
|
||||
} else if (strcasecmp(musl_optarg, "auto") == 0) {
|
||||
options.palSpecType = Options::NO_SPEC;
|
||||
} else if (strcasecmp(musl_optarg, "dmg") == 0) {
|
||||
options.palSpecType = Options::DMG;
|
||||
parseDmgPalSpec(0xE4); // Same darkest-first order as `sortGrayscale`
|
||||
} else if (strncasecmp(musl_optarg, "dmg=", literal_strlen("dmg=")) == 0) {
|
||||
options.palSpecType = Options::DMG;
|
||||
parseDmgPalSpec(&musl_optarg[literal_strlen("dmg=")]);
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user