From: Holger Schemel Date: Sat, 17 Feb 2024 14:31:05 +0000 (+0100) Subject: added setup option to enable smooth element movement for BD engine X-Git-Tag: 4.4.0.0-test-1~343 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=82b69c59921e29a1e121709e5cacbaf13f4be2e1;p=rocksndiamonds.git added setup option to enable smooth element movement for BD engine --- diff --git a/src/files.c b/src/files.c index aea943a5..7b851893 100644 --- a/src/files.c +++ b/src/files.c @@ -9817,6 +9817,10 @@ static struct TokenInfo global_setup_tokens[] = TYPE_SWITCH, &setup.bd_scroll_delay, "bd_scroll_delay" }, + { + TYPE_SWITCH3, + &setup.bd_smooth_movements, "bd_smooth_movements" + }, { TYPE_SWITCH, &setup.sp_show_border_elements, "sp_show_border_elements" @@ -10636,6 +10640,7 @@ static void setSetupInfoToDefaults(struct SetupInfo *si) si->bd_skip_uncovering = FALSE; si->bd_skip_hatching = FALSE; si->bd_scroll_delay = TRUE; + si->bd_smooth_movements = AUTO; 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 ac84de40..b88f5bdb 100644 --- a/src/game_bd/bd_graphics.c +++ b/src/game_bd/bd_graphics.c @@ -318,7 +318,9 @@ static void gd_drawcave_tile(Bitmap *dest, GdGame *game, int x, int y, boolean d int tile = game->element_buffer[y][x]; int frame = game->animcycle; struct GraphicInfo_BD *g = &graphic_info_bd_object[tile][frame]; - boolean use_smooth_movements = TRUE; + boolean use_smooth_movements = + ((setup.bd_smooth_movements == TRUE) || + (setup.bd_smooth_movements == AUTO && !use_native_bd_graphics_engine())); #if DO_GFX_SANITY_CHECK if (use_native_bd_graphics_engine() && !setup.small_game_graphics && !program.headless) diff --git a/src/libgame/system.h b/src/libgame/system.h index 9bdab6c3..cc17c730 100644 --- a/src/libgame/system.h +++ b/src/libgame/system.h @@ -1512,6 +1512,7 @@ struct SetupInfo boolean bd_skip_uncovering; boolean bd_skip_hatching; boolean bd_scroll_delay; + int bd_smooth_movements; // not boolean -- can also be "AUTO" 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 54236dc8..e14114ee 100644 --- a/src/screens.c +++ b/src/screens.c @@ -7469,6 +7469,7 @@ static struct TokenInfo setup_info_engines[] = { 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_YES_NO_AUTO, &setup.bd_smooth_movements, "Smooth Element Movement:" }, { TYPE_EMPTY, NULL, "" }, { TYPE_HEADLINE, NULL, "Emerald Mine" }, { TYPE_SWITCH, &setup.forced_scroll_delay, "Scroll Delay:" },