mirror of
https://github.com/gbdev/rgbds.git
synced 2026-09-23 22:27:06 +00:00
Factor out verboseDo to encapsulate magenta output color
This commit is contained in:
+2
-5
@@ -16,7 +16,6 @@
|
||||
|
||||
#include "diagnostics.hpp"
|
||||
#include "helpers.hpp"
|
||||
#include "style.hpp"
|
||||
#include "verbosity.hpp"
|
||||
|
||||
#include "gfx/rgba.hpp"
|
||||
@@ -158,15 +157,13 @@ Png::Png(char const *filename, std::streambuf &file) {
|
||||
);
|
||||
}
|
||||
|
||||
if (checkVerbosity(VERB_INFO)) {
|
||||
style_Set(stderr, STYLE_MAGENTA, false);
|
||||
verboseDo(VERB_INFO, [&]() {
|
||||
fprintf(stderr, "Embedded PNG palette has %d colors: [", nbColors);
|
||||
for (int i = 0; i < nbColors; ++i) {
|
||||
fprintf(stderr, "%s#%08x", i > 0 ? ", " : "", palette[i].toCSS());
|
||||
}
|
||||
fprintf(stderr, "]\n");
|
||||
style_Reset(stderr);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
verbosePrint(VERB_INFO, "No embedded PNG palette\n");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user