mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2025-01-11 11:29:45 +01:00
Move delta loop to its own function
Makes the code less of a giant blob, again.
This commit is contained in:
parent
e294b92785
commit
c9aea52385
1 changed files with 7 additions and 1 deletions
|
@ -64,6 +64,7 @@ volatile Uint32 f_timePrev = 0;
|
|||
volatile Uint32 f_accumulator = 0;
|
||||
|
||||
void gameloop();
|
||||
void deltaloop();
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
|
@ -353,6 +354,12 @@ void gameloop()
|
|||
timePrev = time_;
|
||||
time_ = SDL_GetTicks();
|
||||
|
||||
deltaloop();
|
||||
}
|
||||
}
|
||||
|
||||
void deltaloop()
|
||||
{
|
||||
game.infocus = key.isActive;
|
||||
|
||||
// Update network per frame.
|
||||
|
@ -639,5 +646,4 @@ void gameloop()
|
|||
}
|
||||
gameScreen.FlipScreen();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue