From: Holger Schemel Date: Sat, 17 Feb 2024 13:57:59 +0000 (+0100) Subject: added setup option to disable delayed scrolling for BD engine X-Git-Tag: 4.4.0.0-test-1~344 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=046fddade0aad54e0e2f41736d18701e12bd3dd1;p=rocksndiamonds.git added setup option to disable delayed scrolling for BD engine --- diff --git a/src/files.c b/src/files.c index a81a3f06..aea943a5 100644 --- a/src/files.c +++ b/src/files.c @@ -9813,6 +9813,10 @@ static struct TokenInfo global_setup_tokens[] = TYPE_SWITCH, &setup.bd_skip_hatching, "bd_skip_hatching" }, + { + TYPE_SWITCH, + &setup.bd_scroll_delay, "bd_scroll_delay" + }, { TYPE_SWITCH, &setup.sp_show_border_elements, "sp_show_border_elements" @@ -10631,6 +10635,7 @@ static void setSetupInfoToDefaults(struct SetupInfo *si) si->game_frame_delay = GAME_FRAME_DELAY; si->bd_skip_uncovering = FALSE; si->bd_skip_hatching = FALSE; + si->bd_scroll_delay = TRUE; si->sp_show_border_elements = FALSE; si->small_game_graphics = FALSE; si->show_load_save_buttons = FALSE; diff --git a/src/game_bd/bd_graphics.c b/src/game_bd/bd_graphics.c index 22851bdd..ac84de40 100644 --- a/src/game_bd/bd_graphics.c +++ b/src/game_bd/bd_graphics.c @@ -216,6 +216,9 @@ boolean gd_scroll(GdGame *game, boolean exact_scroll, boolean immediate) /* caught up with the desired position. smaller is better. */ int scroll_speed = cell_size * 20 / game->cave->speed; + if (!setup.bd_scroll_delay) + exact_scroll = TRUE; + if (immediate) scroll_speed = cell_size * MAX(game->cave->w, game->cave->h); diff --git a/src/libgame/system.h b/src/libgame/system.h index 77f34131..9bdab6c3 100644 --- a/src/libgame/system.h +++ b/src/libgame/system.h @@ -1511,6 +1511,7 @@ struct SetupInfo int game_frame_delay; boolean bd_skip_uncovering; boolean bd_skip_hatching; + boolean bd_scroll_delay; boolean sp_show_border_elements; boolean small_game_graphics; boolean show_load_save_buttons; diff --git a/src/screens.c b/src/screens.c index 9d4157c0..54236dc8 100644 --- a/src/screens.c +++ b/src/screens.c @@ -7468,6 +7468,7 @@ static struct TokenInfo setup_info_engines[] = { TYPE_HEADLINE, NULL, "Boulder Dash" }, { TYPE_SWITCH, &setup.bd_skip_uncovering, "Skip (un)covering screen:" }, { TYPE_SWITCH, &setup.bd_skip_hatching, "Skip hatching player:" }, + { TYPE_SWITCH, &setup.bd_scroll_delay, "Scroll Delay:" }, { TYPE_EMPTY, NULL, "" }, { TYPE_HEADLINE, NULL, "Emerald Mine" }, { TYPE_SWITCH, &setup.forced_scroll_delay, "Scroll Delay:" },