mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2025-03-15 18:25:15 +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;
|
volatile Uint32 f_accumulator = 0;
|
||||||
|
|
||||||
void gameloop();
|
void gameloop();
|
||||||
|
void deltaloop();
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
@ -353,6 +354,12 @@ void gameloop()
|
||||||
timePrev = time_;
|
timePrev = time_;
|
||||||
time_ = SDL_GetTicks();
|
time_ = SDL_GetTicks();
|
||||||
|
|
||||||
|
deltaloop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void deltaloop()
|
||||||
|
{
|
||||||
game.infocus = key.isActive;
|
game.infocus = key.isActive;
|
||||||
|
|
||||||
// Update network per frame.
|
// Update network per frame.
|
||||||
|
@ -639,5 +646,4 @@ void gameloop()
|
||||||
}
|
}
|
||||||
gameScreen.FlipScreen();
|
gameScreen.FlipScreen();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue