fixed line style drawing with empty space over MM style walls in editor
[rocksndiamonds.git] / src / editor.c
index f841636fc2b1dc23649a8234082470f5a3b4942d..dddcaa8e78f1518c46d3f84afffe6ce5d62a0427 100644 (file)
@@ -3658,6 +3658,7 @@ static void HandleControlButtons(struct GadgetInfo *);
 static void HandleDrawingAreaInfo(struct GadgetInfo *);
 static void PrintEditorGadgetInfoText(struct GadgetInfo *);
 static boolean AskToCopyAndModifyLevelTemplate();
+static boolean getDrawModeHiRes();
 
 static int num_editor_gadgets = 0;     /* dynamically determined */
 
@@ -10296,7 +10297,8 @@ static void SetElementSimpleExt(int x, int y, int dx, int dy, int element,
   int sx = x - level_xpos;
   int sy = y - level_ypos;
   int old_element = Feld[x][y];
-  unsigned int new_bitmask = (dx + 1) << (dy * 2);
+  int new_element = element;
+  unsigned int new_bitmask = (getDrawModeHiRes() ? (dx + 1) << (dy * 2) : 0x0f);
   boolean draw_masked = FALSE;
 
   if (IS_MM_WALL_EDITOR(element))
@@ -10324,7 +10326,9 @@ static void SetElementSimpleExt(int x, int y, int dx, int dy, int element,
 
   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);
@@ -12043,6 +12047,8 @@ static void HandleDrawingAreas(struct GadgetInfo *gi)
        }
        else
        {
+         SetDrawModeHiRes(new_element);
+
          if (new_element == EL_PLAYER_1)
          {
            /* remove player at old position */