#if 1
FadeOut(REDRAW_FIELD);
+ // FadeOut(REDRAW_ALL);
#endif
#if 1
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();
#if 1
FadeIn(REDRAW_FIELD);
+ // FadeIn(REDRAW_ALL);
#endif
/* copy actual editor door content to door double buffer for OpenDoor() */
BackToFront();
#endif
+#if 0
OpenDoor(DOOR_OPEN_1);
+#endif
}
static void AdjustDrawingAreaGadgets()
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)
{
game_status = GAME_MODE_SETUP;
setup_mode = SETUP_MODE_MAIN;
+#if 1
+ ChangeViewportPropertiesIfNeeded();
+#endif
+
DrawSetupScreen();
}
else if (pos == MAIN_CONTROL_QUIT)
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[] =
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);
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;
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];
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);
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));
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])
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];