From: Holger Schemel Date: Mon, 27 Jan 2020 20:41:50 +0000 (+0100) Subject: whitespace changes X-Git-Tag: 4.2.0.0~170 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=e227a361d63ac92e9ed1ceb276f739fa3edc45be;p=rocksndiamonds.git whitespace changes --- diff --git a/src/game_em/logic.c b/src/game_em/logic.c index 6183555a..0fec08c9 100644 --- a/src/game_em/logic.c +++ b/src/game_em/logic.c @@ -85,7 +85,7 @@ static boolean player_killed(struct PLAYER *ply) if (lev.killed_out_of_time && setup.time_limit) return TRUE; - switch(cave[x][y-1]) + switch (cave[x][y-1]) { case Xbug_1_n: case Xbug_1_e: @@ -106,7 +106,7 @@ static boolean player_killed(struct PLAYER *ply) return TRUE; } - switch(cave[x+1][y]) + switch (cave[x+1][y]) { case Xbug_1_n: case Xbug_1_e: @@ -127,7 +127,7 @@ static boolean player_killed(struct PLAYER *ply) return TRUE; } - switch(cave[x][y+1]) + switch (cave[x][y+1]) { case Xbug_1_n: case Xbug_1_e: @@ -148,7 +148,7 @@ static boolean player_killed(struct PLAYER *ply) return TRUE; } - switch(cave[x-1][y]) + switch (cave[x-1][y]) { case Xbug_1_n: case Xbug_1_e: @@ -169,7 +169,7 @@ static boolean player_killed(struct PLAYER *ply) return TRUE; } - switch(cave[x][y]) + switch (cave[x][y]) { case Xblank: case Xacid_splash_e: @@ -202,7 +202,7 @@ static void kill_player(struct PLAYER *ply) ply->alive = 0; - switch(cave[x][y-1]) + switch (cave[x][y-1]) { case Xbug_1_n: case Xbug_1_e: @@ -227,7 +227,7 @@ static void kill_player(struct PLAYER *ply) break; } - switch(cave[x+1][y]) + switch (cave[x+1][y]) { case Xbug_1_n: case Xbug_1_e: @@ -252,7 +252,7 @@ static void kill_player(struct PLAYER *ply) break; } - switch(cave[x][y+1]) + switch (cave[x][y+1]) { case Xbug_1_n: case Xbug_1_e: @@ -277,7 +277,7 @@ static void kill_player(struct PLAYER *ply) break; } - switch(cave[x-1][y]) + switch (cave[x-1][y]) { case Xbug_1_n: case Xbug_1_e: @@ -302,7 +302,7 @@ static void kill_player(struct PLAYER *ply) break; } - switch(cave[x][y]) + switch (cave[x][y]) { case Xexit_1: case Xexit_2: @@ -317,7 +317,7 @@ static void kill_player(struct PLAYER *ply) break; } - switch(cave[x][y]) + switch (cave[x][y]) { #ifdef USE_CHANGED_ACID_STUFF case Xacid_1: @@ -357,7 +357,7 @@ static boolean player_digfield(struct PLAYER *ply, int dx, int dy) { int element = cave[x][y]; - switch(cave[x][y]) + switch (cave[x][y]) { /* fire is released */ case Xblank: @@ -564,7 +564,7 @@ static boolean player_digfield(struct PLAYER *ply, int dx, int dy) if (dy) break; - switch(cave[x+dx][y]) + switch (cave[x+dx][y]) { case Xblank: case Xacid_splash_e: @@ -603,7 +603,7 @@ static boolean player_digfield(struct PLAYER *ply, int dx, int dy) if (dy) break; - switch(cave[x+dx][y]) + switch (cave[x+dx][y]) { case Xblank: case Xacid_splash_e: @@ -642,7 +642,7 @@ static boolean player_digfield(struct PLAYER *ply, int dx, int dy) if (dy) break; - switch(cave[x+dx][y]) + switch (cave[x+dx][y]) { case Xblank: case Xacid_splash_e: @@ -681,7 +681,7 @@ static boolean player_digfield(struct PLAYER *ply, int dx, int dy) if (dy) break; - switch(cave[x+dx][y]) + switch (cave[x+dx][y]) { case Xblank: case Xacid_splash_e: @@ -742,7 +742,7 @@ static boolean player_digfield(struct PLAYER *ply, int dx, int dy) break; case Xballoon: - switch(cave[x+dx][y+dy]) + switch (cave[x+dx][y+dy]) { case Xblank: case Xacid_splash_e: @@ -789,7 +789,7 @@ static boolean player_digfield(struct PLAYER *ply, int dx, int dy) case Xandroid_2_s: case Xandroid_1_w: case Xandroid_2_w: - switch(cave[x+dx][y+dy]) + switch (cave[x+dx][y+dy]) { case Xblank: case Xacid_splash_e: @@ -972,7 +972,7 @@ static boolean player_digfield(struct PLAYER *ply, int dx, int dy) { int element = cave[x][y]; - switch(cave[x][y]) + switch (cave[x][y]) { /* fire is pressed */ diff --git a/src/game_mm/mm_game.c b/src/game_mm/mm_game.c index 6da722c1..da5ec7da 100644 --- a/src/game_mm/mm_game.c +++ b/src/game_mm/mm_game.c @@ -421,7 +421,7 @@ static void InitMovDir_MM(int x, int y) { MV_LEFT, MV_RIGHT, MV_UP, MV_DOWN } }; - switch(element) + switch (element) { case EL_PACMAN_RIGHT: case EL_PACMAN_UP: @@ -2519,7 +2519,7 @@ static void Bang_MM(int x, int y) DrawLaser(0, DL_LASER_ENABLED); #endif - switch(element) + switch (element) { case EL_KETTLE: mode = EX_KETTLE; @@ -4152,7 +4152,7 @@ static void RaiseScore_MM(int value) void RaiseScoreElement_MM(int element) { - switch(element) + switch (element) { case EL_PACMAN: case EL_PACMAN_RIGHT: diff --git a/src/game_mm/mm_init.c b/src/game_mm/mm_init.c index 1906c97d..3444db01 100644 --- a/src/game_mm/mm_init.c +++ b/src/game_mm/mm_init.c @@ -221,17 +221,17 @@ void InitElementProperties_MM(void) }; static int num_properties = sizeof(ep_num) / sizeof(int *); - for(i = 0; i < MAX_ELEMENTS; i++) + for (i = 0; i < MAX_ELEMENTS; i++) Elementeigenschaften[i] = 0; - for(i = 0; i < num_properties; i++) - for(j = 0; j < *(ep_num[i]); j++) + for (i = 0; i < num_properties; i++) + for (j = 0; j < *(ep_num[i]); j++) Elementeigenschaften[(ep_array[i])[j]] |= ep_bit[i]; - for(i = EL_CHAR_START; i <= EL_CHAR_END; i++) + for (i = EL_CHAR_START; i <= EL_CHAR_END; i++) Elementeigenschaften[i] |= (EP_BIT_CHAR | EP_BIT_INACTIVE); - for(i = EL_WALL_START; i <= EL_WALL_END; i++) + for (i = EL_WALL_START; i <= EL_WALL_END; i++) Elementeigenschaften[i] |= EP_BIT_WALL; } diff --git a/src/game_mm/mm_tools.c b/src/game_mm/mm_tools.c index 7a221b67..7799174e 100644 --- a/src/game_mm/mm_tools.c +++ b/src/game_mm/mm_tools.c @@ -613,8 +613,8 @@ void DrawMiniLevel_MM(int size_x, int size_y, int scroll_x, int scroll_y) { int x, y; - for(x = 0; x < size_x; x++) - for(y = 0; y < size_y; y++) + for (x = 0; x < size_x; x++) + for (y = 0; y < size_y; y++) DrawMiniElementOrWall_MM(x, y, scroll_x, scroll_y); redraw_mask |= REDRAW_FIELD; diff --git a/src/libgame/gadgets.c b/src/libgame/gadgets.c index c50fb32e..b30082a2 100644 --- a/src/libgame/gadgets.c +++ b/src/libgame/gadgets.c @@ -884,7 +884,7 @@ static void HandleGadgetTags(struct GadgetInfo *gi, int first_tag, va_list ap) while (tag != GDI_END) { - switch(tag) + switch (tag) { case GDI_IMAGE_ID: gi->image_id = va_arg(ap, int); diff --git a/src/libgame/misc.c b/src/libgame/misc.c index fedc3048..ebac048d 100644 --- a/src/libgame/misc.c +++ b/src/libgame/misc.c @@ -1480,7 +1480,7 @@ void WriteBytesToFile(FILE *file, byte *buffer, unsigned int bytes) { int i; - for(i = 0; i < bytes; i++) + for (i = 0; i < bytes; i++) fputc(buffer[i], file); } diff --git a/src/libgame/sdl.c b/src/libgame/sdl.c index 457f567a..04cfc0e7 100644 --- a/src/libgame/sdl.c +++ b/src/libgame/sdl.c @@ -2529,7 +2529,7 @@ static void setJoystickButton(int nr, int button_id_raw, int button_state) void HandleJoystickEvent(Event *event) { - switch(event->type) + switch (event->type) { case SDL_CONTROLLERDEVICEADDED: #if DEBUG_JOYSTICKS diff --git a/src/libgame/system.c b/src/libgame/system.c index 337c18df..6dcf5496 100644 --- a/src/libgame/system.c +++ b/src/libgame/system.c @@ -1692,7 +1692,7 @@ KeyMod HandleKeyModState(Key key, int key_status) { KeyMod new_modifier = KMOD_None; - switch(key) + switch (key) { case KSYM_Shift_L: new_modifier = KMOD_Shift_L; diff --git a/src/network.c b/src/network.c index ded92acf..25108000 100644 --- a/src/network.c +++ b/src/network.c @@ -221,7 +221,7 @@ boolean ConnectToServer(char *hostname, int port) Error(ERR_EXIT, "SDLNet_AllocSocketSet() failed: %s"), SDLNet_GetError(); udp = SDLNet_UDP_Open(0); - if(!udp) + if (!udp) Error(ERR_EXIT, "SDLNet_UDP_Open() failed: %s", SDLNet_GetError()); if (SDLNet_UDP_AddSocket(udp_socket_set, udp) == -1)