From: Trent Huber Date: Fri, 25 Jul 2025 17:30:35 +0000 (-0400) Subject: Updated build file formatting X-Git-Url: https://trenthuber.com/code?a=commitdiff_plain;h=b07db018b70ab42cb26503a9509f20b2dd342359;p=xpmview.git Updated build file formatting --- diff --git a/external/build.c b/external/build.c index 2633ded..15141c5 100644 --- a/external/build.c +++ b/external/build.c @@ -40,20 +40,18 @@ void buildcbs(void) { } void buildraylib(void) { - buildfiles((struct cbsfile []){ - {RLLIB, LLRAYLIB, LIBTYPE}, + buildfiles((struct cbsfile []){{RLLIB, LLRAYLIB, LIBTYPE}, - {RLSRC "raudio", LIST(CFGENERAL)}, - {RLSRC "rcore", LIST(CFGLFW, CFGENERAL)}, - {RLSRC "rglfw", LIST(CFGLFW, CFGRAPHICS, CFGENERAL)}, - {RLSRC "rmodels", LIST(CFGENERAL)}, - {RLSRC "rshapes", LIST(CFGENERAL)}, - {RLSRC "rtext", LIST(CFGENERAL)}, - {RLSRC "rtextures", LIST(CFGENERAL)}, - {RLSRC "utils", LIST(CFGENERAL)}, + {RLSRC "raudio", LIST(CFGENERAL)}, + {RLSRC "rcore", LIST(CFGLFW, CFGENERAL)}, + {RLSRC "rglfw", LIST(CFGLFW, CFGRAPHICS, CFGENERAL)}, + {RLSRC "rmodels", LIST(CFGENERAL)}, + {RLSRC "rshapes", LIST(CFGENERAL)}, + {RLSRC "rtext", LIST(CFGENERAL)}, + {RLSRC "rtextures", LIST(CFGENERAL)}, + {RLSRC "utils", LIST(CFGENERAL)}, - {NULL} - }); + {NULL}}); } int main(void) { diff --git a/src/build.c b/src/build.c index 9d00289..b7d3afd 100644 --- a/src/build.c +++ b/src/build.c @@ -114,19 +114,17 @@ int main(void) { buildcolors(); buildfont(); - buildfiles((struct cbsfile []){ - {"../bin/simplexpm", LLRAYLIB, 'x'}, + buildfiles((struct cbsfile []){{"../bin/simplexpm", LLRAYLIB, 'x'}, - {"colors", NONE}, - {"main", CLRAYLIB}, - {"options", NONE}, - {"xpm", CLRAYLIB}, + {"colors", NONE}, + {"main", CLRAYLIB}, + {"options", NONE}, + {"xpm", CLRAYLIB}, - {CBSLIB}, - {RLLIB}, + {CBSLIB}, + {RLLIB}, - {NULL} - }); + {NULL}}); return EXIT_SUCCESS; } diff --git a/src/main.c b/src/main.c index d1d4ba7..17173e7 100644 --- a/src/main.c +++ b/src/main.c @@ -91,17 +91,12 @@ int main(int argc, char **argv) { scale = width * texture->height > height * texture->width ? (float)height / texture->height : (float)width / texture->width; - pos = CLITERAL(Vector2){ - (width - texture->width * scale) / 2, - (height - texture->height * scale) / 2, - }; + pos = CLITERAL(Vector2){(width - texture->width * scale) / 2, + (height - texture->height * scale) / 2}; DrawTextureEx(*texture, pos, 0, scale, WHITE); } else { dim = MeasureTextEx(font, xpm ? error : welcome, font.baseSize, 0); - pos = (Vector2){ - .x = (width - dim.x) / 2, - .y = (height - dim.y) / 2, - }; + pos = CLITERAL(Vector2){(width - dim.x) / 2, (height - dim.y) / 2}; DrawTextEx(font, xpm ? error : welcome, pos, font.baseSize, 0, BLACK); }