typedef int BodyID; typedef enum { BTYPE_AABB, BTYPE_TILEMAP, } BodyType; typedef struct Body Body; typedef struct CollisionEvent { BodyID body1; BodyID body2; } CollisionEvent; BodyID phxnew(BodyType type); void phxdel(BodyID); void phxsetmap(int w, int h, int *tiles); void phxsetpos(BodyID, float x, float y); void phxsetsize(BodyID, float w, float h); void phxapplyaccel(BodyID, float f[2]); void phxgetpos(BodyID, float pos[2]); void phxgetsize(BodyID, float size[2]); int phxnextcollevent(CollisionEvent *ev); void phxtick(float delta);