mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Don't use separate variable for number of trinkets in level
Same principle as removing the separate variable to track number of collected trinkets. This means it's less error-prone as we're no longer tracking number of trinkets separately. In the function that counts the number of trinkets, I would've liked to have used std::count_if(). However, the most optimal way would require using a lambda, and lambdas are too new for the C++ standard we're using. So I just bit the bullet and counted them manually.
This commit is contained in:
@@ -2251,7 +2251,7 @@ void maprender()
|
||||
if (graphics.flipmode)
|
||||
{
|
||||
graphics.Print(0, 164, "[Trinkets found]", 196, 196, 255 - help.glow, true);
|
||||
graphics.Print(0, 152, help.number(game.trinkets()) + " out of " + help.number(ed.numtrinkets), 96,96,96, true);
|
||||
graphics.Print(0, 152, help.number(game.trinkets()) + " out of " + help.number(ed.numtrinkets()), 96,96,96, true);
|
||||
|
||||
graphics.Print(0, 114, "[Number of Deaths]", 196, 196, 255 - help.glow, true);
|
||||
graphics.Print(0, 102,help.String(game.deathcounts), 96,96,96, true);
|
||||
@@ -2262,7 +2262,7 @@ void maprender()
|
||||
else
|
||||
{
|
||||
graphics.Print(0, 52, "[Trinkets found]", 196, 196, 255 - help.glow, true);
|
||||
graphics.Print(0, 64, help.number(game.trinkets()) + " out of "+help.number(ed.numtrinkets), 96,96,96, true);
|
||||
graphics.Print(0, 64, help.number(game.trinkets()) + " out of "+help.number(ed.numtrinkets()), 96,96,96, true);
|
||||
|
||||
graphics.Print(0, 102, "[Number of Deaths]", 196, 196, 255 - help.glow, true);
|
||||
graphics.Print(0, 114,help.String(game.deathcounts), 96,96,96, true);
|
||||
|
||||
Reference in New Issue
Block a user