fixed broken screen blitting if cave is smaller than screen for EM engine
[rocksndiamonds.git] / src / game_em / graphics.c
index 43c5e4b22cb715e311858766d3d0642c6e90900c..c03267a1e7e84fa9ab9fda27a34e70376306adda 100644 (file)
@@ -75,8 +75,8 @@ void BlitScreenToBitmap_EM(Bitmap *target_bitmap)
   int sysize = (full_ysize < ysize ? full_ysize : ysize);
   int xxsize = MAX_BUF_XSIZE * TILEX - x;
   int yysize = MAX_BUF_YSIZE * TILEY - y;
-  int xoffset = 2 * TILEX;
-  int yoffset = 2 * TILEY;
+  int xoffset = 2 * CAVE_BUFFER_XOFFSET * TILEX;
+  int yoffset = 2 * CAVE_BUFFER_YOFFSET * TILEY;
 
   if (x < xoffset && y < yoffset)
   {