improved graphics for digging crumbled BD style sloped sand
authorHolger Schemel <holger.schemel@virtion.de>
Tue, 17 Dec 2024 19:05:30 +0000 (20:05 +0100)
committerHolger Schemel <holger.schemel@virtion.de>
Tue, 17 Dec 2024 15:07:17 +0000 (16:07 +0100)
graphics/gfx_classic/RocksBD.png
src/conf_gfx.c
src/game_bd/bd_graphics.c

index 3d98bf389bff0f07e6967aa13cb26ab5c321b508..28a6d0230632dd9e352dc80365ef3530894f1a89 100644 (file)
Binary files a/graphics/gfx_classic/RocksBD.png and b/graphics/gfx_classic/RocksBD.png differ
index 95939a2512517421662dcbee3077d8497e44c926..cc9b0615e41fb8be0534af8279e2515c0f48ddcf 100644 (file)
@@ -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"                      },
index 8f96f9a52e42bf960333e6a9d24db2deaf25928a..b23ce6135b223dc2e7dd0e4ed45d07dfca7183d6 100644 (file)
@@ -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);