projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
moved code for separate touch controls to separate functions (cleanup)
[rocksndiamonds.git]
/
src
/
game.c
diff --git
a/src/game.c
b/src/game.c
index 76f348990e8c5a593fc480199b4bb6332cde29af..464cdc0ba6d767e6b7d0c82d7f50fc7e7b416eb2 100644
(file)
--- a/
src/game.c
+++ b/
src/game.c
@@
-2308,7
+2308,7
@@
void UpdateGameControlValues()
game_panel_controls[GAME_PANEL_TIME_MM].value = (time / 60) % 60;
game_panel_controls[GAME_PANEL_TIME_SS].value = time % 60;
game_panel_controls[GAME_PANEL_TIME_MM].value = (time / 60) % 60;
game_panel_controls[GAME_PANEL_TIME_SS].value = time % 60;
- if (
game.no_time_limit
)
+ if (
level.time == 0
)
game_panel_controls[GAME_PANEL_TIME_ANIM].value = 100;
else
game_panel_controls[GAME_PANEL_TIME_ANIM].value = time * 100 / level.time;
game_panel_controls[GAME_PANEL_TIME_ANIM].value = 100;
else
game_panel_controls[GAME_PANEL_TIME_ANIM].value = time * 100 / level.time;
@@
-3298,7
+3298,7
@@
void InitGame()
else
FadeSetEnterScreen();
else
FadeSetEnterScreen();
- if (CheckIfGlobalBorderHasChanged())
+ if (CheckIfGlobalBorder
OrPlayfieldViewport
HasChanged())
fade_mask = REDRAW_ALL;
FadeLevelSoundsAndMusic();
fade_mask = REDRAW_ALL;
FadeLevelSoundsAndMusic();
@@
-4692,14
+4692,16
@@
void GameEnd()
local_player->LevelSolved_GameEnd = TRUE;
local_player->LevelSolved_GameEnd = TRUE;
- if (!global.use_envelope_request)
- CloseDoor(DOOR_CLOSE_1);
-
if (local_player->LevelSolved_SaveTape)
{
if (local_player->LevelSolved_SaveTape)
{
+ /* make sure that request dialog to save tape does not open door again */
+ if (!global.use_envelope_request)
+ CloseDoor(DOOR_CLOSE_1);
+
SaveTapeChecked(tape.level_nr); /* ask to save tape */
}
SaveTapeChecked(tape.level_nr); /* ask to save tape */
}
+ /* if no tape is to be saved, close both doors simultaneously */
CloseDoor(DOOR_CLOSE_ALL);
if (level_editor_test_game)
CloseDoor(DOOR_CLOSE_ALL);
if (level_editor_test_game)
@@
-15266,7
+15268,7
@@
void LoadEngineSnapshotValues()
LoadEngineSnapshotValues_EM();
if (level.game_engine_type == GAME_ENGINE_TYPE_SP)
LoadEngineSnapshotValues_SP();
LoadEngineSnapshotValues_EM();
if (level.game_engine_type == GAME_ENGINE_TYPE_SP)
LoadEngineSnapshotValues_SP();
- if (level.game_engine_type == GAME_ENGINE_TYPE_
SP
)
+ if (level.game_engine_type == GAME_ENGINE_TYPE_
MM
)
LoadEngineSnapshotValues_MM();
}
LoadEngineSnapshotValues_MM();
}