{ "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_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_down_left", "RocksBD.png" },
{ "bdx_sand_sloped_down_left.xpos", "10" },
{ "bdx_sand_sloped_down_left.ypos", "5" },
{ "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_right", "RocksBD.png" },
{ "bdx_sand_sloped_down_right.xpos", "11" },
{ "bdx_sand_sloped_down_right.ypos", "5" },
{ "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_glued", UNDEFINED_FILENAME },
{ "bdx_sand_glued.clone_from", "bdx_sand" },
P_DIRT | P_SLOPED_DOWN | P_SLOPED_RIGHT | P_AMOEBA_CONSUMES | P_DIGGABLE,
"DIRTSLOPEDDOWNRIGHT", 0, 283, 283, 283
},
+ {
+ O_DIRT_SLOPED_UP_RIGHT_CRUMBLED, O_DIRT_SLOPED_UP_RIGHT_CRUMBLED, N_("Sloped dirt (up & right, crumbled)"),
+ P_DIRT | P_SLOPED_UP | P_SLOPED_RIGHT | P_AMOEBA_CONSUMES | P_DIGGABLE,
+ "DIRTSLOPEDUPRIGHT_CRUMBLED", 0, 280, 280, 280
+ },
+ {
+ O_DIRT_SLOPED_UP_LEFT_CRUMBLED, O_DIRT_SLOPED_UP_LEFT_CRUMBLED, N_("Sloped dirt (up & left, crumbled)"),
+ P_DIRT | P_SLOPED_UP | P_SLOPED_LEFT | P_AMOEBA_CONSUMES | P_DIGGABLE,
+ "DIRTSLOPEDUPLEFT_CRUMBLED", 0, 281, 281, 281
+ },
+ {
+ O_DIRT_SLOPED_DOWN_LEFT_CRUMBLED, O_DIRT_SLOPED_DOWN_LEFT_CRUMBLED, N_("Sloped dirt (down & left, crumbled)"),
+ P_DIRT | P_SLOPED_DOWN | P_SLOPED_LEFT | P_AMOEBA_CONSUMES | P_DIGGABLE,
+ "DIRTSLOPEDDOWNLEFT_CRUMBLED", 0, 282, 282, 282
+ },
+ {
+ O_DIRT_SLOPED_DOWN_RIGHT_CRUMBLED, O_DIRT_SLOPED_DOWN_RIGHT_CRUMBLED, N_("Sloped dirt (down & right, crumbled)"),
+ P_DIRT | P_SLOPED_DOWN | P_SLOPED_RIGHT | P_AMOEBA_CONSUMES | P_DIGGABLE,
+ "DIRTSLOPEDDOWNRIGHT_CRUMBLED", 0, 283, 283, 283
+ },
{
O_DIRT_BALL, O_DIRT_BALL_scanned, N_("Dirt ball"),
P_DIRT | P_SLOPED | P_AMOEBA_CONSUMES | P_MOVED_BY_CONVEYOR_TOP | P_DIGGABLE | P_CAN_FALL,
O_DIRT_SLOPED_UP_LEFT,
O_DIRT_SLOPED_DOWN_LEFT,
O_DIRT_SLOPED_DOWN_RIGHT,
+ O_DIRT_SLOPED_UP_RIGHT_CRUMBLED,
+ O_DIRT_SLOPED_UP_LEFT_CRUMBLED,
+ O_DIRT_SLOPED_DOWN_LEFT_CRUMBLED,
+ O_DIRT_SLOPED_DOWN_RIGHT_CRUMBLED,
O_DIRT_BALL,
O_DIRT_BALL_scanned,
O_DIRT_BALL_F,
static inline boolean el_has_crumbled(const int element)
{
int tile_gfx = element;
- int tile_crm = (element == O_DIRT ? O_DIRT_CRUMBLED :
- element == O_DIRT2 ? O_DIRT2_CRUMBLED :
- element == O_DIRT_GLUED ? O_DIRT_GLUED_CRUMBLED :
- element == O_BITER_SWITCH_1 ? O_BITER_SWITCH_1_CRUMBLED :
- element == O_BITER_SWITCH_2 ? O_BITER_SWITCH_2_CRUMBLED :
- element == O_BITER_SWITCH_3 ? O_BITER_SWITCH_3_CRUMBLED :
- element == O_BITER_SWITCH_4 ? O_BITER_SWITCH_4_CRUMBLED :
+ int tile_crm = (element == O_DIRT ? O_DIRT_CRUMBLED :
+ element == O_DIRT2 ? O_DIRT2_CRUMBLED :
+ element == O_DIRT_GLUED ? O_DIRT_GLUED_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 == O_BITER_SWITCH_1 ? O_BITER_SWITCH_1_CRUMBLED :
+ element == O_BITER_SWITCH_2 ? O_BITER_SWITCH_2_CRUMBLED :
+ element == O_BITER_SWITCH_3 ? O_BITER_SWITCH_3_CRUMBLED :
+ element == O_BITER_SWITCH_4 ? O_BITER_SWITCH_4_CRUMBLED :
element);
struct GraphicInfo_BD *gfx = &graphic_info_bd_object[tile_gfx][0];
struct GraphicInfo_BD *crm = &graphic_info_bd_object[tile_crm][0];
case O_DIRT_GLUED:
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);
+
case O_BITER_SWITCH_1:
return (crumbled ? O_BITER_SWITCH_1_CRUMBLED : O_BITER_SWITCH_1);
boolean draw_normal = ((el_has_crumbled(draw)) ||
(el_has_crumbled(draw_last) && is_moving_to));
+ // special case: handle sloped sand sides separately
+ if ((dir == GD_MV_UP && (draw == O_DIRT_SLOPED_DOWN_LEFT ||
+ draw == O_DIRT_SLOPED_DOWN_RIGHT)) ||
+ (dir == GD_MV_DOWN && (draw == O_DIRT_SLOPED_UP_LEFT ||
+ draw == O_DIRT_SLOPED_UP_RIGHT)) ||
+ (dir == GD_MV_LEFT && (draw == O_DIRT_SLOPED_UP_RIGHT ||
+ draw == O_DIRT_SLOPED_DOWN_RIGHT)) ||
+ (dir == GD_MV_RIGHT && (draw == O_DIRT_SLOPED_UP_LEFT ||
+ draw == O_DIRT_SLOPED_DOWN_LEFT)))
+ draw_normal = FALSE;
+
if (draw_normal)
blit_bitmap(gfx->bitmap, dest, gfx->src_x + xoffset, gfx->src_y + yoffset,
xsize, ysize, sx + xoffset, sy + yoffset);
O_DIRT_SLOPED_DOWN_RIGHT, TRUE,
EL_BDX_SAND_SLOPED_DOWN_RIGHT, -1, -1
},
+ {
+ O_DIRT_SLOPED_UP_RIGHT_CRUMBLED, FALSE,
+ EL_BDX_SAND_SLOPED_UP_RIGHT, -1, -1
+ },
+ {
+ O_DIRT_SLOPED_UP_LEFT_CRUMBLED, FALSE,
+ EL_BDX_SAND_SLOPED_UP_LEFT, -1, -1
+ },
+ {
+ O_DIRT_SLOPED_DOWN_LEFT_CRUMBLED, FALSE,
+ EL_BDX_SAND_SLOPED_DOWN_LEFT, -1, -1
+ },
+ {
+ O_DIRT_SLOPED_DOWN_RIGHT_CRUMBLED, FALSE,
+ EL_BDX_SAND_SLOPED_DOWN_RIGHT, -1, -1
+ },
{
O_DIRT_BALL, TRUE,
EL_BDX_GRASS_BALL, -1, -1
{
int effective_element = element;
int effective_action = action;
- int graphic = (i == O_DIRT_CRUMBLED ||
- i == O_DIRT2_CRUMBLED ||
- i == O_DIRT_GLUED_CRUMBLED ||
- i == O_BITER_SWITCH_1_CRUMBLED ||
- i == O_BITER_SWITCH_2_CRUMBLED ||
- i == O_BITER_SWITCH_3_CRUMBLED ||
- i == O_BITER_SWITCH_4_CRUMBLED ?
+ int graphic = (i == O_DIRT_CRUMBLED ||
+ i == O_DIRT2_CRUMBLED ||
+ i == O_DIRT_GLUED_CRUMBLED ||
+ i == O_DIRT_SLOPED_UP_RIGHT_CRUMBLED ||
+ i == O_DIRT_SLOPED_UP_LEFT_CRUMBLED ||
+ i == O_DIRT_SLOPED_DOWN_LEFT_CRUMBLED ||
+ i == O_DIRT_SLOPED_DOWN_RIGHT_CRUMBLED ||
+ i == O_BITER_SWITCH_1_CRUMBLED ||
+ i == O_BITER_SWITCH_2_CRUMBLED ||
+ i == O_BITER_SWITCH_3_CRUMBLED ||
+ i == O_BITER_SWITCH_4_CRUMBLED ?
graphic = el_act2crm(effective_element, effective_action) :
i == O_DIRT_DIGGING_LEFT_CRUMBLED ||
i == O_DIRT_DIGGING_RIGHT_CRUMBLED ||