From: Holger Schemel Date: Fri, 6 Sep 2019 07:00:07 +0000 (+0200) Subject: added support for gadget buttons defined outside viewports X-Git-Tag: 4.1.4.0~22 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=1db980cad56de887332e1b95cb924a41b1e49d04;p=rocksndiamonds.git added support for gadget buttons defined outside viewports Commit 50a54138 (and the bugfix in the previous commit) prevent drawing gadget buttons that are defined outside of viewports (like playfield or door area), but are placed in the screen border area. This was not supported in older versions of the redraw system (where full-screen redraws where always done from a different back buffer). Recent (SDL2 based) versions of the redraw system do support this, so this limitation can be removed now to allow for gadget buttons placed in the screen border area. --- diff --git a/src/game.c b/src/game.c index e50017a9..79fb4518 100644 --- a/src/game.c +++ b/src/game.c @@ -15757,10 +15757,6 @@ static void RedrawGameButtonsExt(boolean on_tape) for (i = 0; i < NUM_GAME_BUTTONS; i++) if (!on_tape || gamebutton_info[i].allowed_on_tape) RedrawGadget(game_gadget[i]); - - // RedrawGadget() may have set REDRAW_ALL if buttons are defined off-area - if (redraw_mask & REDRAW_ALL) - redraw_mask = REDRAW_FIELD | REDRAW_DOORS; } static void SetGadgetState(struct GadgetInfo *gi, boolean state) diff --git a/src/tape.c b/src/tape.c index 6cf79719..aeac3d3a 100644 --- a/src/tape.c +++ b/src/tape.c @@ -1409,10 +1409,6 @@ void RedrawTapeButtons(void) if (tape.show_game_buttons) RedrawGameButtonsOnTape(); - - // RedrawGadget() may have set REDRAW_ALL if buttons are defined off-area - if (redraw_mask & REDRAW_ALL) - redraw_mask = REDRAW_FIELD | REDRAW_DOORS; } void RedrawOrRemapTapeButtons(void)