From: Holger Schemel Date: Fri, 18 Dec 2020 01:30:10 +0000 (+0100) Subject: added support for drawing request dialog on top of global animations X-Git-Tag: 4.2.2.0~1 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=51309ee0f66e213ee621bbc5389a33124f64519a;p=rocksndiamonds.git added support for drawing request dialog on top of global animations --- 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);