cleanup of some common and specific game engine function calls
[rocksndiamonds.git] / src / game_sp / DDScrollBuffer.c
index e7664f7651fc2ef81016562f805461a4179611bd..d90835b3e50ef804e0d220600cec84b35fea16bd 100644 (file)
@@ -11,7 +11,6 @@ int mScrollX, mScrollY;
 int mScrollX_last, mScrollY_last;
 
 int ScreenBuffer[2 + MAX_PLAYFIELD_WIDTH + 2][2 + MAX_PLAYFIELD_HEIGHT + 2];
-boolean redraw[2 + MAX_PLAYFIELD_WIDTH + 2][2 + MAX_PLAYFIELD_HEIGHT + 2];
 
 
 void RestorePlayfield()
@@ -53,12 +52,6 @@ static void ScrollPlayfield(int dx, int dy)
              TILEX_VAR * (dx == 1),
              TILEY_VAR * (dy == 1));
 
-  /* when scrolling the whole playfield, do not redraw single tiles */
-  for (x = 0; x < 2 + MAX_PLAYFIELD_WIDTH + 2; x++)
-    for (y = 0; y < 2 + MAX_PLAYFIELD_HEIGHT + 2; y++)
-      redraw[x][y] = FALSE;
-  redraw_tiles = 0;
-
   DrawFrameIfNeeded();
 
   for (y = DisplayMinY; y <= DisplayMaxY; y++)
@@ -204,10 +197,10 @@ void UpdatePlayfield(boolean force_redraw)
 #endif
 }
 
-/* copy the entire screen to the window at the scroll position */
-
 void BlitScreenToBitmap_SP(Bitmap *target_bitmap)
 {
+  /* copy playfield buffer to target bitmap at scroll position */
+
   int px = 2 * TILEX + (mScrollX - mScrollX_last) % TILEX;
   int py = 2 * TILEY + (mScrollY - mScrollY_last) % TILEY;
   int sx, sy, sxsize, sysize;
@@ -237,18 +230,6 @@ void BlitScreenToBitmap_SP(Bitmap *target_bitmap)
   BlitBitmap(bitmap_db_field_sp, target_bitmap, px, py, sxsize, sysize, sx, sy);
 }
 
-void BackToFront_SP(void)
-{
-  int x, y;
-
-  BlitScreenToBitmap_SP(window);
-
-  for (x = 0; x < 2 + MAX_PLAYFIELD_WIDTH + 2; x++)
-    for (y = 0; y < 2 + MAX_PLAYFIELD_HEIGHT + 2; y++)
-      redraw[x][y] = FALSE;
-  redraw_tiles = 0;
-}
-
 void DDScrollBuffer_ScrollTo(int X, int Y)
 {
   if (NoDisplayFlag)