Format CGB colors in error/verbose messages as "GB:rr,gg,bb"

These should be more debuggable than packed "$xxxx" format.
This commit is contained in:
Rangi
2026-07-14 10:34:27 -04:00
committed by Rangi
parent 7e2a3491a5
commit 9a15b723f2
8 changed files with 79 additions and 72 deletions
+7 -5
View File
@@ -260,12 +260,14 @@ static void verboseOutputAssignments(
) {
verboseDo(VERB_INFO, [&]() {
for (AssignedSets const &assignment : assignments) {
fputs("{ ", stderr);
fputs("- { ", stderr);
for (ColorSetAttrs const &attrs : assignment) {
fprintf(stderr, "[%zu] ", attrs.colorSetIndex);
for (uint16_t colorIndex : colorSets[attrs.colorSetIndex]) {
fprintf(stderr, "%04" PRIx16 ", ", colorIndex);
}
fprintf(
stderr,
"[%zu] %s ",
attrs.colorSetIndex,
listCGBColors(colorSets[attrs.colorSetIndex]).c_str()
);
}
fprintf(stderr, "} (volume = %zu)\n", assignment.volume());
}