mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 09:28:15 +03:00
Display centiseconds on time trial result and Game Complete
Centiseconds won't be saved to any save file or anything. This is just to make speedrunning a bit more competitive, being able to know the precise time of a time trial or full game run. The time trial par time on the result screen always has ".99" after it. This is basically due to the game comparing the number of seconds to the par number of seconds using less-than-or-equal-to instead of simply less-than.
This commit is contained in:
@@ -258,6 +258,7 @@ void Game::init(void)
|
||||
timetrialparlost = false;
|
||||
timetrialpar = 0;
|
||||
timetrialresulttime = 0;
|
||||
timetrialresultframes = 0;
|
||||
|
||||
totalflips = 0;
|
||||
hardestroom = "Welcome Aboard";
|
||||
@@ -1390,6 +1391,7 @@ void Game::updatestate()
|
||||
obj.removetrigger(82);
|
||||
hascontrol = false;
|
||||
timetrialresulttime = seconds + (minutes * 60) + (hours * 60 * 60);
|
||||
timetrialresultframes = frames;
|
||||
timetrialrank = 0;
|
||||
if (timetrialresulttime <= timetrialpar) timetrialrank++;
|
||||
if (trinkets() >= timetrialshinytarget) timetrialrank++;
|
||||
@@ -3219,6 +3221,7 @@ void Game::updatestate()
|
||||
graphics.createtextbox(" All Crew Members Rescued! ", -1, 64, 0, 0, 0);
|
||||
}
|
||||
savetime = timestring();
|
||||
savetime += "." + help.twodigits(frames*100 / 30);
|
||||
break;
|
||||
case 3503:
|
||||
{
|
||||
@@ -6883,6 +6886,7 @@ std::string Game::resulttimestring()
|
||||
{
|
||||
tempstring = "00:" + help.twodigits(timetrialresulttime);
|
||||
}
|
||||
tempstring += "." + help.twodigits(timetrialresultframes*100 / 30);
|
||||
return tempstring;
|
||||
}
|
||||
|
||||
|
||||
@@ -258,7 +258,7 @@ public:
|
||||
//Time Trials
|
||||
bool intimetrial, timetrialparlost;
|
||||
int timetrialcountdown, timetrialshinytarget, timetriallevel;
|
||||
int timetrialpar, timetrialresulttime, timetrialrank;
|
||||
int timetrialpar, timetrialresulttime, timetrialresultframes, timetrialrank;
|
||||
|
||||
int creditposition;
|
||||
int oldcreditposition;
|
||||
|
||||
@@ -661,7 +661,7 @@ void menurender()
|
||||
{
|
||||
graphics.bigprint( -1, 20, "Results", tr, tg, tb, true, 3);
|
||||
|
||||
std::string tempstring = game.resulttimestring() + " / " + game.partimestring();
|
||||
std::string tempstring = game.resulttimestring() + " / " + game.partimestring() + ".99";
|
||||
|
||||
graphics.drawspritesetcol(30, 80-15, 50, 22);
|
||||
graphics.Print(65, 80-15, "TIME TAKEN:", 255, 255, 255);
|
||||
|
||||
Reference in New Issue
Block a user