diff options
Diffstat (limited to 'libphysics/dat.h')
| -rw-r--r-- | libphysics/dat.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libphysics/dat.h b/libphysics/dat.h index 75869a4..9fe3312 100644 --- a/libphysics/dat.h +++ b/libphysics/dat.h @@ -1,3 +1,5 @@ +#define BLOCK_SIZE 128 + typedef struct Body { BodyType type; int active; @@ -7,6 +9,12 @@ typedef struct Body { vec2 accel; } Body; +typedef struct BlockmapNode BlockmapNode; +struct BlockmapNode { + BodyID id; + BlockmapNode *next; +}; + void phxmapcollision(Body *); void phxbodycollision(Body *, Body *); @@ -17,6 +25,9 @@ void phxaabbresolv(Body *a, Body *b, vec2 p, vec2 n); int phxenqevent(CollisionEvent *ev); int phxdeqevent(CollisionEvent *ev); +void phxmakeblkmap(void); +BlockmapNode *phxnodelist(float x, float y); + extern int phxmapwidth, phxmapheight; extern int *phxmapbuffer; |
