From: Holger Schemel Date: Sat, 10 Feb 2024 19:14:02 +0000 (+0100) Subject: white space changes X-Git-Tag: 4.4.0.0-test-1~419 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=b6659e15c47b5f66e7db42af93080dda213a9605;p=rocksndiamonds.git white space changes --- diff --git a/src/editor.c b/src/editor.c index 5160b02f..c95d38db 100644 --- a/src/editor.c +++ b/src/editor.c @@ -7641,7 +7641,7 @@ static void MapGraphicbuttonGadget(int id) { int font_nr = FONT_TEXT_1; int font_height = getFontHeight(font_nr); - struct GadgetInfo *gi= level_editor_gadget[graphicbutton_info[id].gadget_id]; + struct GadgetInfo *gi = level_editor_gadget[graphicbutton_info[id].gadget_id]; int xoffset_left = getTextWidthForGadget(graphicbutton_info[id].text_left); int xoffset_right = ED_GADGET_TEXT_DISTANCE; int yoffset = (gi->height - font_height) / 2; @@ -10214,7 +10214,7 @@ static void DrawPropertiesConfig(void) num_element_counters); counterbutton_info[counter_id].value = elements_with_counter[i].value; - counterbutton_info[counter_id].text_right= elements_with_counter[i].text; + counterbutton_info[counter_id].text_right = elements_with_counter[i].text; if (properties_element == EL_GAME_OF_LIFE || properties_element == EL_BIOMAZE) @@ -14759,8 +14759,8 @@ static void HandleControlButtons(struct GadgetInfo *gi) for (i = 0; editor_elements_info[i].setup_value != NULL; i++) { - int *cascade_element= &(*editor_elements_info[i].headline_list)[0]; - boolean *cascade_value=editor_elements_info[i].setup_cascade_value; + int *cascade_element = &(*editor_elements_info[i].headline_list)[0]; + boolean *cascade_value = editor_elements_info[i].setup_cascade_value; if (*cascade_element == new_element) { diff --git a/src/files.c b/src/files.c index 994d854d..4352da65 100644 --- a/src/files.c +++ b/src/files.c @@ -2891,7 +2891,7 @@ static int LoadLevel_CUS3(File *file, int chunk_size, struct LevelInfo *level) ei->change->delay_random = getFile16BitBE(file); ei->change->delay_frames = getFile16BitBE(file); - ei->change->initial_trigger_element= getMappedElement(getFile16BitBE(file)); + ei->change->initial_trigger_element = getMappedElement(getFile16BitBE(file)); ei->change->explode = getFile8Bit(file); ei->change->use_target_content = getFile8Bit(file); @@ -8160,7 +8160,7 @@ static int LoadTape_BODY(File *file, int chunk_size, struct TapeInfo *tape) byte action = tape->pos[i].action[0]; int k, num_moves = 0; - for (k = 0; k<4; k++) + for (k = 0; k < 4; k++) { if (action & joy_dir[k]) { @@ -10616,7 +10616,7 @@ static void setSetupInfoToDefaults(struct SetupInfo *si) for (i = 0; i < MAX_PLAYERS; i++) { si->input[i].use_joystick = FALSE; - si->input[i].joy.device_name=getStringCopy(getDeviceNameFromJoystickNr(i)); + si->input[i].joy.device_name = getStringCopy(getDeviceNameFromJoystickNr(i)); si->input[i].joy.xleft = JOYSTICK_XLEFT; si->input[i].joy.xmiddle = JOYSTICK_XMIDDLE; si->input[i].joy.xright = JOYSTICK_XRIGHT; diff --git a/src/game.c b/src/game.c index fd943b99..3f02c087 100644 --- a/src/game.c +++ b/src/game.c @@ -9448,7 +9448,7 @@ static void Life(int ax, int ay) for (y1 = -1; y1 < 2; y1++) for (x1 = -1; x1 < 2; x1++) { - int xx = ax+x1, yy = ay+y1; + int xx = ax + x1, yy = ay + y1; int old_element = Tile[xx][yy]; int num_neighbours = 0; @@ -9457,7 +9457,7 @@ static void Life(int ax, int ay) for (y2 = -1; y2 < 2; y2++) for (x2 = -1; x2 < 2; x2++) { - int x = xx+x2, y = yy+y2; + int x = xx + x2, y = yy + y2; if (!IN_LEV_FIELD(x, y) || (x == xx && y == yy)) continue; @@ -15705,7 +15705,9 @@ void RequestQuitGameExt(boolean skip_request, boolean quick_quit, char *message) } if (network.enabled) + { SendToServer_StopPlaying(NETWORK_STOP_BY_PLAYER); + } else { if (quick_quit) diff --git a/src/game_mm/mm_game.c b/src/game_mm/mm_game.c index b258e374..fd3cf9ff 100644 --- a/src/game_mm/mm_game.c +++ b/src/game_mm/mm_game.c @@ -3289,7 +3289,7 @@ static void ContinueMoving_MM(int x, int y) int direction = MovDir[x][y]; int dx = (direction == MV_LEFT ? -1 : direction == MV_RIGHT ? +1 : 0); int dy = (direction == MV_UP ? -1 : direction == MV_DOWN ? +1 : 0); - int horiz_move = (dx!=0); + int horiz_move = (dx != 0); int newx = x + dx, newy = y + dy; int step = (horiz_move ? dx : dy) * TILEX / 8; diff --git a/src/libgame/gadgets.c b/src/libgame/gadgets.c index b917b43d..a99b70bb 100644 --- a/src/libgame/gadgets.c +++ b/src/libgame/gadgets.c @@ -634,13 +634,13 @@ static void DrawGadget(struct GadgetInfo *gi, boolean pressed, boolean direct) BlitBitmapOnBackground(gd->bitmap, drawto, gd->x, gd->y + border_y, border_x, font_height, gi->selectbox.x, - gi->selectbox.y + border_y + i*font_height); + gi->selectbox.y + border_y + i * font_height); BlitBitmapOnBackground(gd->bitmap, drawto, gd->x + gi->border.width - border_x, gd->y + border_y, border_x, font_height, gi->selectbox.x + box_width - border_x, - gi->selectbox.y + border_y + i*font_height); + gi->selectbox.y + border_y + i * font_height); } // bottom left part of gadget border @@ -1167,7 +1167,7 @@ static void HandleGadgetTags(struct GadgetInfo *gi, int first_tag, va_list ap) break; case GDI_ALT_DESIGN_UNPRESSED: - gi->alt_design[GD_BUTTON_UNPRESSED].bitmap= va_arg(ap, Bitmap *); + gi->alt_design[GD_BUTTON_UNPRESSED].bitmap = va_arg(ap, Bitmap *); gi->alt_design[GD_BUTTON_UNPRESSED].x = va_arg(ap, int); gi->alt_design[GD_BUTTON_UNPRESSED].y = va_arg(ap, int); break; @@ -1359,7 +1359,7 @@ static void HandleGadgetTags(struct GadgetInfo *gi, int first_tag, va_list ap) Bitmap *src_bitmap; int src_x, src_y; - gi->width = 2 * border_xsize + gi->textinput.size*font_width +button_size; + gi->width = 2 * border_xsize + gi->textinput.size * font_width +button_size; gi->height = 2 * border_ysize + font_height; if (gi->selectbox.options == NULL) diff --git a/src/libgame/sdl.c b/src/libgame/sdl.c index 0b3ec7f6..dce24936 100644 --- a/src/libgame/sdl.c +++ b/src/libgame/sdl.c @@ -1463,7 +1463,7 @@ void SDLDrawLines(SDL_Surface *surface, struct XY *points, continue; sge_Line(surface, points[i].x + dx, points[i].y + dy, - points[i+1].x + dx, points[i+1].y + dy, color); + points[i + 1].x + dx, points[i + 1].y + dy, color); } } } diff --git a/src/main.h b/src/main.h index ce5fbf20..80dbee89 100644 --- a/src/main.h +++ b/src/main.h @@ -21,6 +21,7 @@ #include #include "libgame/libgame.h" + #include "game_bd/game_bd.h" #include "game_em/game_em.h" #include "game_sp/game_sp.h"