void DrawEnvelopeRequestToScreen(int drawing_target)
{
if (global.use_envelope_request &&
- game.request_active_or_moving &&
+ game.request_active &&
drawing_target == DRAW_TO_SCREEN)
{
if (graphic_info[IMG_BACKGROUND_REQUEST].draw_masked)
setRequestPosition(&sx, &sy, FALSE);
- // draw envelope request to temporary bitmap
- drawto = bitmap_db_store_2;
+ // draw complete envelope request to temporary bitmap
+ drawto = bitmap_db_store_1;
ClearRectangle(drawto, sx, sy, width, height);
// restore pointer to drawing buffer
drawto = drawto_last;
- PrepareEnvelopeRequestToScreen(bitmap_db_store_2, sx, sy, width, height);
+ // prepare complete envelope request from temporary bitmap
+ PrepareEnvelopeRequestToScreen(bitmap_db_store_1, sx, sy, width, height);
if (text_door_style)
free(text_door_style);
static void AnimateEnvelopeRequest(int anim_mode, int action)
{
+ boolean game_just_ended = (game_status == GAME_MODE_PLAYING &&
+ checkGameEnded());
int delay_value_normal = request.step_delay;
int delay_value_fast = delay_value_normal / 2;
boolean ffwd_delay = (tape.playing && tape.fast_forward);
int dst_x, dst_y;
int xx, yy;
+ if (game_just_ended)
+ HandleGameActions();
+
setRequestPosition(&src_x, &src_y, FALSE);
setRequestPositionExt(&dst_x, &dst_y, width, height, FALSE);
int xx_size = (xx ? tile_size : xsize_size_left);
int yy_size = (yy ? tile_size : ysize_size_top);
- BlitBitmap(bitmap_db_store_2, bitmap_db_store_1,
+ // draw partial (animated) envelope request to temporary bitmap
+ BlitBitmap(bitmap_db_store_1, bitmap_db_store_2,
src_xx, src_yy, xx_size, yy_size, dst_xx, dst_yy);
}
}
- PrepareEnvelopeRequestToScreen(bitmap_db_store_1, dst_x, dst_y,
+ // prepare partial (animated) envelope request from temporary bitmap
+ PrepareEnvelopeRequestToScreen(bitmap_db_store_2, dst_x, dst_y,
width, height);
redraw_mask |= REDRAW_FIELD;
int sx, sy;
int result;
- // when showing request dialog after game ended, deactivate game panel
- if (game_just_ended)
- game.panel.active = FALSE;
-
- game.request_active = TRUE;
-
setRequestPosition(&sx, &sy, FALSE);
button_status = MB_RELEASED;
if (global.use_envelope_request)
{
// draw changed button states to temporary bitmap
- drawto = bitmap_db_store_2;
+ drawto = bitmap_db_store_1;
}
// this sets 'request_gadget_id'
if (global.use_envelope_request)
{
- PrepareEnvelopeRequestToScreen(drawto, sx, sy, width, height);
-
// restore pointer to drawing buffer
drawto = drawto_last;
+
+ // prepare complete envelope request from temporary bitmap
+ PrepareEnvelopeRequestToScreen(bitmap_db_store_1, sx, sy,
+ width, height);
}
switch (request_gadget_id)
SetDrawtoField(draw_buffer_last);
- game.request_active = FALSE;
-
return result;
}
boolean Request(char *text, unsigned int req_state)
{
+ boolean game_just_ended = (game_status == GAME_MODE_PLAYING &&
+ checkGameEnded());
boolean overlay_enabled = GetOverlayEnabled();
boolean result;
- game.request_active_or_moving = TRUE;
+ // when showing request dialog after game ended, deactivate game panel
+ if (game_just_ended)
+ game.panel.active = FALSE;
+
+ game.request_active = TRUE;
SetOverlayEnabled(FALSE);
SetOverlayEnabled(overlay_enabled);
- game.request_active_or_moving = FALSE;
+ game.request_active = FALSE;
return result;
}