You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-09-08 08:13:02 -07:00
Use an error_exit macro for tools
This commit is contained in:
@@ -7,8 +7,7 @@ void usage() {
|
||||
uint8_t read_dimensions(const char *filename) {
|
||||
uint32_t width_px = read_png_width_verbose(filename);
|
||||
if (width_px != 40 && width_px != 48 && width_px != 56) {
|
||||
fprintf(stderr, "Not a valid width for \"%s\": %" PRIu32 " px\n", filename, width_px);
|
||||
exit(1);
|
||||
error_exit("Not a valid width for \"%s\": %" PRIu32 " px\n", filename, width_px);
|
||||
}
|
||||
uint8_t width_tiles = (uint8_t)(width_px / 8);
|
||||
return (width_tiles << 4) | width_tiles;
|
||||
|
||||
Reference in New Issue
Block a user