rnd-20140308-1-src
authorHolger Schemel <info@artsoft.org>
Fri, 7 Mar 2014 23:10:21 +0000 (00:10 +0100)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 09:01:17 +0000 (11:01 +0200)
src/conftime.h
src/editor.c
src/screens.c
src/tape.c
src/tools.c

index 725b3fdc8fa8bf2076037f579b523266b0a23dc9..5e5f42be3037cc97c77ff556dd0eb0c81f230a12 100644 (file)
@@ -1 +1 @@
-#define COMPILE_DATE_STRING "2014-03-07 10:48"
+#define COMPILE_DATE_STRING "2014-03-07 21:52"
index 7c513965ffb6b2ca7d3989d544488b8680a81fca..1fe6e544b86c631277e8a35ac611a8225c28177a 100644 (file)
@@ -7751,6 +7751,7 @@ void DrawLevelEd()
 
 #if 1
   FadeOut(REDRAW_FIELD);
+  // FadeOut(REDRAW_ALL);
 #endif
 
 #if 1
@@ -7758,7 +7759,11 @@ void DrawLevelEd()
   ChangeViewportPropertiesIfNeeded();
 #endif
 
+#if 1
+  OpenDoor(DOOR_OPEN_1 | DOOR_OPEN_2 | DOOR_NO_DELAY);
+#else
   OpenDoor(DOOR_OPEN_2 | DOOR_NO_DELAY);
+#endif
 
 #if DEBUG
   CheckElementDescriptions();
@@ -7832,6 +7837,7 @@ void DrawLevelEd()
 
 #if 1
   FadeIn(REDRAW_FIELD);
+  // FadeIn(REDRAW_ALL);
 #endif
 
   /* copy actual editor door content to door double buffer for OpenDoor() */
@@ -7848,7 +7854,9 @@ void DrawLevelEd()
   BackToFront();
 #endif
 
+#if 0
   OpenDoor(DOOR_OPEN_1);
+#endif
 }
 
 static void AdjustDrawingAreaGadgets()
index 5bcaa1d5abb047a22033ac7e0356575f7da8ab48..aeef4fece33dbe8cc71e68bf45157f5d5d2ed26c 100644 (file)
@@ -1481,6 +1481,11 @@ void DrawMainMenuExt(int fade_mask, boolean do_fading)
   MapTapeButtons();
   MapScreenMenuGadgets(SCREEN_MASK_MAIN);
 
+#if 1
+  /* copy actual game door content to door double buffer for OpenDoor() */
+  BlitBitmap(drawto, bitmap_db_door_2, VX, VY, VXSIZE, VYSIZE, 0, 0);
+#endif
+
 #if 1
   if (fade_mask == REDRAW_ALL)
   {
@@ -1958,6 +1963,10 @@ void HandleMainMenu(int mx, int my, int dx, int dy, int button)
        game_status = GAME_MODE_SETUP;
        setup_mode = SETUP_MODE_MAIN;
 
+#if 1
+       ChangeViewportPropertiesIfNeeded();
+#endif
+
        DrawSetupScreen();
       }
       else if (pos == MAIN_CONTROL_QUIT)
index 782db9be781affbca9471a3678b0c198195e056f..9a5aaa9191c08b4211b3bc147c766d4102368864 100644 (file)
@@ -544,6 +544,20 @@ void DrawCompleteVideoDisplay()
         tape.date, tape.length);
 #endif
 
+#if 1
+
+  struct GraphicInfo *g_tape = &graphic_info[IMG_BACKGROUND_TAPE];
+
+  /* draw tape background */
+  BlitBitmap(g_tape->bitmap, drawto, g_tape->src_x, g_tape->src_y,
+            gfx.vxsize, gfx.vysize, gfx.vx, gfx.vy);
+
+  /* draw tape buttons (forced) */
+  UnmapTapeButtons();
+  MapTapeButtons();
+
+#else
+
 #if 1
   struct GraphicInfo *g_tape = &graphic_info[IMG_BACKGROUND_TAPE];
   int tape_button_graphics[] =
@@ -584,6 +598,8 @@ void DrawCompleteVideoDisplay()
             DOOR_GFX_PAGEY2 + VIDEO_CONTROL_YPOS,
             VIDEO_CONTROL_XSIZE, VIDEO_CONTROL_YSIZE,
             gfx.vx + VIDEO_CONTROL_XPOS, gfx.vy + VIDEO_CONTROL_YPOS);
+#endif
+
 #endif
 
   DrawVideoDisplay(VIDEO_ALL_OFF, 0);
index 21728e5a081efa7910da8dbcb3bfdf0f07c39c22..c6c5acf8c660eabdecc39a9e6aed4495a674f2bb 100644 (file)
@@ -5702,6 +5702,7 @@ unsigned int MoveDoor(unsigned int door_state)
   if (door_state & DOOR_ACTION)
   {
     boolean door_panel_drawn[NUM_DOORS];
+    boolean panel_has_doors[NUM_DOORS];
     boolean door_part_skip[MAX_DOOR_PARTS];
     boolean door_part_done[MAX_DOOR_PARTS];
     boolean door_part_done_all;
@@ -5712,6 +5713,9 @@ unsigned int MoveDoor(unsigned int door_state)
     int current_move_delay = 0;
     int k;
 
+    for (i = 0; i < NUM_DOORS; i++)
+      panel_has_doors[i] = FALSE;
+
     for (i = 0; i < MAX_DOOR_PARTS; i++)
     {
       struct DoorPartControlInfo *dpc = &door_part_controls[i];
@@ -5742,6 +5746,7 @@ unsigned int MoveDoor(unsigned int door_state)
       struct DoorPartPosInfo *pos = dpc->pos;
       struct GraphicInfo *g = &graphic_info[dpc->graphic];
       int door_token = dpc->door_token;
+      int door_index = DOOR_INDEX_FROM_TOKEN(door_token);
       boolean is_panel = DOOR_PART_IS_PANEL(nr);
       int step_xoffset = ABS(pos->step_xoffset);
       int step_yoffset = ABS(pos->step_yoffset);
@@ -5764,6 +5769,9 @@ unsigned int MoveDoor(unsigned int door_state)
       if (door_part_skip[nr])
        continue;
 
+      if (!is_panel)
+       panel_has_doors[door_index] = TRUE;
+
       max_move_delay = MAX(max_move_delay, move_delay);
       max_step_delay = (max_step_delay == 0 ? step_delay :
                        euclid(max_step_delay, step_delay));
@@ -6009,9 +6017,16 @@ unsigned int MoveDoor(unsigned int door_state)
          door_part_done[nr] = TRUE;
 #endif
 
+#if 1
+       // continue door part animations, but not panel after door has closed
+       if (!door_part_done[nr] &&
+           !(is_panel && door_closing && panel_has_doors[door_index]))
+         door_part_done_all = FALSE;
+#else
        // continue door part animations, but not panel after door has closed
        if (!door_part_done[nr] && !(is_panel && door_closing))
          door_part_done_all = FALSE;
+#endif
 
 #if 0
        if (!door_part_done[nr])
@@ -11271,9 +11286,13 @@ void ChangeViewportPropertiesIfNeeded()
   int *door_2_x = (game_status == GAME_MODE_EDITOR ? &EX : &VX);
   int *door_2_y = (game_status == GAME_MODE_EDITOR ? &EY : &VY);
 #endif
+#if 1
+  int gfx_game_mode = game_status;
+#else
   int gfx_game_mode = (game_status == GAME_MODE_PLAYING ||
                       game_status == GAME_MODE_EDITOR ? game_status :
                       GAME_MODE_MAIN);
+#endif
   int gfx_game_mode2 = (game_status == GAME_MODE_EDITOR ? GAME_MODE_DEFAULT :
                        game_status);
   struct RectWithBorder *vp_playfield = &viewport.playfield[gfx_game_mode];