added setup option for "player moving up/down" graphics in BD engine
authorHolger Schemel <info@artsoft.org>
Sun, 14 Apr 2024 21:41:47 +0000 (23:41 +0200)
committerHolger Schemel <info@artsoft.org>
Sun, 14 Apr 2024 21:42:28 +0000 (23:42 +0200)
src/files.c
src/game_bd/bd_cave.c
src/game_bd/export_bd.h
src/game_bd/main_bd.c
src/libgame/system.h
src/screens.c

index e4c4d0e6052e42826b18671dee2b8e9d8219e160..175efdd5c89727d1296bba234cafcd4f5247609a 100644 (file)
@@ -10779,6 +10779,10 @@ static struct TokenInfo global_setup_tokens[] =
     TYPE_SWITCH3,
     &setup.bd_pushing_graphics,                        "bd_pushing_graphics"
   },
+  {
+    TYPE_SWITCH3,
+    &setup.bd_up_down_graphics,                        "bd_up_down_graphics"
+  },
   {
     TYPE_INTEGER,
     &setup.bd_palette_c64,                     "bd_palette_c64"
@@ -11625,6 +11629,7 @@ static void setSetupInfoToDefaults(struct SetupInfo *si)
   si->bd_scroll_delay = TRUE;
   si->bd_smooth_movements = AUTO;
   si->bd_pushing_graphics = TRUE;
+  si->bd_up_down_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;
index cedab63d1da8d917bb766dc8d81b35550ef981f6..0b635df1dddffacda2c9e52e0b0a61097237082f 100644 (file)
@@ -1455,12 +1455,12 @@ void gd_drawcave_game(const GdCave *cave,
       draw = gd_elements[O_PLAYER].image_game;
     }
   }
-  else if (cave->last_direction == GD_MV_UP)
+  else if (cave->last_direction == GD_MV_UP && use_bd_up_down_graphics())
   {
     map = O_PLAYER_UP;
     draw = gd_elements[O_PLAYER_UP].image_game;
   }
-  else if (cave->last_direction == GD_MV_DOWN)
+  else if (cave->last_direction == GD_MV_DOWN && use_bd_up_down_graphics())
   {
     map = O_PLAYER_DOWN;
     draw = gd_elements[O_PLAYER_DOWN].image_game;
index 690481a26b801121cd80a5a89215886d850781c1..4ee1e9485f413218dd58b1da1e166a1c0bc794b8 100644 (file)
@@ -115,6 +115,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);
+boolean use_bd_up_down_graphics(void);
 
 Bitmap **GetTitleScreenBitmaps_BD(void);
 void CoverScreen_BD(void);
index 3992593359260faac31cd6b3823666dd57ac1889..d2da72f17460aaca33850c709a1e76a297a8466d 100644 (file)
@@ -453,6 +453,13 @@ boolean use_bd_pushing_graphics(void)
          (setup.bd_pushing_graphics == AUTO && !use_native_bd_graphics_engine()));
 }
 
+// check if player up/down graphics selected in setup menu
+boolean use_bd_up_down_graphics(void)
+{
+  return ((setup.bd_up_down_graphics == TRUE) ||
+         (setup.bd_up_down_graphics == AUTO && !use_native_bd_graphics_engine()));
+}
+
 Bitmap **GetTitleScreenBitmaps_BD(void)
 {
   Bitmap **title_screen_bitmaps = gd_get_title_screen_bitmaps();
index 8122dfffb28066a65bd1d6e070e48c54b475fd6d..15c55f776c85fc397deabcf3b067fd3cd5c9bbc8 100644 (file)
@@ -1517,6 +1517,7 @@ struct SetupInfo
   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_up_down_graphics;             // not boolean -- can also be "AUTO"
   int bd_palette_c64;
   int bd_palette_c64dtv;
   int bd_palette_atari;
index b9f531582208520d1563cbe8d133c814dac0fc0b..241d25f0154358127dc0a2055f29730b6e3008c9 100644 (file)
@@ -7974,6 +7974,7 @@ static struct TokenInfo setup_info_engines[] =
   { 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_YES_NO_AUTO,  &setup.bd_up_down_graphics,     "Use Player Up/Down Graphics:"  },
   { TYPE_ENTER_LIST,   &execSetupChoosePaletteC64,     "Color Palette (C64):"          },
   { TYPE_STRING,       &bd_palette_c64_text,           ""                              },
   { TYPE_ENTER_LIST,   &execSetupChoosePaletteC64DTV,  "Color Palette (C64DTV):"       },