mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Move delta loop to its own function
Makes the code less of a giant blob, again.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user