From 51309ee0f66e213ee621bbc5389a33124f64519a Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Fri, 18 Dec 2020 02:30:10 +0100 Subject: [PATCH] added support for drawing request dialog on top of global animations --- src/anim.c | 2 ++ src/tools.c | 13 +++++++++++++ src/tools.h | 3 ++- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/anim.c b/src/anim.c index f109b874..2e6280ce 100644 --- a/src/anim.c +++ b/src/anim.c @@ -870,6 +870,8 @@ void DrawGlobalAnimations(int drawing_target, int drawing_stage) ResetGlobalAnim_Clicked(); } + DrawEnvelopeRequestToScreen(drawing_target, drawing_stage); + if (gfx.cursor_mode_override != last_cursor_mode_override) SetMouseCursor(gfx.cursor_mode); } diff --git a/src/tools.c b/src/tools.c index 57dbfe79..f0fcae29 100644 --- a/src/tools.c +++ b/src/tools.c @@ -2844,6 +2844,19 @@ static void PrepareEnvelopeRequestToScreen(Bitmap *bitmap, int sx, int sy, request.ysize = ysize; } +void DrawEnvelopeRequestToScreen(int drawing_target, int drawing_stage) +{ + if (global.use_envelope_request && + game.request_active_or_moving && + request.sort_priority > 0 && + drawing_target == DRAW_TO_SCREEN && + drawing_stage == DRAW_GLOBAL_ANIM_STAGE_2) + { + BlitToScreen(request.bitmap, 0, 0, request.xsize, request.ysize, + request.sx, request.sy); + } +} + static void setRequestBasePosition(int *x, int *y) { int sx_base, sy_base; diff --git a/src/tools.h b/src/tools.h index de7bb467..6d012667 100644 --- a/src/tools.h +++ b/src/tools.h @@ -191,7 +191,8 @@ void DrawMiniElement(int, int, int); void DrawMiniElementOrWall(int, int, int, int); void ShowEnvelope(int); -void ShowEnvelopeDoor(char *text, int); +void ShowEnvelopeDoor(char *, int); +void DrawEnvelopeRequestToScreen(int, int); void DrawLevel(int); void DrawSizedLevel(int, int, int, int, int); -- 2.34.1