projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added options for vertical text spacing (used on info screens for now)
[rocksndiamonds.git]
/
src
/
game.c
diff --git
a/src/game.c
b/src/game.c
index df0f296152f7ffba01baeda2ea12540a7733cef3..572373e51248d7bd86bbf28a0a4b9d75e03b4d59 100644
(file)
--- a/
src/game.c
+++ b/
src/game.c
@@
-4472,6
+4472,7
@@
static void PlayerWins(struct PlayerInfo *player)
void GameWon()
{
void GameWon()
{
+ static int time_count_steps;
static int time, time_final;
static int score, score_final;
static int health, health_final;
static int time, time_final;
static int score, score_final;
static int health, health_final;
@@
-4527,6
+4528,8
@@
void GameWon()
score_final += (999 - TimePlayed) * level.score[SC_TIME_BONUS];
}
score_final += (999 - TimePlayed) * level.score[SC_TIME_BONUS];
}
+ time_count_steps = MAX(1, ABS(time_final - time) / 100);
+
game_over_delay_1 = game_over_delay_value_1;
if (level.game_engine_type == GAME_ENGINE_TYPE_MM)
game_over_delay_1 = game_over_delay_value_1;
if (level.game_engine_type == GAME_ENGINE_TYPE_MM)
@@
-4611,7
+4614,9
@@
void GameWon()
{
int time_to_go = ABS(time_final - time);
int time_count_dir = (time < time_final ? +1 : -1);
{
int time_to_go = ABS(time_final - time);
int time_count_dir = (time < time_final ? +1 : -1);
- int time_count_steps = (time_to_go > 100 && time_to_go % 10 == 0 ? 10 : 1);
+
+ if (time_to_go < time_count_steps)
+ time_count_steps = 1;
time += time_count_steps * time_count_dir;
score += time_count_steps * level.score[SC_TIME_BONUS];
time += time_count_steps * time_count_dir;
score += time_count_steps * level.score[SC_TIME_BONUS];