From: Holger Schemel Date: Sun, 14 Apr 2024 21:33:09 +0000 (+0200) Subject: added support for "player is moving up/down" graphics for BD engine X-Git-Tag: 4.4.0.0-test-1~65 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=40705fd048ae2a23c4598ada848570f798ced780;p=rocksndiamonds.git added support for "player is moving up/down" graphics for BD engine --- diff --git a/src/game_bd/bd_cave.c b/src/game_bd/bd_cave.c index 7e808a25..cedab63d 100644 --- a/src/game_bd/bd_cave.c +++ b/src/game_bd/bd_cave.c @@ -1455,6 +1455,16 @@ void gd_drawcave_game(const GdCave *cave, draw = gd_elements[O_PLAYER].image_game; } } + else if (cave->last_direction == GD_MV_UP) + { + map = O_PLAYER_UP; + draw = gd_elements[O_PLAYER_UP].image_game; + } + else if (cave->last_direction == GD_MV_DOWN) + { + map = O_PLAYER_DOWN; + draw = gd_elements[O_PLAYER_DOWN].image_game; + } else if (cave->last_horizontal_direction == GD_MV_LEFT) { map = O_PLAYER_LEFT; diff --git a/src/game_bd/bd_cavedb.c b/src/game_bd/bd_cavedb.c index ff9df205..943b536f 100644 --- a/src/game_bd/bd_cavedb.c +++ b/src/game_bd/bd_cavedb.c @@ -374,6 +374,8 @@ GdElements gd_elements[] = { O_COVERED, NULL, 0, NULL, 0, 128, -128, -128 }, { O_PLAYER_LEFT, NULL, P_PLAYER, NULL, 0, 232, -232, -232 }, { O_PLAYER_RIGHT, NULL, P_PLAYER, NULL, 0, 240, -240, -240 }, + { O_PLAYER_UP, NULL, P_PLAYER, NULL, 0, 376, -376, -376 }, + { O_PLAYER_DOWN, NULL, P_PLAYER, NULL, 0, 384, -384, -384 }, { O_PLAYER_TAP, NULL, P_PLAYER, NULL, 0, 216, -216, -216 }, { O_PLAYER_BLINK, NULL, P_PLAYER, NULL, 0, 208, -208, -208 }, { O_PLAYER_TAP_BLINK, NULL, P_PLAYER, NULL, 0, 224, -224, -224 }, diff --git a/src/game_bd/bd_elements.h b/src/game_bd/bd_elements.h index 34945ec7..dd36b1ee 100644 --- a/src/game_bd/bd_elements.h +++ b/src/game_bd/bd_elements.h @@ -279,6 +279,8 @@ typedef enum _element O_COVERED, O_PLAYER_LEFT, O_PLAYER_RIGHT, + O_PLAYER_UP, + O_PLAYER_DOWN, O_PLAYER_TAP, O_PLAYER_BLINK, O_PLAYER_TAP_BLINK, diff --git a/src/tools.c b/src/tools.c index 77342590..39976f9d 100644 --- a/src/tools.c +++ b/src/tools.c @@ -7481,6 +7481,14 @@ bd_object_mapping_list[] = O_PLAYER_RIGHT, FALSE, EL_BD_PLAYER, ACTION_MOVING, MV_BIT_RIGHT }, + { + O_PLAYER_UP, FALSE, + EL_BD_PLAYER, ACTION_MOVING, MV_BIT_UP + }, + { + O_PLAYER_DOWN, FALSE, + EL_BD_PLAYER, ACTION_MOVING, MV_BIT_DOWN + }, { O_PLAYER_BLINK, FALSE, EL_BD_PLAYER, ACTION_BORING_1, -1