{
game.time_final = (level.game_engine_type == GAME_ENGINE_TYPE_BD ? game_bd.time_left :
game.no_level_time_limit ? TimePlayed : TimeLeft);
- game.score_time_final = (level.use_step_counter ? TimePlayed :
+ game.score_time_final = (level.game_engine_type == GAME_ENGINE_TYPE_BD ? game_bd.frames_played :
+ level.use_step_counter ? TimePlayed :
TimePlayed * FRAMES_PER_SECOND + TimeFrames);
game.score_final = (level.game_engine_type == GAME_ENGINE_TYPE_BD ? game_bd.score :
// if last second running, wait for native engine time to exactly reach zero
if (getTimeLeft_BD() == 1 && TimeLeft == 1)
TimeFrames = frames_per_second - 1;
+
+ // needed to store final time after solving game (before counting down remaining time)
+ SetTimeFrames_BD(TimePlayed * FRAMES_PER_SECOND + TimeFrames);
}
if (TimeFrames >= frames_per_second)
int time_left;
int gems_still_needed;
int score;
+
+ // needed for saving score time
+ int frames_played;
};
struct LevelInfo_BD
boolean checkBonusTime_BD(void);
int getFramesPerSecond_BD(void);
int getTimeLeft_BD(void);
+void SetTimeFrames_BD(int);
void InitGfxBuffers_BD(void);
return 0;
}
+void SetTimeFrames_BD(int frames_played)
+{
+ // needed to store final time after solving game (before counting down remaining time)
+ if (game_bd.game->state_counter == GAME_INT_CAVE_RUNNING)
+ game_bd.frames_played = frames_played;
+
+}
+
static void UpdateGameDoorValues_BD(void)
{
GdCave *cave = game_bd.game->cave;