Skip to content

Commit

Permalink
integrated chipmunk slightly
Browse files Browse the repository at this point in the history
  • Loading branch information
niksaak committed Feb 1, 2013
1 parent 551da18 commit 1069218
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/engine/stateman.h
Original file line number Diff line number Diff line change
@@ -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)();
Expand Down
4 changes: 2 additions & 2 deletions src/state_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ static void init()
static void wake()
{ }

static void do_world()
static void do_world(cpFloat step)
{ }

static void do_render()
Expand All @@ -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()
Expand All @@ -44,3 +43,4 @@ state_t state_main()

return s;
}

0 comments on commit 1069218

Please sign in to comment.