reset_delay = TRUE;
/* Fill empty backbuffer for animation functions */
- if (direct_draw_on && game_status==PLAYING)
+ if (direct_draw_on && game_status == PLAYING)
{
int xx,yy;
- drawto_field = backbuffer;
+ SetDrawtoField(DRAW_BACKBUFFER);
for(xx=0;xx<SCR_FIELDX;xx++)
for(yy=0;yy<SCR_FIELDY;yy++)
DrawScreenField(xx,yy);
DrawPlayerField();
- drawto_field = window;
+ SetDrawtoField(DRAW_DIRECT);
+ }
+
+ if (soft_scrolling_on && game_status == PLAYING)
+ {
+ int fx = FX, fy = FY;
+
+ fx += (PlayerMovDir & (MV_LEFT|MV_RIGHT) ? ScreenMovPos : 0);
+ fy += (PlayerMovDir & (MV_UP|MV_DOWN) ? ScreenMovPos : 0);
+
+ XCopyArea(display,fieldbuffer,backbuffer,gc,
+ fx,fy, SXSIZE,SYSIZE,
+ SX,SY);
}
return;
case ANIM_CONTINUE:
break;
case ANIM_STOP:
- redraw_mask |= REDRAW_FIELD;
+ redraw_mask |= (REDRAW_FIELD | REDRAW_FROM_BACKBUFFER);
/* Redraw background even when in direct drawing mode */
draw_mode = direct_draw_on;