mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Implement max palette count
This commit is contained in:
@@ -937,6 +937,11 @@ contained:;
|
||||
}
|
||||
}
|
||||
|
||||
if (palettes.size() > options.nbPalettes) {
|
||||
// If the palette generation is wrong, other (dependee) operations are likely to be nonsensical, so fatal-error outright
|
||||
fatal("Generated %zu palettes, over the maximum of %" PRIu8, palettes.size(), options.nbPalettes);
|
||||
}
|
||||
|
||||
if (!options.palettes.empty()) {
|
||||
outputPalettes(palettes);
|
||||
}
|
||||
|
||||
@@ -333,7 +333,7 @@ int main(int argc, char *argv[]) {
|
||||
}
|
||||
break;
|
||||
case 'n':
|
||||
options.nbPalettes = 0; // TODO
|
||||
options.nbPalettes = parseNumber(arg, "Number of palettes", 8);
|
||||
break;
|
||||
case 'o':
|
||||
options.output = musl_optarg;
|
||||
|
||||
Reference in New Issue
Block a user