added optional button to restart game (door, panel and touch variants)
[rocksndiamonds.git] / src / game_sp / DDSpriteBuffer.c
index 261459adbd04ee65f594eeee4448b4c5ded80412..5d5fc38f14a72fdb5f6724da022fc379a194bad5 100644 (file)
@@ -19,7 +19,7 @@ static void Blt(int pX, int pY, Bitmap *bitmap, int SpriteX, int SpriteY)
   if (NoDisplayFlag)
     return;
 
-  /* do not draw fields that are outside the visible screen area */
+  // do not draw fields that are outside the visible screen area
   if (pX < sx1 || pX > sx2 || pY < sy1 || pY > sy2)
     return;
 
@@ -37,7 +37,10 @@ void DDSpriteBuffer_BltImg(int pX, int pY, int graphic, int sync_frame)
   if (NoDisplayFlag)
     return;
 
-  getGraphicSource_SP(&g, graphic, sync_frame, -1, -1);
+  if (graphic < 0)
+    return;
+
+  getGraphicSource_SP(&g, graphic, sync_frame);
 
   Blt(pX, pY, g.bitmap, g.src_x, g.src_y);
 }