Move delta loop to its own function

Makes the code less of a giant blob, again.
This commit is contained in:
Misa
2020-06-14 11:53:41 -07:00
committed by Ethan Lee
parent e294b92785
commit c9aea52385

View File

@@ -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();
}
}
}