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

@@ -6,6 +6,12 @@
extern duk_context *duk;
struct callee {
void *fn;
void *obj;
};
void script_init();
void script_run(const char *script);
int script_dofile(const char *file);
@@ -18,13 +24,13 @@ void script_call_sym_args(void *sym, void *args);
int script_has_sym(void *sym);
void script_eval_w_env(const char *s, void *env);
void register_update(void *obj, void *sym);
void register_update(struct callee c);
void call_updates(double dt);
void register_gui(void *sym);
void register_gui(struct callee c);
void call_gui();
void register_physics(void *obj, void *sym);
void register_physics(struct callee c);
void call_physics(double dt);
duk_idx_t vec2duk(cpVect v);