gfx.background_bitmap_mask = REDRAW_NONE;
ReCreateBitmap(&gfx.background_bitmap, win_xsize, win_ysize, DEFAULT_DEPTH);
+
+#if defined(TARGET_SDL2)
#if USE_FINAL_SCREEN_BITMAP
ReCreateBitmap(&gfx.final_screen_bitmap, win_xsize, win_ysize, DEFAULT_DEPTH);
#endif
+#endif
+
+ ReCreateBitmap(&gfx.fade_bitmap_source, win_xsize, win_ysize, DEFAULT_DEPTH);
+ ReCreateBitmap(&gfx.fade_bitmap_target, win_xsize, win_ysize, DEFAULT_DEPTH);
+ ReCreateBitmap(&gfx.fade_bitmap_black, win_xsize, win_ysize, DEFAULT_DEPTH);
+
+ ClearRectangle(gfx.fade_bitmap_black, 0, 0, win_xsize, win_ysize);
}
void InitGfxScrollbufferInfo(int scrollbuffer_width, int scrollbuffer_height)
gfx.draw_busy_anim_function = draw_busy_anim_function;
}
-void InitGfxDrawGlobalAnimFunction(void (*draw_global_anim_function)(void))
+void InitGfxDrawGlobalAnimFunction(void (*draw_global_anim_function)(int))
{
gfx.draw_global_anim_function = draw_global_anim_function;
}
+void InitGfxDrawGlobalBorderFunction(void (*draw_global_border_function)(int))
+{
+ gfx.draw_global_border_function = draw_global_border_function;
+}
+
void InitGfxCustomArtworkInfo()
{
gfx.override_level_graphics = FALSE;
video.window_scaling_available = WINDOW_SCALING_STATUS;
- SDLInitVideoBuffer(&backbuffer, &window, fullscreen);
+ SDLInitVideoBuffer(fullscreen);
video.initialized = TRUE;
Bitmap *CreateBitmapStruct(void)
{
- return checked_calloc(sizeof(struct SDLSurfaceInfo));
+ return checked_calloc(sizeof(Bitmap));
}
Bitmap *CreateBitmap(int width, int height, int depth)
boolean SetVideoMode(boolean fullscreen)
{
- return SDLSetVideoMode(&backbuffer, fullscreen);
+ return SDLSetVideoMode(fullscreen);
}
boolean ChangeVideoModeIfNeeded(boolean fullscreen)
SDLCreateBitmapTextures(bitmaps[IMG_BITMAP_STANDARD]);
}
+void FreeBitmapTextures(Bitmap **bitmaps)
+{
+ SDLFreeBitmapTextures(bitmaps[IMG_BITMAP_STANDARD]);
+}
+
void ScaleBitmap(Bitmap **bitmaps, int zoom_factor)
{
CreateScaledBitmaps(bitmaps, zoom_factor, 0, FALSE);