]> Trent Huber's Code - xpmview.git/commitdiff
Updated build file formatting
authorTrent Huber <trentmhuber@gmail.com>
Fri, 25 Jul 2025 17:30:35 +0000 (13:30 -0400)
committerTrent Huber <trentmhuber@gmail.com>
Fri, 25 Jul 2025 17:30:35 +0000 (13:30 -0400)
external/build.c
src/build.c
src/main.c

index 2633ded83bf881ce22b7235f076e5e3f08407d92..15141c5f0ca020daa643faa49bf0f9634550bef9 100644 (file)
@@ -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) {
index 9d002898d2951796d99d19a873b759f82454034e..b7d3afdf42cf39b54efd1dcfcb863fecb487d800 100644 (file)
@@ -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;
 }
index d1d4ba7a5c4ba888c0f38e0445580779ce88506b..17173e77c9129d126c02a74ce4922805382983ef 100644 (file)
@@ -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);
        }