X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Ftools.c;h=1cab72eab5a5ed9c8a0e853480fda53dc1cfec04;hb=f82cf497747c1c8cb6ce67a5bef77d8e11787e61;hp=27469503dd8eb31ace36c48776bfd56b7934429f;hpb=7fde4f8890072581071022bf530a84d7317b739b;p=rocksndiamonds.git diff --git a/src/tools.c b/src/tools.c index 27469503..1cab72ea 100644 --- a/src/tools.c +++ b/src/tools.c @@ -462,6 +462,11 @@ void SetDrawtoField(int mode) } } +int GetDrawtoField(void) +{ + return (drawto_field == fieldbuffer ? DRAW_TO_FIELDBUFFER : DRAW_TO_BACKBUFFER); +} + static void RedrawPlayfield_RND(void) { if (game.envelope_active) @@ -4212,6 +4217,7 @@ static int RequestHandleEvents(unsigned int req_state) { boolean game_just_ended = (game_status == GAME_MODE_PLAYING && checkGameEnded()); + int draw_buffer_last = GetDrawtoField(); int width = request.width; int height = request.height; int sx, sy; @@ -4234,9 +4240,7 @@ static int RequestHandleEvents(unsigned int req_state) { if (game_just_ended) { - // the MM game engine does not use a special (scrollable) field buffer - if (level.game_engine_type != GAME_ENGINE_TYPE_MM) - SetDrawtoField(DRAW_TO_FIELDBUFFER); + SetDrawtoField(draw_buffer_last); HandleGameActions(); @@ -4521,6 +4525,8 @@ static int RequestHandleEvents(unsigned int req_state) BackToFront(); } + SetDrawtoField(draw_buffer_last); + game.request_active = FALSE; return result; @@ -4798,6 +4804,8 @@ boolean Request(char *text, unsigned int req_state) boolean overlay_enabled = GetOverlayEnabled(); boolean result; + game.request_active_or_moving = TRUE; + SetOverlayEnabled(FALSE); if (global.use_envelope_request) @@ -4807,6 +4815,8 @@ boolean Request(char *text, unsigned int req_state) SetOverlayEnabled(overlay_enabled); + game.request_active_or_moving = FALSE; + return result; } @@ -9351,6 +9361,8 @@ void SetAnimStatus(int anim_status_new) { if (anim_status_new == GAME_MODE_MAIN) anim_status_new = GAME_MODE_PSEUDO_MAINONLY; + else if (anim_status_new == GAME_MODE_NAMES) + anim_status_new = GAME_MODE_PSEUDO_NAMESONLY; else if (anim_status_new == GAME_MODE_SCORES) anim_status_new = GAME_MODE_PSEUDO_SCORESOLD; @@ -9360,7 +9372,11 @@ void SetAnimStatus(int anim_status_new) if ((global.anim_status == GAME_MODE_PSEUDO_MAINONLY && global.anim_status_next == GAME_MODE_PSEUDO_TYPENAME) || (global.anim_status == GAME_MODE_PSEUDO_TYPENAME && - global.anim_status_next == GAME_MODE_PSEUDO_MAINONLY)) + global.anim_status_next == GAME_MODE_PSEUDO_MAINONLY) || + (global.anim_status == GAME_MODE_PSEUDO_NAMESONLY && + global.anim_status_next == GAME_MODE_PSEUDO_TYPENAMES) || + (global.anim_status == GAME_MODE_PSEUDO_TYPENAMES && + global.anim_status_next == GAME_MODE_PSEUDO_NAMESONLY)) global.anim_status = global.anim_status_next; }