mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Remove game.gameframerate as duplicate of game.slowdown
game.gameframerate seems to exist for converting the value of game.slowdown into an actual timestep value, when really the timestep value should just use game.slowdown directly with a fast lookup table. Otherwise, there's a bunch of duplicated game.slowdown case-switches everywhere, which adds up to a large, annoying pile should the values be changed in the future. But now the duplicate variable has been removed, and with it, all the copy-pasted case-switches. Also, the game speed text rendering in Menu::accessibility and Menu::setslowdown has been factored out to a function and de-duplicated as well.
This commit is contained in:
@@ -488,7 +488,6 @@ void menuactionpress()
|
||||
{
|
||||
case 0:
|
||||
//back
|
||||
game.gameframerate=34;
|
||||
game.slowdown = 30;
|
||||
game.savestats();
|
||||
music.playef(11);
|
||||
@@ -497,7 +496,6 @@ void menuactionpress()
|
||||
map.nexttowercolour();
|
||||
break;
|
||||
case 1:
|
||||
game.gameframerate=41;
|
||||
game.slowdown = 24;
|
||||
game.savestats();
|
||||
music.playef(11);
|
||||
@@ -506,7 +504,6 @@ void menuactionpress()
|
||||
map.nexttowercolour();
|
||||
break;
|
||||
case 2:
|
||||
game.gameframerate=55;
|
||||
game.slowdown = 18;
|
||||
game.savestats();
|
||||
music.playef(11);
|
||||
@@ -515,7 +512,6 @@ void menuactionpress()
|
||||
map.nexttowercolour();
|
||||
break;
|
||||
case 3:
|
||||
game.gameframerate=83;
|
||||
game.slowdown = 12;
|
||||
game.savestats();
|
||||
music.playef(11);
|
||||
@@ -630,7 +626,7 @@ void menuactionpress()
|
||||
else
|
||||
{
|
||||
music.playef(2);
|
||||
game.gameframerate = 34;
|
||||
game.slowdown = 30;
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
|
||||
Reference in New Issue
Block a user