added support for drawing request dialog on top of global animations
[rocksndiamonds.git] / src / tools.c
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;