mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-21 18:52:07 +00:00
Use inttypes for stdint types
This should help make RGBDS portable to systems with 16-bit integers, like DOS. For kicks, use the macros for 16-bit and 8-bit integers. Fix other miscellaneous things, like #include ordering and other printf-format related things. Reduce repitition in math.c while I'm there.
This commit is contained in:
@@ -210,7 +210,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (opts.trim &&
|
||||
opts.trim > (raw_image->width / 8) * (raw_image->height / 8) - 1) {
|
||||
errx(1, "Trim (%i) for input raw_image file '%s' too large (max: %i)",
|
||||
errx(1, "Trim (%d) for input raw_image file '%s' too large (max: %u)",
|
||||
opts.trim, opts.infile,
|
||||
(raw_image->width / 8) * (raw_image->height / 8) - 1);
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ struct RawIndexedImage *input_png_file(const struct Options *opts,
|
||||
|
||||
if (img.depth != depth) {
|
||||
if (opts->verbose) {
|
||||
warnx("Image bit depth is not %i (is %i).",
|
||||
warnx("Image bit depth is not %d (is %d).",
|
||||
depth, img.depth);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user