X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame.c;h=3a3b10e63c72fc521e501a988fefadd7021a668f;hb=c981ce2708040be6519fa2694c6ea8b4d9c51a27;hp=fd774e84c30b33e2c80ad0ae00346e2dc8fdf101;hpb=4666f6614557b1a47fda7442da7523519a4a1ac6;p=rocksndiamonds.git diff --git a/src/game.c b/src/game.c index fd774e84..3a3b10e6 100644 --- a/src/game.c +++ b/src/game.c @@ -3358,7 +3358,7 @@ void InitGame(void) else FadeSetEnterScreen(); - if (CheckIfGlobalBorderOrPlayfieldViewportHasChanged()) + if (CheckFadeAll()) fade_mask = REDRAW_ALL; FadeLevelSoundsAndMusic(); @@ -3566,6 +3566,8 @@ void InitGame(void) game.LevelSolved = FALSE; game.GameOver = FALSE; + game.GamePlayed = !tape.playing; + game.LevelSolved_GameWon = FALSE; game.LevelSolved_GameEnd = FALSE; game.LevelSolved_SaveTape = FALSE; @@ -11364,6 +11366,15 @@ static void GameActionsExt(void) SetVideoFrameDelay(game_frame_delay_value); + // (de)activate virtual buttons depending on current game status + if (strEqual(setup.touch.control_type, TOUCH_CONTROL_VIRTUAL_BUTTONS)) + { + if (game.all_players_gone) // if no players there to be controlled anymore + SetOverlayActive(FALSE); + else if (!tape.playing) // if game continues after tape stopped playing + SetOverlayActive(TRUE); + } + #if 0 #if 0 // ---------- main game synchronization point ---------- @@ -11474,6 +11485,10 @@ static void GameActionsExt(void) if (tape.recording) TapeRecordAction(tape_action); + // remember if game was played (especially after tape stopped playing) + if (!tape.playing && summarized_player_action) + game.GamePlayed = TRUE; + #if USE_NEW_PLAYER_ASSIGNMENTS // !!! also map player actions in single player mode !!! // if (game.team_mode) @@ -15023,6 +15038,10 @@ void CheckGameOver(void) if (game.request_active) return; + // do not ask to play again if game was never actually played + if (!game.GamePlayed) + return; + if (!game_over) { last_game_over = FALSE;