From: Holger Schemel Date: Tue, 17 Dec 2024 19:05:30 +0000 (+0100) Subject: improved graphics for digging crumbled BD style sloped sand X-Git-Tag: 4.4.0.0~9 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=4e6491e280dde08d568c8145ed1476f25e3d7c37;p=rocksndiamonds.git improved graphics for digging crumbled BD style sloped sand --- diff --git a/graphics/gfx_classic/RocksBD.png b/graphics/gfx_classic/RocksBD.png index 3d98bf38..28a6d023 100644 Binary files a/graphics/gfx_classic/RocksBD.png and b/graphics/gfx_classic/RocksBD.png differ diff --git a/src/conf_gfx.c b/src/conf_gfx.c index 95939a25..cc9b0615 100644 --- a/src/conf_gfx.c +++ b/src/conf_gfx.c @@ -660,26 +660,34 @@ struct ConfigInfo image_config[] = { "bdx_sand_sloped_up_left.xpos", "8" }, { "bdx_sand_sloped_up_left.ypos", "5" }, { "bdx_sand_sloped_up_left.frames", "1" }, - { "bdx_sand_sloped_up_left.CRUMBLED", UNDEFINED_FILENAME }, - { "bdx_sand_sloped_up_left.CRUMBLED.clone_from", "bdx_sand.CRUMBLED" }, + { "bdx_sand_sloped_up_left.CRUMBLED", "RocksBD.png" }, + { "bdx_sand_sloped_up_left.CRUMBLED.xpos", "10" }, + { "bdx_sand_sloped_up_left.CRUMBLED.ypos", "5" }, + { "bdx_sand_sloped_up_left.CRUMBLED.frames", "1" }, { "bdx_sand_sloped_up_right", "RocksBD.png" }, { "bdx_sand_sloped_up_right.xpos", "9" }, { "bdx_sand_sloped_up_right.ypos", "5" }, { "bdx_sand_sloped_up_right.frames", "1" }, - { "bdx_sand_sloped_up_right.CRUMBLED", UNDEFINED_FILENAME }, - { "bdx_sand_sloped_up_right.CRUMBLED.clone_from", "bdx_sand.CRUMBLED" }, + { "bdx_sand_sloped_up_right.CRUMBLED", "RocksBD.png" }, + { "bdx_sand_sloped_up_right.CRUMBLED.xpos", "11" }, + { "bdx_sand_sloped_up_right.CRUMBLED.ypos", "5" }, + { "bdx_sand_sloped_up_right.CRUMBLED.frames", "1" }, { "bdx_sand_sloped_down_left", "RocksBD.png" }, { "bdx_sand_sloped_down_left.xpos", "8" }, { "bdx_sand_sloped_down_left.ypos", "6" }, { "bdx_sand_sloped_down_left.frames", "1" }, - { "bdx_sand_sloped_down_left.CRUMBLED", UNDEFINED_FILENAME }, - { "bdx_sand_sloped_down_left.CRUMBLED.clone_from", "bdx_sand.CRUMBLED" }, + { "bdx_sand_sloped_down_left.CRUMBLED", "RocksBD.png" }, + { "bdx_sand_sloped_down_left.CRUMBLED.xpos", "10" }, + { "bdx_sand_sloped_down_left.CRUMBLED.ypos", "6" }, + { "bdx_sand_sloped_down_left.CRUMBLED.frames", "1" }, { "bdx_sand_sloped_down_right", "RocksBD.png" }, { "bdx_sand_sloped_down_right.xpos", "9" }, { "bdx_sand_sloped_down_right.ypos", "6" }, { "bdx_sand_sloped_down_right.frames", "1" }, - { "bdx_sand_sloped_down_right.CRUMBLED", UNDEFINED_FILENAME }, - { "bdx_sand_sloped_down_right.CRUMBLED.clone_from", "bdx_sand.CRUMBLED" }, + { "bdx_sand_sloped_down_right.CRUMBLED", "RocksBD.png" }, + { "bdx_sand_sloped_down_right.CRUMBLED.xpos", "11" }, + { "bdx_sand_sloped_down_right.CRUMBLED.ypos", "6" }, + { "bdx_sand_sloped_down_right.CRUMBLED.frames", "1" }, { "bdx_sand_glued", UNDEFINED_FILENAME }, { "bdx_sand_glued.clone_from", "bdx_sand" }, diff --git a/src/game_bd/bd_graphics.c b/src/game_bd/bd_graphics.c index 8f96f9a5..b23ce613 100644 --- a/src/game_bd/bd_graphics.c +++ b/src/game_bd/bd_graphics.c @@ -599,16 +599,23 @@ static int get_dirt_element(int element, int dir, boolean crumbled) return (crumbled ? O_DIRT_GLUED_CRUMBLED : O_DIRT_GLUED); case O_DIRT_SLOPED_UP_RIGHT: - return (crumbled ? O_DIRT_SLOPED_UP_RIGHT_CRUMBLED : O_DIRT_SLOPED_UP_RIGHT); - case O_DIRT_SLOPED_UP_LEFT: - return (crumbled ? O_DIRT_SLOPED_UP_LEFT_CRUMBLED : O_DIRT_SLOPED_UP_LEFT); - case O_DIRT_SLOPED_DOWN_LEFT: - return (crumbled ? O_DIRT_SLOPED_DOWN_LEFT_CRUMBLED : O_DIRT_SLOPED_DOWN_LEFT); - case O_DIRT_SLOPED_DOWN_RIGHT: - return (crumbled ? O_DIRT_SLOPED_DOWN_RIGHT_CRUMBLED : O_DIRT_SLOPED_DOWN_RIGHT); + return (crumbled ? + (dir == GD_MV_LEFT ? O_DIRT_DIGGING_LEFT_CRUMBLED : + dir == GD_MV_RIGHT ? O_DIRT_DIGGING_RIGHT_CRUMBLED : + dir == GD_MV_UP ? O_DIRT_DIGGING_UP_CRUMBLED : + dir == GD_MV_DOWN ? O_DIRT_DIGGING_DOWN_CRUMBLED : + element == O_DIRT_SLOPED_UP_RIGHT ? O_DIRT_SLOPED_UP_RIGHT_CRUMBLED : + element == O_DIRT_SLOPED_UP_LEFT ? O_DIRT_SLOPED_UP_LEFT_CRUMBLED : + element == O_DIRT_SLOPED_DOWN_LEFT ? O_DIRT_SLOPED_DOWN_LEFT_CRUMBLED : + element == O_DIRT_SLOPED_DOWN_RIGHT ? O_DIRT_SLOPED_DOWN_RIGHT_CRUMBLED : element) : + + (dir == GD_MV_LEFT ? O_DIRT_DIGGING_LEFT : + dir == GD_MV_RIGHT ? O_DIRT_DIGGING_RIGHT : + dir == GD_MV_UP ? O_DIRT_DIGGING_UP : + dir == GD_MV_DOWN ? O_DIRT_DIGGING_DOWN : element)); case O_BITER_SWITCH_1: return (crumbled ? O_BITER_SWITCH_1_CRUMBLED : O_BITER_SWITCH_1);