added support for drawing request dialog on top of global animations
authorHolger Schemel <info@artsoft.org>
Fri, 18 Dec 2020 01:30:10 +0000 (02:30 +0100)
committerHolger Schemel <info@artsoft.org>
Mon, 21 Dec 2020 22:53:06 +0000 (23:53 +0100)
src/anim.c
src/tools.c
src/tools.h

index f109b874f39b75b0109e8d18af437e2f995a6e86..2e6280ce3d1f3cb629f8ddceb6f065da58bab9cc 100644 (file)
@@ -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);
 }
index 57dbfe794b0b53078c3445ea832b54fb365ff290..f0fcae2929884c3eb2fc751a08b6a82313584c3d 100644 (file)
@@ -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;
index de7bb467b567934821e134e1f25b8f45d0ecca38..6d0126672f615fef4560b09c90f4dd344845adaa 100644 (file)
@@ -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);