From a295976063bf04d6e7ee2d04d238235aac05bf92 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Mon, 28 Jun 2010 20:55:24 +0200 Subject: [PATCH] rnd-20100628-2-src --- src/conftime.h | 2 +- src/game_sp/DDScrollBuffer.c | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/conftime.h b/src/conftime.h index e6600b90..11e5c4fc 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "2010-06-28 18:25" +#define COMPILE_DATE_STRING "2010-06-28 20:54" diff --git a/src/game_sp/DDScrollBuffer.c b/src/game_sp/DDScrollBuffer.c index fa5f0814..bb3b5c04 100644 --- a/src/game_sp/DDScrollBuffer.c +++ b/src/game_sp/DDScrollBuffer.c @@ -331,7 +331,8 @@ void BackToFront_SP(void) SyncDisplay(); - if (redraw_tiles > REDRAWTILES_THRESHOLD || scrolling || scrolling_last || + if (0 || + redraw_tiles > REDRAWTILES_THRESHOLD || scrolling || scrolling_last || ExplosionShakeMurphy != 0 || ExplosionShakeMurphy_last != 0) { BlitScreenToBitmap_SP(window); @@ -349,10 +350,23 @@ void BackToFront_SP(void) int full_xsize = (FieldWidth - (menBorder ? 0 : 1)) * TILEX; int full_ysize = (FieldHeight - (menBorder ? 0 : 1)) * TILEY; #endif +#if 1 + int xsize = SXSIZE; + int ysize = SYSIZE; + int sxsize = (full_xsize < xsize ? full_xsize : xsize); + int sysize = (full_ysize < ysize ? full_ysize : ysize); + int sx = SX + (full_xsize < xsize ? (xsize - full_xsize) / 2 : 0); + int sy = SY + (full_ysize < ysize ? (ysize - full_ysize) / 2 : 0); +#else int sx = SX + (full_xsize < SXSIZE ? (SXSIZE - full_xsize) / 2 : 0); int sy = SY + (full_ysize < SYSIZE ? (SYSIZE - full_ysize) / 2 : 0); +#endif +#if 1 + InitGfxClipRegion(TRUE, sx, sy, sxsize, sysize); +#else InitGfxClipRegion(TRUE, SX, SY, SXSIZE, SYSIZE); +#endif #if NEW_TILESIZE scroll_xoffset = scroll_xoffset * TILESIZE_VAR / TILESIZE; -- 2.34.1