void UpdateGameControlValues()
{
int i, k;
+#if 1
+ int time = (local_player->LevelSolved ?
+ local_player->LevelSolved_CountingTime :
+ level.game_engine_type == GAME_ENGINE_TYPE_EM ?
+ level.native_em_level->lev->time :
+ level.game_engine_type == GAME_ENGINE_TYPE_SP ?
+ level.native_sp_level->game_sp->time_played :
+ game.no_time_limit ? TimePlayed : TimeLeft);
+#else
int time = (local_player->LevelSolved ?
local_player->LevelSolved_CountingTime :
level.game_engine_type == GAME_ENGINE_TYPE_EM ?
level.game_engine_type == GAME_ENGINE_TYPE_SP ?
level.native_sp_level->game_sp->time_played :
level.time == 0 ? TimePlayed : TimeLeft);
+#endif
int score = (local_player->LevelSolved ?
local_player->LevelSolved_CountingScore :
level.game_engine_type == GAME_ENGINE_TYPE_EM ?
void DrawGameDoorValues_OLD()
{
- int time_value = (level.time == 0 ? TimePlayed : TimeLeft);
+ int time_value = (game.no_time_limit ? TimePlayed : TimeLeft);
int dynamite_value = 0;
int score_value = (local_player->LevelSolved ? local_player->score_final :
local_player->score);
AllPlayersGone = FALSE;
+ game.no_time_limit = (level.time == 0);
+
game.yamyam_content_nr = 0;
game.robot_wheel_active = FALSE;
game.magic_wall_active = FALSE;
player->score_final = (level.game_engine_type == GAME_ENGINE_TYPE_EM ?
level.native_em_level->lev->score : player->score);
- player->LevelSolved_CountingTime = (level.time == 0 ? TimePlayed : TimeLeft);
+ player->LevelSolved_CountingTime = (game.no_time_limit ? TimePlayed :
+ TimeLeft);
player->LevelSolved_CountingScore = player->score_final;
}
game_over_delay_1 = game_over_delay_value_1;
game_over_delay_2 = game_over_delay_value_2;
- time = time_final = (level.time == 0 ? TimePlayed : TimeLeft);
+ time = time_final = (game.no_time_limit ? TimePlayed : TimeLeft);
score = score_final = local_player->score_final;
if (TimeLeft > 0)
time_final = 0;
score_final += TimeLeft * level.score[SC_TIME_BONUS];
}
- else if (level.time == 0 && TimePlayed < 999)
+ else if (game.no_time_limit && TimePlayed < 999)
{
time_final = 999;
score_final += (999 - TimePlayed) * level.score[SC_TIME_BONUS];
PlaySound(SND_GAME_RUNNING_OUT_OF_TIME);
#if 1
+ /* this does not make sense: game_panel_controls[GAME_PANEL_TIME].value
+ is reset from other values in UpdateGameDoorValues() -- FIX THIS */
+
game_panel_controls[GAME_PANEL_TIME].value = TimeLeft;
DisplayGameControlValues();
}
}
#if 1
- else if (level.time == 0 && !AllPlayersGone) /* level w/o time limit */
+ else if (game.no_time_limit && !AllPlayersGone) /* level w/o time limit */
{
game_panel_controls[GAME_PANEL_TIME].value = TimePlayed;
DisplayGameControlValues();
}
#else
- else if (level.time == 0 && !AllPlayersGone) /* level w/o time limit */
+ else if (game.no_time_limit && !AllPlayersGone) /* level w/o time limit */
DrawGameValue_Time(TimePlayed);
#endif
level.native_em_level->lev->time =
- (level.time == 0 ? TimePlayed : TimeLeft);
+ (game.no_time_limit ? TimePlayed : TimeLeft);
}
if (tape.recording || tape.playing)
KillPlayer(&stored_player[i]);
}
#if 1
- else if (level.time == 0 && !AllPlayersGone) /* level w/o time limit */
+ else if (game.no_time_limit && !AllPlayersGone) /* level w/o time limit */
{
game_panel_controls[GAME_PANEL_TIME].value = TimePlayed;
DisplayGameControlValues();
}
#else
- else if (level.time == 0 && !AllPlayersGone) /* level w/o time limit */
+ else if (game.no_time_limit && !AllPlayersGone) /* level w/o time limit */
DrawGameValue_Time(TimePlayed);
#endif
}
if (level.time > 0 || level.use_time_orb_bug)
{
TimeLeft += level.time_orb_time;
+ game.no_time_limit = FALSE;
#if 1
game_panel_controls[GAME_PANEL_TIME].value = TimeLeft;
#if 0
void ChangeTime(int value)
{
- int *time = (level.time == 0 ? &TimePlayed : &TimeLeft);
+ int *time = (game.no_time_limit ? &TimePlayed : &TimeLeft);
*time += value;