effectiveGameStatus() == GAME_MODE_TITLE)
return;
- /* never draw masked screen borders when displaying request outside door */
- if (effectiveGameStatus() == GAME_MODE_PSEUDO_DOOR &&
- global.use_envelope_request)
- return;
-
if (redraw_mask & REDRAW_ALL)
DrawMaskedBorder_ALL();
else
void BlitScreenToBitmap_RND(Bitmap *target_bitmap)
{
- DrawBuffer *buffer = (drawto_field == window ? backbuffer : drawto_field);
int fx = FX, fy = FY;
int full_lev_fieldx = lev_fieldx + (BorderElement != EL_EMPTY ? 2 : 0);
int full_lev_fieldy = lev_fieldy + (BorderElement != EL_EMPTY ? 2 : 0);
fy = 2 * TILEY_VAR - (EVEN(lev_fieldy) ? TILEY_VAR / 2 : 0);
}
- BlitBitmap(buffer, target_bitmap, fx, fy, SXSIZE, SYSIZE, SX, SY);
+ BlitBitmap(drawto_field, target_bitmap, fx, fy, SXSIZE, SYSIZE, SX, SY);
}
void BlitScreenToBitmap(Bitmap *target_bitmap)
static int RequestHandleEvents(unsigned int req_state)
{
+ boolean level_solved = (game_status == GAME_MODE_PLAYING &&
+ local_player->LevelSolved_GameEnd);
int last_game_status = game_status; /* save current game status */
+ int width = request.width;
+ int height = request.height;
+ int sx, sy;
int result;
- int mx, my;
+
+ setRequestPosition(&sx, &sy, FALSE);
button_status = MB_RELEASED;
while (result < 0)
{
+ if (level_solved)
+ {
+ SetDrawtoField(DRAW_FIELDBUFFER);
+
+ HandleGameActions();
+
+ SetDrawtoField(DRAW_BACKBUFFER);
+
+ if (global.use_envelope_request)
+ {
+ /* copy current state of request area to middle of playfield area */
+ BlitBitmap(bitmap_db_cross, drawto, sx, sy, width, height, sx, sy);
+ }
+ }
+
if (PendingEvent())
{
Event event;
case EVENT_BUTTONRELEASE:
case EVENT_MOTIONNOTIFY:
{
+ int mx, my;
+
if (event.type == EVENT_MOTIONNOTIFY)
{
if (!button_status)
result = 0;
}
- if (game_status == GAME_MODE_PLAYING && local_player->LevelSolved_GameEnd)
+ if (level_solved)
{
- HandleGameActions();
+ if (global.use_envelope_request)
+ {
+ /* copy back current state of pressed buttons inside request area */
+ BlitBitmap(drawto, bitmap_db_cross, sx, sy, width, height, sx, sy);
+ }
}
else
{