X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Ftools.c;h=794174c1d1ccbe0ccf34b87a474b9fb59d596c4e;hp=2ca18cf6b5f773e117aa6e0ebbfaf0fc010479f3;hb=00383dd409fde133c6738231abfcee662c03087c;hpb=567cfcb396e3fc031a25362b747dd0a5a096b4ec diff --git a/src/tools.c b/src/tools.c index 2ca18cf6..794174c1 100644 --- a/src/tools.c +++ b/src/tools.c @@ -926,6 +926,10 @@ void FadeIn(int fade_mask) FADE_SXSIZE = FULL_SXSIZE; FADE_SYSIZE = FULL_SYSIZE; + if (game_status == GAME_MODE_PLAYING && + strEqual(setup.touch.control_type, TOUCH_CONTROL_VIRTUAL_BUTTONS)) + SetOverlayActive(TRUE); + SetScreenStates_AfterFadingIn(); // force update of global animation status in case of rapid screen changes @@ -941,6 +945,8 @@ void FadeOut(int fade_mask) SetScreenStates_BeforeFadingOut(); + SetOverlayActive(FALSE); + #if 0 DrawMaskedBorder(REDRAW_ALL); #endif @@ -2322,6 +2328,10 @@ void DrawScreenField(int x, int y) int newly = ly + (dir == MV_UP ? -1 : dir == MV_DOWN ? +1 : 0); DrawLevelElementThruMask(newlx, newly, EL_ACID); + + // prevent target field from being drawn again (but without masking) + // (this would happen if target field is scanned after moving element) + Stop[newlx][newly] = TRUE; } } else if (IS_BLOCKED(lx, ly)) @@ -4207,10 +4217,19 @@ static boolean RequestEnvelope(char *text, unsigned int req_state) boolean Request(char *text, unsigned int req_state) { + boolean overlay_active = GetOverlayActive(); + boolean result; + + SetOverlayActive(FALSE); + if (global.use_envelope_request) - return RequestEnvelope(text, req_state); + result = RequestEnvelope(text, req_state); else - return RequestDoor(text, req_state); + result = RequestDoor(text, req_state); + + SetOverlayActive(overlay_active); + + return result; } static int compareDoorPartOrderInfo(const void *object1, const void *object2)