mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-02-07 09:24:14 +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;
|
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();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user