small code cleanup of screen redraw functions (SP)
authorHolger Schemel <info@artsoft.org>
Sat, 16 May 2015 19:42:58 +0000 (21:42 +0200)
committerHolger Schemel <info@artsoft.org>
Sat, 16 May 2015 19:42:58 +0000 (21:42 +0200)
src/game_sp/DDScrollBuffer.c
src/game_sp/export.h
src/game_sp/main.c

index 6a53fa3082f7910ebda69d0f741efd51dc3c7fca..d90835b3e50ef804e0d220600cec84b35fea16bd 100644 (file)
@@ -197,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;
@@ -230,11 +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)
-{
-  BlitScreenToBitmap_SP(window);
-}
-
 void DDScrollBuffer_ScrollTo(int X, int Y)
 {
   if (NoDisplayFlag)
index 001fb6d7e6145126861bbd92b0877be36e5720b0..72bffa2b5b77fc28af5a0e4c3208c7b6eda5f97f 100644 (file)
@@ -187,7 +187,6 @@ extern void copyInternalEngineVars_SP();
 extern boolean LoadNativeLevel_SP(char *, int, boolean);
 extern void SaveNativeLevel_SP(char *);
 
-extern void BackToFront_SP(void);
 extern void BlitScreenToBitmap_SP(Bitmap *);
 extern void RedrawPlayfield_SP(boolean);
 
index efe66ad90b9784cbebbea7d7d4c235b93f0aaa0a..f0b7603e13303df3080e15f951daf849a43c46d2 100644 (file)
@@ -59,7 +59,7 @@ void RedrawPlayfield_SP(boolean force_redraw)
 
   UpdatePlayfield(force_redraw);
 
-  BackToFront_SP();
+  BlitScreenToBitmap_SP(window);
 }
 
 void UpdateGameDoorValues_SP()