Javascript collisions

This commit is contained in:
2023-01-11 22:57:34 +00:00
parent 469b955d97
commit f0ce69f957
7 changed files with 141 additions and 79 deletions

View File

@@ -2,6 +2,7 @@
#define TWODPHYSICS_H
#include <chipmunk/chipmunk.h>
#include "script.h"
struct gameobject;
@@ -10,11 +11,6 @@ extern float phys2d_gravity;
extern int physOn;
extern cpSpace *space;
struct phys_cbs {
void *begin;
void *separate;
};
struct phys2d_shape {
cpShape *shape;
struct gameobject *go;
@@ -98,7 +94,13 @@ void edge_gui(struct phys2d_edge *edge);
void phys2d_init();
void phys2d_update(float deltaT);
void phys2d_add_handler_type(int cmd, struct gameobject *go, void *cb);
struct phys_cbs {
struct callee begin;
struct callee separate;
};
void phys2d_add_handler_type(int cmd, struct gameobject *go, struct callee c);
void register_collide(void *sym);
void phys2d_set_gravity(cpVect v);
void shape_gui(struct phys2d_shape *shape);