From: Holger Schemel Date: Tue, 22 Mar 2016 09:24:18 +0000 (+0100) Subject: fixed bugs when drawing global borders when fading screens X-Git-Tag: 4.0.0.0-rc1~32 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=dc4ee700e44e99a58d73e1ef8b549f3f859d3646;p=rocksndiamonds.git fixed bugs when drawing global borders when fading screens --- diff --git a/src/screens.c b/src/screens.c index 1f5d4230..5af87232 100644 --- a/src/screens.c +++ b/src/screens.c @@ -1581,10 +1581,10 @@ void HandleTitleScreen(int mx, int my, int dx, int dy, int button) } FadeSoundsAndMusic(); - - FadeOut(REDRAW_ALL); } + FadeOut(REDRAW_ALL); + /* only required to update logic for redrawing global border */ ClearField(); diff --git a/src/tools.c b/src/tools.c index 3dcf88af..a212e6ad 100644 --- a/src/tools.c +++ b/src/tools.c @@ -305,7 +305,7 @@ static void DrawMaskedBorderExt_Rect(int x, int y, int width, int height, static void DrawMaskedBorderExt_FIELD(int draw_target) { - if (global.border_status >= GAME_MODE_TITLE && + if (global.border_status >= GAME_MODE_MAIN && global.border_status <= GAME_MODE_PLAYING && border.draw_masked[global.border_status]) DrawMaskedBorderExt_Rect(REAL_SX, REAL_SY, FULL_SXSIZE, FULL_SYSIZE, @@ -353,8 +353,8 @@ static void DrawMaskedBorderExt_ALL(int draw_target) static void DrawMaskedBorderExt(int redraw_mask, int draw_target) { /* never draw masked screen borders on borderless screens */ - if (game_status == GAME_MODE_LOADING || - game_status == GAME_MODE_TITLE) + if (global.border_status == GAME_MODE_LOADING || + global.border_status == GAME_MODE_TITLE) return; if (redraw_mask & REDRAW_ALL)