From: Holger Schemel Date: Wed, 21 Feb 2024 19:21:18 +0000 (+0100) Subject: white space changes X-Git-Tag: 4.4.0.0-test-1~322 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=1f0d80712e543e4d664ffe9a1f672db34207e7b9;p=rocksndiamonds.git white space changes --- diff --git a/src/game_bd/bd_cavedb.c b/src/game_bd/bd_cavedb.c index 177f38ac..8f24ab86 100644 --- a/src/game_bd/bd_cavedb.c +++ b/src/game_bd/bd_cavedb.c @@ -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. */ - 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); - 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); } @@ -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 */ - 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); diff --git a/src/game_bd/bd_caveengine.c b/src/game_bd/bd_caveengine.c index 080146c6..aba15aff 100644 --- a/src/game_bd/bd_caveengine.c +++ b/src/game_bd/bd_caveengine.c @@ -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? */ - if (cave->hammered_reappear[y][x]>0) + if (cave->hammered_reappear[y][x] > 0) { /* decrease timer */ cave->hammered_reappear[y][x]--; diff --git a/src/game_bd/bd_caveobject.c b/src/game_bd/bd_caveobject.c index e2814c8b..1cfaca20 100644 --- a/src/game_bd/bd_caveobject.c +++ b/src/game_bd/bd_caveobject.c @@ -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; - 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 */ diff --git a/src/libgame/types.h b/src/libgame/types.h index 6ea71aeb..6f86c028 100644 --- a/src/libgame/types.h +++ b/src/libgame/types.h @@ -36,41 +36,41 @@ typedef unsigned char byte; #undef AUTO #endif -#define TRUE 1 -#define FALSE 0 -#define AUTO -1 +#define TRUE 1 +#define FALSE 0 +#define AUTO -1 #ifndef MIN -#define MIN(a, b) ((a) < (b) ? (a) : (b)) +#define MIN(a, b) ((a) < (b) ? (a) : (b)) #endif #ifndef MAX -#define MAX(a, b) ((a) > (b) ? (a) : (b)) +#define MAX(a, b) ((a) > (b) ? (a) : (b)) #endif #ifndef ABS -#define ABS(a) ((a) < 0 ? -(a) : (a)) +#define ABS(a) ((a) < 0 ? -(a) : (a)) #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 -#define ODD(a) (((a) & 1) == 1) +#define ODD(a) (((a) & 1) == 1) #endif #ifndef EVEN -#define EVEN(a) (((a) & 1) == 0) +#define EVEN(a) (((a) & 1) == 0) #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