X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Fsystem.c;h=7d0099f4af002628d2024ffcee250b18f2942240;hb=462bca0782be497b984922afda26b5bf12bd3d75;hp=55046b8890a428a037ed9b3437c1405d1979db0c;hpb=8b04d496646e102dd15710ba091e2f37cadcec5e;p=rocksndiamonds.git diff --git a/src/libgame/system.c b/src/libgame/system.c index 55046b88..7d0099f4 100644 --- a/src/libgame/system.c +++ b/src/libgame/system.c @@ -245,7 +245,10 @@ void SetBackgroundBitmap(Bitmap *background_bitmap_tile, int mask) if (background_bitmap_tile == NULL) /* empty background requested */ return; - if (mask == REDRAW_FIELD) + if (mask == REDRAW_ALL) + DrawBitmapFromTile(gfx.background_bitmap, background_bitmap_tile, + 0, 0, video.width, video.height); + else if (mask == REDRAW_FIELD) DrawBitmapFromTile(gfx.background_bitmap, background_bitmap_tile, gfx.real_sx, gfx.real_sy, gfx.full_sxsize, gfx.full_sysize); @@ -257,13 +260,20 @@ void SetBackgroundBitmap(Bitmap *background_bitmap_tile, int mask) } } +void SetWindowBackgroundBitmap(Bitmap *background_bitmap_tile) +{ + SetBackgroundBitmap(background_bitmap_tile, REDRAW_ALL); +} + void SetMainBackgroundBitmap(Bitmap *background_bitmap_tile) { + SetBackgroundBitmap(NULL, REDRAW_ALL); /* !!! FIX THIS !!! */ SetBackgroundBitmap(background_bitmap_tile, REDRAW_FIELD); } void SetDoorBackgroundBitmap(Bitmap *background_bitmap_tile) { + SetBackgroundBitmap(NULL, REDRAW_ALL); /* !!! FIX THIS !!! */ SetBackgroundBitmap(background_bitmap_tile, REDRAW_DOOR_1); } @@ -321,8 +331,7 @@ void CloseVideoDisplay(void) #endif } -void InitVideoBuffer(DrawBuffer **backbuffer, DrawWindow **window, - int width, int height, int depth, boolean fullscreen) +void InitVideoBuffer(int width, int height, int depth, boolean fullscreen) { video.width = width; video.height = height; @@ -334,10 +343,12 @@ void InitVideoBuffer(DrawBuffer **backbuffer, DrawWindow **window, video.fullscreen_mode_current = NULL; #if defined(TARGET_SDL) - SDLInitVideoBuffer(backbuffer, window, fullscreen); + SDLInitVideoBuffer(&backbuffer, &window, fullscreen); #else - X11InitVideoBuffer(backbuffer, window); + X11InitVideoBuffer(&backbuffer, &window); #endif + + drawto = backbuffer; } Bitmap *CreateBitmapStruct(void)