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