blob: 5c4f377880571a2d95924b439a2d46b17633fb48 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
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);
|