Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

style fix

  • Loading branch information...
commit 173689b15de86227c18d2c59ddd96840decf618a 1 parent 8a13078
@niksaak authored
Showing with 5 additions and 7 deletions.
  1. +5 −7 src/engine/engine.c
View
12 src/engine/engine.c
@@ -46,14 +46,11 @@ void gameloop(SDL_Surface* screen)
Uint32 accum = 0;
while(running) {
- Uint32 newt;
- Uint32 framet;
- state_t* st;
+ Uint32 newt = SDL_GetTicks();
+ Uint32 framet = newt - curt;
+ state_t* st = curstate();
++gfxcount;
- st = curstate();
- newt = SDL_GetTicks();
- framet = newt - curt;
curt = newt;
accum += framet;
@@ -64,7 +61,7 @@ void gameloop(SDL_Surface* screen)
}
render(screen, st->do_render);
-
+
if(st != curstate()) {
st->sleep();
curstate()->wake();
@@ -77,3 +74,4 @@ void endgame()
{
running = false;
}
+
Please sign in to comment.
Something went wrong with that request. Please try again.