- char str[128];
-
- //sprintf(str, _( "Max score: %d"), stats[SCORE_STAT][SPLAYER]);
- //context.draw_text(white_text, str, Vector(SCREEN_WIDTH/2, 450), CENTER_ALLIGN, LAYER_GUI);
-
- for(int i = 0; i < NUM_STATS; i++)
- {
- if(i == COINS_COLLECTED_STAT)
- sprintf(str, _("Max coins collected: %d / %d"),
- stats[COINS_COLLECTED_STAT][SPLAYER],
- stats[COINS_COLLECTED_STAT][STOTAL]);
- else if(i == BADGUYS_KILLED_STAT)
- sprintf(str, _("Max fragging: %d / %d"),
- stats[BADGUYS_KILLED_STAT][SPLAYER],
- stats[BADGUYS_KILLED_STAT][STOTAL]);
- else if((i == TIME_NEEDED_STAT) && (stats[TIME_NEEDED_STAT][STOTAL] != -1))
- sprintf(str, _("Min time needed: %d / %d"),
- stats[TIME_NEEDED_STAT][SPLAYER],
- stats[TIME_NEEDED_STAT][STOTAL]);
- else
- continue;
-
-
- // y == (462 + i*18) before score removal
- context.draw_text(white_small_text, str, Vector(SCREEN_WIDTH/2, 450 + (i+1)*18), CENTER_ALLIGN, LAYER_GUI);
- }
+ char stat_buf[128];
+ int py = 450 + 18;
+
+ snprintf(stat_buf, sizeof(stat_buf), "%d/%d", coins, total_coins);
+ context.draw_text(white_small_text, _("Max coins collected:"), Vector(left, py), LEFT_ALLIGN, LAYER_GUI);
+ context.draw_text(white_small_text, "%d / %d", Vector(right, py), RIGHT_ALLIGN, LAYER_GUI);
+ py+=18;
+
+ snprintf(stat_buf, sizeof(stat_buf), "%d/%d", badguys, total_badguys);
+ context.draw_text(white_small_text, _("Max fragging:"), Vector(left, py), LEFT_ALLIGN, LAYER_GUI);
+ context.draw_text(white_small_text, "%d / %d", Vector(right, py), RIGHT_ALLIGN, LAYER_GUI);
+ py+=18;
+
+ int csecs = (int)(time * 100);
+ int mins = (int)(csecs / 6000);
+ int secs = (csecs % 6000) / 100;
+ snprintf(stat_buf, sizeof(stat_buf), "%02d:%02d", mins,secs);
+ context.draw_text(white_small_text, _("Min time needed:"), Vector(left, py), LEFT_ALLIGN, LAYER_GUI);
+ context.draw_text(white_small_text, "%02d:%02d", Vector(right, py), RIGHT_ALLIGN, LAYER_GUI);
+ py+=18;
+
+ snprintf(stat_buf, sizeof(stat_buf), "%d/%d", secrets, total_secrets);
+ context.draw_text(white_small_text, _("Max secrets found:"), Vector(left, py), LEFT_ALLIGN, LAYER_GUI);
+ context.draw_text(white_small_text, "%d / %d", Vector(right, py), RIGHT_ALLIGN, LAYER_GUI);
+ py+=18;