From: Holger Schemel Date: Sat, 16 May 2015 19:42:58 +0000 (+0200) Subject: small code cleanup of screen redraw functions (SP) X-Git-Tag: 4.0.0.0-rc1~205 X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=commitdiff_plain;h=4145364edf9ddec790b586344f9570145ae39896 small code cleanup of screen redraw functions (SP) --- diff --git a/src/game_sp/DDScrollBuffer.c b/src/game_sp/DDScrollBuffer.c index 6a53fa30..d90835b3 100644 --- a/src/game_sp/DDScrollBuffer.c +++ b/src/game_sp/DDScrollBuffer.c @@ -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) diff --git a/src/game_sp/export.h b/src/game_sp/export.h index 001fb6d7..72bffa2b 100644 --- a/src/game_sp/export.h +++ b/src/game_sp/export.h @@ -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); diff --git a/src/game_sp/main.c b/src/game_sp/main.c index efe66ad9..f0b7603e 100644 --- a/src/game_sp/main.c +++ b/src/game_sp/main.c @@ -59,7 +59,7 @@ void RedrawPlayfield_SP(boolean force_redraw) UpdatePlayfield(force_redraw); - BackToFront_SP(); + BlitScreenToBitmap_SP(window); } void UpdateGameDoorValues_SP()