ClearRectangle(backbuffer, x, y, width, height);
#endif
+#if 1
+
+#if 1
+ BlitBitmap(backbuffer, window, x, y, width, height, x, y);
+
+ redraw_mask &= ~fade_mask;
+#else
+ /* always redraw area that was explicitly marked to fade */
+ redraw_mask |= fade_mask;
+
+ BackToFront();
+#endif
+
+#else
+
#if 1
BlitBitmap(backbuffer, window, x, y, width, height, x, y);
redraw_mask = REDRAW_NONE;
+ // (^^^ WRONG; should be "redraw_mask &= ~fade_mask" if done this way)
#else
BackToFront();
+#endif
#endif
return;
dst_x + xsize_size_left, dst_y + ysize_size_top);
#endif
-#if 1
+#if 0
redraw_mask = REDRAW_FIELD | REDRAW_FROM_BACKBUFFER;
// redraw_mask |= REDRAW_ALL | REDRAW_FROM_BACKBUFFER;
#else
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];