FinalizeScreen(draw_target);
}
-void SDLFadeRectangle(Bitmap *bitmap_cross, int x, int y, int width, int height,
+void SDLFadeRectangle(int x, int y, int width, int height,
int fade_mode, int fade_delay, int post_delay,
void (*draw_border_function)(void))
{
void SDLCopyArea(Bitmap *, Bitmap *, int, int, int, int, int, int, int);
void SDLBlitTexture(Bitmap *, int, int, int, int, int, int, int);
void SDLFillRectangle(Bitmap *, int, int, int, int, Uint32);
-void SDLFadeRectangle(Bitmap *, int, int, int, int, int, int, int,
+void SDLFadeRectangle(int, int, int, int, int, int, int,
void (*draw_border_function)(void));
void SDLDrawSimpleLine(Bitmap *, int, int, int, int, Uint32);
void SDLDrawLine(Bitmap *, int, int, int, int, Uint32);
}
}
-void FadeRectangle(Bitmap *bitmap_cross, int x, int y, int width, int height,
+void FadeRectangle(int x, int y, int width, int height,
int fade_mode, int fade_delay, int post_delay,
void (*draw_border_function)(void))
{
if (!InClippedRectangle(backbuffer, &x, &y, &width, &height, TRUE))
return;
- SDLFadeRectangle(bitmap_cross, x, y, width, height,
+ SDLFadeRectangle(x, y, width, height,
fade_mode, fade_delay, post_delay, draw_border_function);
}
void FreeBitmap(Bitmap *);
void BlitBitmap(Bitmap *, Bitmap *, int, int, int, int, int, int);
void BlitBitmapTiled(Bitmap *, Bitmap *, int, int, int, int, int, int, int,int);
-void FadeRectangle(Bitmap *bitmap, int, int, int, int, int, int, int,
+void FadeRectangle(int, int, int, int, int, int, int,
void (*draw_border_function)(void));
void FillRectangle(Bitmap *, int, int, int, int, Pixel);
void ClearRectangle(Bitmap *, int, int, int, int);
SetVideoFrameDelay(frame_delay_value_old);
}
-static void FadeCrossSaveBackbuffer()
-{
- BlitBitmap(backbuffer, bitmap_db_cross, 0, 0, WIN_XSIZE, WIN_YSIZE, 0, 0);
-}
-
-static void FadeCrossRestoreBackbuffer()
-{
- int redraw_mask_last = redraw_mask;
-
- BlitBitmap(bitmap_db_cross, backbuffer, 0, 0, WIN_XSIZE, WIN_YSIZE, 0, 0);
-
- // do not change redraw mask when restoring backbuffer after cross-fading
- redraw_mask = redraw_mask_last;
-}
-
static void FadeExt(int fade_mask, int fade_mode, int fade_type)
{
static int fade_type_skip = FADE_TYPE_NONE;
void (*draw_border_function)(void) = NULL;
- Bitmap *bitmap = (fade_mode & FADE_TYPE_TRANSFORM ? bitmap_db_cross : NULL);
int x, y, width, height;
int fade_delay, post_delay;
return;
}
-#if 1
- FadeCrossSaveBackbuffer();
-#endif
-
if (fading.fade_mode & FADE_TYPE_TRANSFORM)
- {
-#if 0
- FadeCrossSaveBackbuffer();
-#endif
-
return;
- }
}
redraw_mask |= fade_mask;
return;
}
- FadeRectangle(bitmap, x, y, width, height, fade_mode, fade_delay, post_delay,
+ FadeRectangle(x, y, width, height, fade_mode, fade_delay, post_delay,
draw_border_function);
- if (fade_type == FADE_TYPE_FADE_OUT)
- FadeCrossRestoreBackbuffer();
-
redraw_mask &= ~fade_mask;
}