mirror of
https://github.com/gbdev/rgbds.git
synced 2026-09-03 20:38:39 +00:00
Print correct color set limit value in error message
This commit is contained in:
+6
-7
@@ -1086,21 +1086,21 @@ void process() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// This color set is incomparable with all previous ones, so add it as a new one
|
// This color set is incomparable with all previous ones, so add it as a new one
|
||||||
attrs.colorSetID = colorSets.size();
|
|
||||||
if (colorSets.size() == AttrmapEntry::background) { // Check for overflow
|
if (colorSets.size() == AttrmapEntry::background) { // Check for overflow
|
||||||
fatal(
|
fatal("Cannot create more than %zu color sets", colorSets.size());
|
||||||
"Reached %zu color sets... sorry, this image is too much for me to handle :(",
|
|
||||||
AttrmapEntry::transparent
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
attrs.colorSetID = colorSets.size();
|
||||||
|
colorSets.push_back(colorSet);
|
||||||
|
|
||||||
if (checkVerbosity(VERB_DEBUG)) {
|
if (checkVerbosity(VERB_DEBUG)) {
|
||||||
fprintf(
|
fprintf(
|
||||||
stderr,
|
stderr,
|
||||||
"- Tile (%" PRIu32 ", %" PRIu32 ") adds color set #%zu: [",
|
"- Tile (%" PRIu32 ", %" PRIu32 ") adds color set #%zu: [",
|
||||||
tile.x,
|
tile.x,
|
||||||
tile.y,
|
tile.y,
|
||||||
colorSets.size()
|
attrs.colorSetID
|
||||||
);
|
);
|
||||||
for (uint16_t color : colorSet) {
|
for (uint16_t color : colorSet) {
|
||||||
fprintf(stderr, "$%04x, ", color);
|
fprintf(stderr, "$%04x, ", color);
|
||||||
@@ -1108,7 +1108,6 @@ void process() {
|
|||||||
fputs("]\n", stderr);
|
fputs("]\n", stderr);
|
||||||
}
|
}
|
||||||
|
|
||||||
colorSets.push_back(colorSet);
|
|
||||||
continue_visiting_tiles:;
|
continue_visiting_tiles:;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user