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:
Misa
2020-11-12 17:05:18 -08:00
committed by Ethan Lee
parent ee44f81d4c
commit bc9dff8c2a
5 changed files with 42 additions and 69 deletions

View File

@@ -275,7 +275,6 @@ public:
bool colourblindmode;
bool noflashingmode;
int slowdown;
Uint32 gameframerate;
bool nodeathmode;
int gameoverdelay;