From: Holger Schemel Date: Sun, 14 Apr 2024 19:10:29 +0000 (+0200) Subject: added setup option for using "player is pushing" graphics in BD engine X-Git-Tag: 4.4.0.0-test-1~66 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=3b292f6abf8f677bbfdbd9b583c54113b8e64959;hp=70d64256513a57f375431931c606ae85ed5b9d3f;p=rocksndiamonds.git added setup option for using "player is pushing" graphics in BD engine --- diff --git a/src/files.c b/src/files.c index ec25f0b2..e4c4d0e6 100644 --- a/src/files.c +++ b/src/files.c @@ -10775,6 +10775,10 @@ static struct TokenInfo global_setup_tokens[] = TYPE_SWITCH3, &setup.bd_smooth_movements, "bd_smooth_movements" }, + { + TYPE_SWITCH3, + &setup.bd_pushing_graphics, "bd_pushing_graphics" + }, { TYPE_INTEGER, &setup.bd_palette_c64, "bd_palette_c64" @@ -11620,6 +11624,7 @@ static void setSetupInfoToDefaults(struct SetupInfo *si) si->bd_skip_hatching = FALSE; si->bd_scroll_delay = TRUE; si->bd_smooth_movements = AUTO; + si->bd_pushing_graphics = TRUE; si->bd_palette_c64 = GD_DEFAULT_PALETTE_C64; si->bd_palette_c64dtv = GD_DEFAULT_PALETTE_C64DTV; si->bd_palette_atari = GD_DEFAULT_PALETTE_ATARI; diff --git a/src/game_bd/bd_cave.c b/src/game_bd/bd_cave.c index 8cc703a4..7e808a25 100644 --- a/src/game_bd/bd_cave.c +++ b/src/game_bd/bd_cave.c @@ -1541,7 +1541,8 @@ void gd_drawcave_game(const GdCave *cave, draw = elemdrawing[actual]; // draw special graphics if player is pushing something - if ((cave->last_direction == GD_MV_LEFT || cave->last_direction == GD_MV_RIGHT) && + if (use_bd_pushing_graphics() && + (cave->last_direction == GD_MV_LEFT || cave->last_direction == GD_MV_RIGHT) && is_player(cave, x, y) && can_be_pushed_dir(cave, x, y, cave->last_direction)) { // special check needed when smooth game element movements selected in setup menu: diff --git a/src/game_bd/export_bd.h b/src/game_bd/export_bd.h index b7d62467..690481a2 100644 --- a/src/game_bd/export_bd.h +++ b/src/game_bd/export_bd.h @@ -114,6 +114,7 @@ void GameActions_BD(byte[MAX_PLAYERS]); boolean use_native_bd_graphics_engine(void); boolean use_bd_smooth_movements(void); +boolean use_bd_pushing_graphics(void); Bitmap **GetTitleScreenBitmaps_BD(void); void CoverScreen_BD(void); diff --git a/src/game_bd/main_bd.c b/src/game_bd/main_bd.c index c734d5ea..39925933 100644 --- a/src/game_bd/main_bd.c +++ b/src/game_bd/main_bd.c @@ -446,6 +446,13 @@ boolean use_bd_smooth_movements(void) (setup.bd_smooth_movements == AUTO && !use_native_bd_graphics_engine())); } +// check if player pushing graphics selected in setup menu +boolean use_bd_pushing_graphics(void) +{ + return ((setup.bd_pushing_graphics == TRUE) || + (setup.bd_pushing_graphics == AUTO && !use_native_bd_graphics_engine())); +} + Bitmap **GetTitleScreenBitmaps_BD(void) { Bitmap **title_screen_bitmaps = gd_get_title_screen_bitmaps(); diff --git a/src/libgame/system.h b/src/libgame/system.h index 78392d89..8122dfff 100644 --- a/src/libgame/system.h +++ b/src/libgame/system.h @@ -1516,6 +1516,7 @@ struct SetupInfo boolean bd_skip_hatching; boolean bd_scroll_delay; int bd_smooth_movements; // not boolean -- can also be "AUTO" + int bd_pushing_graphics; // not boolean -- can also be "AUTO" int bd_palette_c64; int bd_palette_c64dtv; int bd_palette_atari; diff --git a/src/screens.c b/src/screens.c index 2a44ae7b..b9f53158 100644 --- a/src/screens.c +++ b/src/screens.c @@ -7973,6 +7973,7 @@ static struct TokenInfo setup_info_engines[] = { 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_YES_NO_AUTO, &setup.bd_pushing_graphics, "Use Player Pushing Graphics:" }, { TYPE_ENTER_LIST, &execSetupChoosePaletteC64, "Color Palette (C64):" }, { TYPE_STRING, &bd_palette_c64_text, "" }, { TYPE_ENTER_LIST, &execSetupChoosePaletteC64DTV, "Color Palette (C64DTV):" },