projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed element graphic on properties page in level editor
[rocksndiamonds.git]
/
src
/
game.c
diff --git
a/src/game.c
b/src/game.c
index 2c16aa62c93d95c8a5344eb9f5d44aea92955c54..288ff5f16f9581afeafe387c410866f4a48a49ca 100644
(file)
--- a/
src/game.c
+++ b/
src/game.c
@@
-3676,6
+3676,9
@@
void InitGame(void)
else
{
SetGameStatus(GAME_MODE_PLAYING);
else
{
SetGameStatus(GAME_MODE_PLAYING);
+
+ // do not cover screen before fading out when starting from main menu
+ game_bd.cover_screen = FALSE;
}
if (level_editor_test_game)
}
if (level_editor_test_game)
@@
-4621,6
+4624,7
@@
void InitGame(void)
game.restart_level = FALSE;
game.request_active = FALSE;
game.envelope_active = FALSE;
game.restart_level = FALSE;
game.request_active = FALSE;
game.envelope_active = FALSE;
+ game.any_door_active = FALSE;
if (level.game_engine_type == GAME_ENGINE_TYPE_MM)
InitGameActions_MM();
if (level.game_engine_type == GAME_ENGINE_TYPE_MM)
InitGameActions_MM();
@@
-5160,10
+5164,19
@@
void GameEnd(void)
// used instead of "level_nr" (needed for network games)
int last_level_nr = levelset.level_nr;
boolean tape_saved = FALSE;
// used instead of "level_nr" (needed for network games)
int last_level_nr = levelset.level_nr;
boolean tape_saved = FALSE;
+ boolean game_over = checkGameFailed();
// Important note: This function is not only called after "GameWon()", but also after
// "game over" (if automatically asking for restarting the game is disabled in setup)
// Important note: This function is not only called after "GameWon()", but also after
// "game over" (if automatically asking for restarting the game is disabled in setup)
+ // do not handle game end if game over and automatically asking for game restart
+ if (game_over && setup.ask_on_game_over)
+ return;
+
+ // do not handle game end if request dialog is already active
+ if (checkRequestActive())
+ return;
+
if (game.LevelSolved)
game.LevelSolved_GameEnd = TRUE;
if (game.LevelSolved)
game.LevelSolved_GameEnd = TRUE;
@@
-16342,7
+16355,7
@@
boolean CheckRestartGame(void)
}
// do not ask to play again if request dialog is already active
}
// do not ask to play again if request dialog is already active
- if (
game.request_active
)
+ if (
checkRequestActive()
)
return FALSE;
// do not ask to play again if request dialog already handled
return FALSE;
// do not ask to play again if request dialog already handled
@@
-16411,6
+16424,11
@@
boolean checkGameEnded(void)
return (checkGameSolved() || checkGameFailed());
}
return (checkGameSolved() || checkGameFailed());
}
+boolean checkRequestActive(void)
+{
+ return (game.request_active || game.envelope_active || game.any_door_active);
+}
+
// ----------------------------------------------------------------------------
// random generator functions
// ----------------------------------------------------------------------------
// random generator functions