X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Fsystem.c;h=8df809cd787ba19cdc91041866a11d432c397597;hb=b003831ec2ccf7b14d2aa094466bdeb6c2f1d048;hp=d1cb4d35d2ed875a29181b410d034b310fe81285;hpb=d0ab5a10ecda925e8fd5641aef3fdd9e035492f8;p=rocksndiamonds.git diff --git a/src/libgame/system.c b/src/libgame/system.c index d1cb4d35..8df809cd 100644 --- a/src/libgame/system.c +++ b/src/libgame/system.c @@ -207,9 +207,18 @@ void InitGfxWindowInfo(int win_xsize, int win_ysize) 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) @@ -234,11 +243,16 @@ void InitGfxDrawBusyAnimFunction(void (*draw_busy_anim_function)(void)) 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; @@ -407,7 +421,7 @@ void FreeBitmap(Bitmap *bitmap) Bitmap *CreateBitmapStruct(void) { - return checked_calloc(sizeof(struct SDLSurfaceInfo)); + return checked_calloc(sizeof(Bitmap)); } Bitmap *CreateBitmap(int width, int height, int depth) @@ -1190,6 +1204,11 @@ void CreateBitmapTextures(Bitmap **bitmaps) 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);