From: Holger Schemel Date: Fri, 25 Jan 2008 21:53:19 +0000 (+0100) Subject: rnd-20080125-1-src X-Git-Tag: 3.2.6.0^2~20 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=2f188e42574d95e8eb63e9137535a2867b482b89;p=rocksndiamonds.git rnd-20080125-1-src --- diff --git a/src/conftime.h b/src/conftime.h index fa795ebb..0513971f 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "2008-01-22 01:00" +#define COMPILE_DATE_STRING "2008-01-25 22:26" diff --git a/src/editor.c b/src/editor.c index 57331cfc..bc2d8969 100644 --- a/src/editor.c +++ b/src/editor.c @@ -4989,14 +4989,16 @@ static void DrawDrawingArea(int id) static void ScrollMiniLevel(int from_x, int from_y, int scroll) { -#if 1 +#if 0 + /* (directly solved in BlitBitmap() now) */ static Bitmap *tmp_backbuffer = NULL; #endif int x, y; int dx = (scroll == ED_SCROLL_LEFT ? -1 : scroll == ED_SCROLL_RIGHT ? 1 : 0); int dy = (scroll == ED_SCROLL_UP ? -1 : scroll == ED_SCROLL_DOWN ? 1 : 0); -#if 1 +#if 0 + /* (directly solved in BlitBitmap() now) */ if (tmp_backbuffer == NULL) tmp_backbuffer = CreateBitmap(WIN_XSIZE, WIN_YSIZE, DEFAULT_DEPTH); @@ -5028,8 +5030,6 @@ static void ScrollMiniLevel(int from_x, int from_y, int scroll) SY + (dy == +1 ? MINI_TILEY : 0)); #endif - printf("::: ScrollMiniLevel: A.1\n"); - if (dx) { x = (dx == 1 ? 0 : ed_fieldx - 1); @@ -5043,8 +5043,6 @@ static void ScrollMiniLevel(int from_x, int from_y, int scroll) DrawMiniElementOrWall(x, y, from_x, from_y); } - printf("::: ScrollMiniLevel: Z\n"); - redraw_mask |= REDRAW_FIELD; BackToFront(); } diff --git a/src/game.c b/src/game.c index cf5441bf..72314369 100644 --- a/src/game.c +++ b/src/game.c @@ -12674,7 +12674,8 @@ static boolean AllPlayersInVisibleScreen() void ScrollLevel(int dx, int dy) { -#if 1 +#if 0 + /* (directly solved in BlitBitmap() now) */ static Bitmap *bitmap_db_field2 = NULL; int softscroll_offset = (setup.soft_scrolling ? TILEX : 0); int x, y; @@ -12689,7 +12690,8 @@ void ScrollLevel(int dx, int dy) return; #endif -#if 1 +#if 0 + /* (directly solved in BlitBitmap() now) */ if (bitmap_db_field2 == NULL) bitmap_db_field2 = CreateBitmap(FXSIZE, FYSIZE, DEFAULT_DEPTH); diff --git a/src/libgame/system.c b/src/libgame/system.c index 7a6618eb..20ea20be 100644 --- a/src/libgame/system.c +++ b/src/libgame/system.c @@ -491,8 +491,34 @@ void BlitBitmap(Bitmap *src_bitmap, Bitmap *dst_bitmap, if (DrawingDeactivated(dst_x, dst_y, width, height)) return; - sysCopyArea(src_bitmap, dst_bitmap, src_x, src_y, width, height, - dst_x, dst_y, BLIT_OPAQUE); +#if 0 + /* !!! APPARENTLY THIS HAS BEEN FIXED IN SDL 1.2.12 !!! */ +#if defined(TARGET_SDL) && defined(PLATFORM_WIN32) + if (src_bitmap == dst_bitmap) + { + /* !!! THIS IS A BUG (IN THE SDL LIBRARY?) AND SHOULD BE FIXED !!! */ + + /* needed when blitting directly to same bitmap -- should not be needed with + recent SDL libraries, but apparently does not work in 1.2.11 directly */ + + static Bitmap *tmp_bitmap = NULL; + + if (tmp_bitmap == NULL) + tmp_bitmap = CreateBitmap(MAX(FXSIZE, WIN_XSIZE), + MAX(FYSIZE, WIN_YSIZE), DEFAULT_DEPTH); + + sysCopyArea(src_bitmap, tmp_bitmap, + src_x, src_y, width, height, dst_x, dst_y, BLIT_OPAQUE); + sysCopyArea(tmp_bitmap, dst_bitmap, + src_x, src_y, width, height, dst_x, dst_y, BLIT_OPAQUE); + + return; + } +#endif +#endif + + sysCopyArea(src_bitmap, dst_bitmap, + src_x, src_y, width, height, dst_x, dst_y, BLIT_OPAQUE); } void FadeRectangle(Bitmap *bitmap_cross, int x, int y, int width, int height,