Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

integrated chipmunk slightly

  • Loading branch information...
commit 1069218b9d1ffe0d16f922df41ef0dabfb106e2d 1 parent 551da18
@niksaak authored
Showing with 5 additions and 3 deletions.
  1. +3 −1 src/engine/stateman.h
  2. +2 −2 src/state_main.c
View
4 src/engine/stateman.h
@@ -1,11 +1,13 @@
#pragma once
+#include <chipmunk/chipmunk.h>
+
typedef struct state {
void (*init)();
void (*wake)();
- void (*do_world)();
+ void (*do_world)(cpFloat);
void (*do_render)();
void (*sleep)();
View
4 src/state_main.c
@@ -11,7 +11,7 @@ static void init()
static void wake()
{ }
-static void do_world()
+static void do_world(cpFloat step)
{ }
static void do_render()
@@ -22,7 +22,6 @@ static void do_render()
SDL_FillRect(screen, NULL, 0);
stringColor(screen, 20, 20, "Hello world", 0xffffffff);
SDL_UpdateRect(screen, 0, 0, 0, 0);
- SDL_Delay(5000);
}
static void sleep()
@@ -44,3 +43,4 @@ state_t state_main()
return s;
}
+
Please sign in to comment.
Something went wrong with that request. Please try again.