int sx = x - level_xpos;
int sy = y - level_ypos;
int old_element = Feld[x][y];
+ int new_element = element;
unsigned int new_bitmask = (getDrawModeHiRes() ? (dx + 1) << (dy * 2) : 0x0f);
boolean draw_masked = FALSE;
if (IN_ED_FIELD(sx, sy))
{
- if (draw_masked)
+ if (IS_MM_WALL(old_element) && new_element == EL_EMPTY)
+ DrawSizedWallParts_MM(sx, sy, EL_EMPTY, ed_tilesize, FALSE, new_bitmask);
+ else if (draw_masked)
DrawEditorElementThruMask(sx, sy, element);
else
DrawEditorElement(sx, sy, element);
}
static void DrawSizedWallExt_MM(int dst_x, int dst_y, int element, int tilesize,
- int (*el2img_function)(int), boolean masked)
+ int (*el2img_function)(int), boolean masked,
+ int element_bits_draw)
{
int element_base = map_mm_wall_element(element);
int element_bits = (IS_DF_WALL(element) ?
element - EL_DF_WALL_START :
- element - EL_MM_WALL_START) & 0x000f;
+ IS_MM_WALL(element) ?
+ element - EL_MM_WALL_START : EL_EMPTY) & 0x000f;
int graphic = el2img_function(element_base);
int tilesize_draw = tilesize / 2;
Bitmap *src_bitmap;
int dst_draw_x = dst_x + (i % 2) * tilesize_draw;
int dst_draw_y = dst_y + (i / 2) * tilesize_draw;
+ if (!(element_bits_draw & (1 << i)))
+ continue;
+
if (element_bits & (1 << i))
{
if (masked)
}
}
+void DrawSizedWallParts_MM(int x, int y, int element, int tilesize,
+ boolean masked, int element_bits_draw)
+{
+ DrawSizedWallExt_MM(SX + x * tilesize, SY + y * tilesize,
+ element, tilesize, el2edimg, masked, element_bits_draw);
+}
+
void DrawSizedWall_MM(int dst_x, int dst_y, int element, int tilesize,
int (*el2img_function)(int))
{
- DrawSizedWallExt_MM(dst_x, dst_y, element, tilesize, el2img_function, FALSE);
+ DrawSizedWallExt_MM(dst_x, dst_y, element, tilesize, el2img_function, FALSE,
+ 0x000f);
}
void DrawSizedElementExt(int x, int y, int element, int tilesize,
if (IS_MM_WALL(element))
{
DrawSizedWallExt_MM(SX + x * tilesize, SY + y * tilesize,
- element, tilesize, el2edimg, masked);
+ element, tilesize, el2edimg, masked, 0x000f);
}
else
{
void DrawScreenField(int, int);
void DrawLevelField(int, int);
+void DrawSizedWallParts_MM(int, int, int, int, boolean, int);
void DrawSizedElement(int, int, int, int);
void DrawSizedElementThruMask(int, int, int, int);
void DrawSizedElementOrWall(int, int, int, int, int);