added last added score entry position to score info structure
[rocksndiamonds.git] / src / screens.c
index c23f7ce6cd2af8a40baf75989ef39ef22d188962..c60881afae76b2c85850c6196788f7238780847b 100644 (file)
@@ -5071,31 +5071,20 @@ void DrawHallOfFame(int level_nr, int highlight_position)
 
 static char *getHallOfFameScoreText(int nr)
 {
-  // use playing time instead of score for Supaplex levels
-  if (level.rate_time_over_score ||
-      level.game_engine_type == GAME_ENGINE_TYPE_SP)
-  {
-    if (level.use_step_counter)
-      return int2str(scores.entry[nr].time, 5);
-
-    static char score_text[10];
-    int time_final_max = 999;
-    int time_seconds = scores.entry[nr].time / FRAMES_PER_SECOND;
-    int score = scores.entry[nr].score;
+  if (!level.rate_time_over_score)
+    return int2str(scores.entry[nr].score, 5); // show normal score
 
-    // convert old score file entries without playing time
-    if (time_seconds == 0 && score > 0 && score < time_final_max)
-      time_seconds = time_final_max - score - 1;
+  if (level.use_step_counter)
+    return int2str(scores.entry[nr].time, 5);  // show number of steps
 
-    int mm = (time_seconds / 60) % 60;
-    int ss = (time_seconds % 60);
+  static char score_text[10];
+  int time_seconds = scores.entry[nr].time / FRAMES_PER_SECOND;
+  int mm = (time_seconds / 60) % 60;
+  int ss = (time_seconds % 60);
 
-    sprintf(score_text, "%02d:%02d", mm, ss);
-
-    return score_text;
-  }
+  sprintf(score_text, "%02d:%02d", mm, ss);    // show playing time
 
-  return int2str(scores.entry[nr].score, 5);
+  return score_text;
 }
 
 static void drawHallOfFameList(int level_nr, int first_entry,