From: Holger Schemel Date: Sat, 20 Mar 2021 10:11:07 +0000 (+0100) Subject: cleanup of function to get high score list text entry X-Git-Tag: 4.3.0.0~203 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=d89d36fe4c90bdc2b0948156451cfb8fd678e473;p=rocksndiamonds.git cleanup of function to get high score list text entry --- diff --git a/src/screens.c b/src/screens.c index 8e4fb8c9..c538c84e 100644 --- a/src/screens.c +++ b/src/screens.c @@ -5071,24 +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); + if (!level.rate_time_over_score) + return int2str(scores.entry[nr].score, 5); - 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); + if (level.use_step_counter) + return int2str(scores.entry[nr].time, 5); - sprintf(score_text, "%02d:%02d", mm, ss); + 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); - return score_text; - } + sprintf(score_text, "%02d:%02d", mm, ss); - return int2str(scores.entry[nr].score, 5); + return score_text; } static void drawHallOfFameList(int level_nr, int first_entry,