rnd-19990107-2
[rocksndiamonds.git] / src / editor.c
index 6c1375652715fe1b6db18057fabe38ac2e7bb125..1265f4f72def1379441a5bd44af6991018146391 100644 (file)
@@ -18,6 +18,7 @@
 #include "buttons.h"
 #include "files.h"
 #include "game.h"
+#include "tape.h"
 
 /* positions in the level editor */
 #define ED_WIN_MB_LEFT_XPOS    7
@@ -909,6 +910,8 @@ void DrawLevelEd()
 
   CloseDoor(DOOR_CLOSE_ALL);
 
+  OpenDoor(DOOR_OPEN_2 | DOOR_NO_DELAY);
+
   if (level_editor_test_game)
   {
     for(x=0; x<lev_fieldx; x++)
@@ -2969,8 +2972,25 @@ static void HandleControlButtons(struct GadgetInfo *gi)
          for(y=0; y<lev_fieldy; y++)
            Ur[x][y] = Feld[x][y];
 
+       UnmapLevelEditorGadgets();
+
+       /* draw smaller door */
+       XCopyArea(display, pix[PIX_DOOR], drawto, gc,
+                 DOOR_GFX_PAGEX7, 64,
+                 108, 64,
+                 EX - 4, EY - 12);
+       redraw_mask |= REDRAW_ALL;
+
+       CloseDoor(DOOR_CLOSE_ALL);
+
+       DrawCompleteVideoDisplay();
+
+       if (setup.autorecord)
+         TapeStartRecording();
+
        level_editor_test_game = TRUE;
        game_status = PLAYING;
+
        InitGame();
       }
       break;