rnd-20061013-1-src
[rocksndiamonds.git] / src / libgame / system.c
index 264a3366832f24750ff3de0a2a9d3527ed2b9377..55046b8890a428a037ed9b3437c1405d1979db0c 100644 (file)
@@ -1,7 +1,7 @@
 /***********************************************************
 * Artsoft Retro-Game Library                               *
 *----------------------------------------------------------*
-* (c) 1994-2002 Artsoft Entertainment                      *
+* (c) 1994-2006 Artsoft Entertainment                      *
 *               Holger Schemel                             *
 *               Detmolder Strasse 189                      *
 *               33604 Bielefeld                            *
@@ -424,13 +424,16 @@ inline static boolean CheckDrawingArea(int x, int y, int width, int height,
   if (draw_mask & REDRAW_ALL)
     return TRUE;
 
-  if ((draw_mask & REDRAW_FIELD) && x < gfx.real_sx + gfx.full_sxsize)
+  if ((draw_mask & REDRAW_FIELD) &&
+      x >= gfx.real_sx && x < gfx.real_sx + gfx.full_sxsize)
     return TRUE;
 
-  if ((draw_mask & REDRAW_DOOR_1) && x >= gfx.dx && y < gfx.dy + gfx.dysize)
+  if ((draw_mask & REDRAW_DOOR_1) &&
+      x >= gfx.dx && y < gfx.dy + gfx.dysize)
     return TRUE;
 
-  if ((draw_mask & REDRAW_DOOR_2) && x >= gfx.dx && y >= gfx.vy)
+  if ((draw_mask & REDRAW_DOOR_2) &&
+      x >= gfx.dx && y >= gfx.vy)
     return TRUE;
 
   return FALSE;
@@ -459,14 +462,15 @@ void BlitBitmap(Bitmap *src_bitmap, Bitmap *dst_bitmap,
 }
 
 void FadeRectangle(Bitmap *bitmap_cross, int x, int y, int width, int height,
-                  int fade_mode, int fade_delay, int post_delay)
+                  int fade_mode, int fade_delay, int post_delay,
+                  void (*draw_border_function)(void))
 {
 #if defined(TARGET_SDL)
   SDLFadeRectangle(bitmap_cross, x, y, width, height,
-                  fade_mode, fade_delay, post_delay);
+                  fade_mode, fade_delay, post_delay, draw_border_function);
 #else
   X11FadeRectangle(bitmap_cross, x, y, width, height,
-                  fade_mode, fade_delay, post_delay);
+                  fade_mode, fade_delay, post_delay, draw_border_function);
 #endif
 }