white space changes
authorHolger Schemel <info@artsoft.org>
Wed, 21 Feb 2024 19:21:18 +0000 (20:21 +0100)
committerHolger Schemel <info@artsoft.org>
Wed, 21 Feb 2024 19:29:30 +0000 (20:29 +0100)
src/game_bd/bd_cavedb.c
src/game_bd/bd_caveengine.c
src/game_bd/bd_caveobject.c
src/libgame/types.h

index 177f38acbff4279a102cd9df5e0a2e5ffca42906..8f24ab86fb08c9822eeb472ca60ef5083dd79932 100644 (file)
@@ -967,13 +967,13 @@ void gd_cave_db_init(void)
     }
 
     /* we do not like generated pixbufs for games. only those that are in the png. */
     }
 
     /* we do not like generated pixbufs for games. only those that are in the png. */
-    if (ABS(gd_elements[i].image_game)>GD_NUM_OF_CELLS_X*GD_NUM_OF_CELLS_Y)
+    if (ABS(gd_elements[i].image_game) > GD_NUM_OF_CELLS_X * GD_NUM_OF_CELLS_Y)
       Error("game pixbuf for element %x (%s) bigger than png size", i, gd_elements[i].name);
 
     if (gd_elements[i].image < 0)
       Error("editor pixbuf for element %x (%s) should not be animated", i, gd_elements[i].name);
 
       Error("game pixbuf for element %x (%s) bigger than png size", i, gd_elements[i].name);
 
     if (gd_elements[i].image < 0)
       Error("editor pixbuf for element %x (%s) should not be animated", i, gd_elements[i].name);
 
-    if (gd_elements[i].properties&P_CAN_BE_HAMMERED && gd_element_get_hammered((GdElement) i) == O_NONE)
+    if (gd_elements[i].properties & P_CAN_BE_HAMMERED && gd_element_get_hammered((GdElement) i) == O_NONE)
       Error("element %x (%s) can be hammered, but get_hammered_element does not define another one", i, gd_elements[i].name);
   }
 
       Error("element %x (%s) can be hammered, but get_hammered_element does not define another one", i, gd_elements[i].name);
   }
 
@@ -1072,7 +1072,7 @@ void gd_cave_db_init(void)
       /* other types */
       /* check if its pointer is not the same as another one's */
       /* +1 is added so it is never zero */
       /* other types */
       /* check if its pointer is not the same as another one's */
       /* +1 is added so it is never zero */
-      if (!(gd_cave_properties[i].flags&GD_DONT_SAVE) && strcmp(gd_cave_properties[i].identifier, "") == 0)
+      if (!(gd_cave_properties[i].flags & GD_DONT_SAVE) && strcmp(gd_cave_properties[i].identifier, "") == 0)
       {
        Error ("property should have a bdcff identifier: line %d, name %s",
               i, gd_cave_properties[i].name);
       {
        Error ("property should have a bdcff identifier: line %d, name %s",
               i, gd_cave_properties[i].name);
index 080146c6ef35a21eb5925901cd65c40fa986e856..aba15aff9688eb46cc7ac4fe7aa83ff899ce4e37 100644 (file)
@@ -1609,7 +1609,7 @@ void gd_cave_iterate(GdCave *cave, GdDirection player_move, boolean player_fire,
       for (x = 0; x < cave->w; x++)
       {
        /* timer for the cell > 0? */
       for (x = 0; x < cave->w; x++)
       {
        /* timer for the cell > 0? */
-       if (cave->hammered_reappear[y][x]>0)
+       if (cave->hammered_reappear[y][x] > 0)
        {
          /* decrease timer */
          cave->hammered_reappear[y][x]--;
        {
          /* decrease timer */
          cave->hammered_reappear[y][x]--;
index e2814c8bf8f0b6f82e88b00e2b3f924c51f9fefa..1cfaca20a98c583bb6959b0a80288bd0b102c85b 100644 (file)
@@ -838,7 +838,7 @@ static void mazegen(GRand *rand, boolean **maze, int width, int height, int x, i
     /* if no horizontal movement possible, choose vertical */
     if (dir == 2 && (dirmask & 12) == 0)
       dir = 0;
     /* if no horizontal movement possible, choose vertical */
     if (dir == 2 && (dirmask & 12) == 0)
       dir = 0;
-    else if (dir == 0 && (dirmask&3) == 0)    /* and vice versa */
+    else if (dir == 0 && (dirmask & 3) == 0)    /* and vice versa */
       dir = 2;
 
     dir += g_rand_int_range(rand, 0, 2);                /* dir */
       dir = 2;
 
     dir += g_rand_int_range(rand, 0, 2);                /* dir */
index 6ea71aeba0ed210e5458db15c2523414b03b8a7c..6f86c02888b007b884136da1bbdaad4c6b3b3cac 100644 (file)
@@ -36,41 +36,41 @@ typedef unsigned char byte;
 #undef AUTO
 #endif
 
 #undef AUTO
 #endif
 
-#define TRUE           1
-#define FALSE          0
-#define AUTO           -1
+#define TRUE                   1
+#define FALSE                  0
+#define AUTO                   -1
 
 #ifndef MIN
 
 #ifndef MIN
-#define MIN(a, b)      ((a) < (b) ? (a) : (b))
+#define MIN(a, b)              ((a) < (b) ? (a) : (b))
 #endif
 
 #ifndef MAX
 #endif
 
 #ifndef MAX
-#define MAX(a, b)      ((a) > (b) ? (a) : (b))
+#define MAX(a, b)              ((a) > (b) ? (a) : (b))
 #endif
 
 #ifndef ABS
 #endif
 
 #ifndef ABS
-#define ABS(a)         ((a) < 0 ? -(a) : (a))
+#define ABS(a)                 ((a) < 0 ? -(a) : (a))
 #endif
 
 #ifndef SIGN
 #endif
 
 #ifndef SIGN
-#define SIGN(a)                ((a) < 0 ? -1 : ((a) > 0 ? 1 : 0))
+#define SIGN(a)                        ((a) < 0 ? -1 : ((a) > 0 ? 1 : 0))
 #endif
 
 #ifndef ODD
 #endif
 
 #ifndef ODD
-#define ODD(a)         (((a) & 1) == 1)
+#define ODD(a)                 (((a) & 1) == 1)
 #endif
 
 #ifndef EVEN
 #endif
 
 #ifndef EVEN
-#define EVEN(a)                (((a) & 1) == 0)
+#define EVEN(a)                        (((a) & 1) == 0)
 #endif
 
 #endif
 
-#define ARRAY_SIZE(array)              (sizeof(array) / sizeof(array[0]))
+#define ARRAY_SIZE(array)      (sizeof(array) / sizeof(array[0]))
 
 
-#define PTR_TO_INT(p)  ((int) (long) (p))
-#define PTR_TO_UINT(p) ((unsigned int) (unsigned long) (p))
+#define PTR_TO_INT(p)          ((int) (long) (p))
+#define PTR_TO_UINT(p)         ((unsigned int) (unsigned long) (p))
 
 
-#define INT_TO_PTR(i)  ((void *) (long) (i))
-#define UINT_TO_PTR(u) ((void *) (unsigned long) (u))
+#define INT_TO_PTR(i)          ((void *) (long) (i))
+#define UINT_TO_PTR(u)         ((void *) (unsigned long) (u))
 
 
 struct ListNode
 
 
 struct ListNode