Skip to content

Commit 7690fc3

Browse files
committed
Show centiseconds for best time trial times (if available)
Since VVVVVV 2.3, time trial best times are stored not just with the number of seconds, but also the number of frames. However, there was no room to display it with the old design of the time trials screen. Now there is, so it can easily be displayed now with a small change! Unset frames are stored as -1, which fits perfectly into the frames argument of help.format_time(), because in that case the amount of centiseconds is not shown. It should be noted that opening VVVVVV 2.2 will instantly wipe your frames records, as described by TerryCavanagh#1030. But many people will likely never open 2.2 anymore.
1 parent a46c817 commit 7690fc3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

desktop_version/src/Render.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -1588,9 +1588,10 @@ static void menurender(void)
15881588
label_len = SDL_max(label_len, font::len(0, label));
15891589
font::print(0, 32, 65+sp*3, label, tr, tg, tb);
15901590

1591-
font::print(0, label_len+48, 65+sp, game.timetstring(game.besttimes[id_trial]), tr, tg, tb);
1592-
15931591
char buffer[SCREEN_WIDTH_CHARS + 1];
1592+
help.format_time(buffer, sizeof(buffer), game.besttimes[id_trial], game.bestframes[id_trial], true);
1593+
font::print(0, label_len+48, 65+sp, buffer, tr, tg, tb);
1594+
15941595
vformat_buf(
15951596
buffer, sizeof(buffer),
15961597
loc::gettext("{n_trinkets}/{max_trinkets}"),

0 commit comments

Comments
 (0)