mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-23 01:59:43 +01:00
Remove game.gametimer in favor of game.frames
PR #279 added game.gametimer solely for the editor ghosts feature. It seems that whoever originally wrote it (Leo for the now-dead VVVVVV: Community Edition, I believe) forgot that the game already had its own timer, that they could use. The game timer does increment on unfocus pause (whereas this doesn't), but that's a separate issue, and it ought to not do that.
This commit is contained in:
parent
17169320b4
commit
d45e6f6254
4 changed files with 1 additions and 6 deletions
|
@ -352,7 +352,6 @@ void Game::init(void)
|
||||||
skipfakeload = false;
|
skipfakeload = false;
|
||||||
|
|
||||||
ghostsenabled = false;
|
ghostsenabled = false;
|
||||||
gametimer = 0;
|
|
||||||
|
|
||||||
cliplaytest = false;
|
cliplaytest = false;
|
||||||
playx = 0;
|
playx = 0;
|
||||||
|
|
|
@ -436,8 +436,6 @@ public:
|
||||||
void returntoeditor(void);
|
void returntoeditor(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int gametimer;
|
|
||||||
|
|
||||||
bool inline inspecial(void)
|
bool inline inspecial(void)
|
||||||
{
|
{
|
||||||
return inintermission || insecretlab || intimetrial || nodeathmode;
|
return inintermission || insecretlab || intimetrial || nodeathmode;
|
||||||
|
|
|
@ -130,7 +130,7 @@ void gamerenderfixed(void)
|
||||||
{
|
{
|
||||||
if (map.custommode && !map.custommodeforreal)
|
if (map.custommode && !map.custommodeforreal)
|
||||||
{
|
{
|
||||||
if (game.gametimer % 3 == 0)
|
if (game.frames % 3 == 0)
|
||||||
{
|
{
|
||||||
int i = obj.getplayer();
|
int i = obj.getplayer();
|
||||||
GhostInfo ghost;
|
GhostInfo ghost;
|
||||||
|
|
|
@ -612,7 +612,6 @@ int main(int argc, char *argv[])
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
key.isActive = true;
|
key.isActive = true;
|
||||||
game.gametimer = 0;
|
|
||||||
|
|
||||||
gamestate_funcs = get_gamestate_funcs(game.gamestate, &num_gamestate_funcs);
|
gamestate_funcs = get_gamestate_funcs(game.gamestate, &num_gamestate_funcs);
|
||||||
loop_assign_active_funcs();
|
loop_assign_active_funcs();
|
||||||
|
@ -747,7 +746,6 @@ static void focused_begin(void)
|
||||||
{
|
{
|
||||||
Mix_Resume(-1);
|
Mix_Resume(-1);
|
||||||
Mix_ResumeMusic();
|
Mix_ResumeMusic();
|
||||||
game.gametimer++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void focused_end(void)
|
static void focused_end(void)
|
||||||
|
|
Loading…
Reference in a new issue