diff options
| author | esquizo <esquizo+noreply@esquizo.net> | 2026-05-17 12:02:56 -0300 |
|---|---|---|
| committer | esquizo <esquizo+noreply@esquizo.net> | 2026-05-17 12:02:56 -0300 |
| commit | 97702f11ea016ca2e395f71f03c3fc3a2ee929ca (patch) | |
| tree | 20380f895ee422c48b970c7da5b921e046e35da4 /libphysics/dat.h | |
| parent | 5c6b3c19172948cf2e1800a9333cfcd858ee829c (diff) | |
adicionado libphysics
Diffstat (limited to 'libphysics/dat.h')
| -rw-r--r-- | libphysics/dat.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/libphysics/dat.h b/libphysics/dat.h new file mode 100644 index 0000000..75869a4 --- /dev/null +++ b/libphysics/dat.h @@ -0,0 +1,24 @@ +typedef struct Body { + BodyType type; + int active; + vec2 pos; + vec2 size; + vec2 vel; + vec2 accel; +} Body; + +void phxmapcollision(Body *); +void phxbodycollision(Body *, Body *); + +int phxaabbcheck(Body *a, Body *b); +void phxcollisionmap(Body *a); +void phxaabbresolv(Body *a, Body *b, vec2 p, vec2 n); + +int phxenqevent(CollisionEvent *ev); +int phxdeqevent(CollisionEvent *ev); + +extern int phxmapwidth, phxmapheight; +extern int *phxmapbuffer; + +extern Body phxbodypool[]; +extern int phxbodypoolsize; |
