From: Holger Schemel Date: Thu, 15 Feb 2024 20:05:05 +0000 (+0100) Subject: white space changes X-Git-Tag: 4.4.0.0-test-1~360 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=2be47982a3acd069ebfdb2a75b26f770257932a6;p=rocksndiamonds.git white space changes --- diff --git a/src/game_bd/bd_c64import.c b/src/game_bd/bd_c64import.c index 40764a4b..36e2dc08 100644 --- a/src/game_bd/bd_c64import.c +++ b/src/game_bd/bd_c64import.c @@ -698,7 +698,7 @@ static int cave_copy_from_bd1(GdCave *cave, const guint8 *data, int remaining_by } else { - /* object is code&3f, object type is upper 2 bits */ + /* object is code & 3f, object type is upper 2 bits */ elem = import_func(code & 0x3F, index); switch ((code >> 6) & 3) @@ -2138,14 +2138,14 @@ static int cave_copy_from_crli(GdCave *cave, const guint8 *data, int remaining_b if (uncompressed[0x380]) cave->creatures_direction_auto_change_time = uncompressed[0x381]; - cave->colorb = gd_c64_color(uncompressed[0x384]&0xf); /* border */ - cave->color0 = gd_c64_color(uncompressed[0x385]&0xf); - cave->color1 = gd_c64_color(uncompressed[0x386]&0xf); - cave->color2 = gd_c64_color(uncompressed[0x387]&0xf); - cave->color3 = gd_c64_color(uncompressed[0x388]&0x7); /* lower 3 bits only! */ + cave->colorb = gd_c64_color(uncompressed[0x384] & 0xf); /* border */ + cave->color0 = gd_c64_color(uncompressed[0x385] & 0xf); + cave->color1 = gd_c64_color(uncompressed[0x386] & 0xf); + cave->color2 = gd_c64_color(uncompressed[0x387] & 0xf); + cave->color3 = gd_c64_color(uncompressed[0x388] & 0x7); /* lower 3 bits only! */ cave->color4 = cave->color3; cave->color5 = cave->color1; - cave->intermission = uncompressed[0x389]!=0; + cave->intermission = uncompressed[0x389] != 0; /* if it is intermission but not scrollable */ if (cave->intermission && !uncompressed[0x38c]) diff --git a/src/game_bd/bd_cave.h b/src/game_bd/bd_cave.h index 1255e541..189e2777 100644 --- a/src/game_bd/bd_cave.h +++ b/src/game_bd/bd_cave.h @@ -253,7 +253,7 @@ typedef enum _direction GD_MV_LEFT = 7, GD_MV_UP_LEFT = 8, - /* to be able to type GD_MV_TWICE+GD_MV_DOWN, for example */ + /* to be able to type GD_MV_TWICE + GD_MV_DOWN, for example */ GD_MV_TWICE = 8, /* directions * 2 */ diff --git a/src/game_bd/bd_caveengine.c b/src/game_bd/bd_caveengine.c index 1fe5b2b0..d33222e0 100644 --- a/src/game_bd/bd_caveengine.c +++ b/src/game_bd/bd_caveengine.c @@ -489,7 +489,7 @@ static inline boolean is_element_dir(const GdCave *cave, const int x, const int static inline boolean is_space_dir(const GdCave *cave, const int x, const int y, const GdDirection dir) { - GdElement e = get_dir(cave, x, y, dir)&O_MASK; + GdElement e = get_dir(cave, x, y, dir) & O_MASK; return (e == O_SPACE || e == O_LAVA); } @@ -519,7 +519,7 @@ static inline void store_sc(GdCave *cave, const int x, const int y, const GdElem static inline void store_dir(GdCave *cave, const int x, const int y, const GdDirection dir, const GdElement element) { - store(cave, x + gd_dx[dir], y + gd_dy[dir], element|SCANNED); + store(cave, x + gd_dx[dir], y + gd_dy[dir], element | SCANNED); } /* store an element to a neighbouring cell */ @@ -1600,7 +1600,7 @@ void gd_cave_iterate(GdCave *cave, GdDirection player_move, boolean player_fire, { /* if we find a scanned element, change it to the normal one, and that's all. */ /* this is required, for example for chasing stones, which have moved, always passing slime! */ - if (get(cave, x, y)&SCANNED) + if (get(cave, x, y) & SCANNED) { store(cave, x, y, get(cave, x, y) & ~SCANNED); diff --git a/src/game_bd/bd_caveobject.c b/src/game_bd/bd_caveobject.c index 254f373d..750543d2 100644 --- a/src/game_bd/bd_caveobject.c +++ b/src/game_bd/bd_caveobject.c @@ -1277,7 +1277,7 @@ static void draw_random_fill(GdCave *cave, const GdObject *object, int level) rand = g_rand_new_with_seed(seed); /* for c64 random, use the 2*8 lsb. */ - gd_c64_random_set_seed(&c64_rand, seed/256%256, seed%256); + gd_c64_random_set_seed(&c64_rand, seed / 256 % 256, seed % 256); /* change coordinates if not in correct order */ if (y1 > y2) diff --git a/src/game_bd/bd_elements.h b/src/game_bd/bd_elements.h index 8d670430..87584170 100644 --- a/src/game_bd/bd_elements.h +++ b/src/game_bd/bd_elements.h @@ -306,8 +306,8 @@ typedef enum _element O_MAX_ALL, - SCANNED=0x100, - COVERED=0x200, + SCANNED = 0x100, + COVERED = 0x200, /* binary AND this to elements to get rid of properties above. */ O_MASK = ~(SCANNED | COVERED)