projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed missing graphics definitions for BD style cow
[rocksndiamonds.git]
/
src
/
game.c
diff --git
a/src/game.c
b/src/game.c
index db689084c64fa6802d465fa4b5be9e34b4365b7b..0d5bec3652c9c2290c4bc554e69c43518d8e1311 100644
(file)
--- a/
src/game.c
+++ b/
src/game.c
@@
-5162,7
+5162,11
@@
void GameEnd(void)
int last_level_nr = levelset.level_nr;
boolean tape_saved = FALSE;
int last_level_nr = levelset.level_nr;
boolean tape_saved = FALSE;
- game.LevelSolved_GameEnd = TRUE;
+ // 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)
+
+ if (game.LevelSolved)
+ game.LevelSolved_GameEnd = TRUE;
if (game.LevelSolved_SaveTape && !score_info_tape_play)
{
if (game.LevelSolved_SaveTape && !score_info_tape_play)
{
@@
-5189,7
+5193,7
@@
void GameEnd(void)
return;
}
return;
}
- if (!game.
LevelSolved_SaveScore
)
+ if (!game.
GamePlayed || (!game.LevelSolved_SaveScore && !level.bd_intermission)
)
{
SetGameStatus(GAME_MODE_MAIN);
{
SetGameStatus(GAME_MODE_MAIN);
@@
-5206,12
+5210,13
@@
void GameEnd(void)
}
// save score and score tape before potentially erasing tape below
}
// save score and score tape before potentially erasing tape below
- NewHighScore(last_level_nr, tape_saved);
+ if (game.LevelSolved_SaveScore)
+ NewHighScore(last_level_nr, tape_saved);
// increment and load next level (if possible and not configured otherwise)
AdvanceToNextLevel();
// increment and load next level (if possible and not configured otherwise)
AdvanceToNextLevel();
- if (scores.last_added >= 0 && setup.show_scores_after_game)
+ if (
game.LevelSolved_SaveScore &&
scores.last_added >= 0 && setup.show_scores_after_game)
{
SetGameStatus(GAME_MODE_SCORES);
{
SetGameStatus(GAME_MODE_SCORES);
@@
-15858,7
+15863,7
@@
static int getSoundEffect_BD(int element_bd, int sample)
void PlayLevelSound_BD(int xx, int yy, int element_bd, int sample)
{
void PlayLevelSound_BD(int xx, int yy, int element_bd, int sample)
{
- int element = (element_bd > -1 ? map_element_BD_to_RND(element_bd) : 0);
+ int element = (element_bd > -1 ? map_element_BD_to_RND
_game
(element_bd) : 0);
int sound_effect = getSoundEffect_BD(element, sample);
int sound_action = getSoundAction_BD(sample);
boolean is_loop_sound = IS_LOOP_SOUND(sound_effect);
int sound_effect = getSoundEffect_BD(element, sample);
int sound_action = getSoundAction_BD(sample);
boolean is_loop_sound = IS_LOOP_SOUND(sound_effect);
@@
-15882,7
+15887,7
@@
void PlayLevelSound_BD(int xx, int yy, int element_bd, int sample)
void StopSound_BD(int element_bd, int sample)
{
void StopSound_BD(int element_bd, int sample)
{
- int element = (element_bd > -1 ? map_element_BD_to_RND(element_bd) : 0);
+ int element = (element_bd > -1 ? map_element_BD_to_RND
_game
(element_bd) : 0);
int sound_effect = getSoundEffect_BD(element, sample);
if (sound_effect != SND_UNDEFINED)
int sound_effect = getSoundEffect_BD(element, sample);
if (sound_effect != SND_UNDEFINED)
@@
-15891,7
+15896,7
@@
void StopSound_BD(int element_bd, int sample)
boolean isSoundPlaying_BD(int element_bd, int sample)
{
boolean isSoundPlaying_BD(int element_bd, int sample)
{
- int element = (element_bd > -1 ? map_element_BD_to_RND(element_bd) : 0);
+ int element = (element_bd > -1 ? map_element_BD_to_RND
_game
(element_bd) : 0);
int sound_effect = getSoundEffect_BD(element, sample);
if (sound_effect != SND_UNDEFINED)
int sound_effect = getSoundEffect_BD(element, sample);
if (sound_effect != SND_UNDEFINED)