2023-01-10 07:13:00 -06:00
|
|
|
#ifndef FFI_H
|
|
|
|
#define FFI_H
|
|
|
|
|
2023-04-18 14:49:17 -05:00
|
|
|
#include "quickjs/quickjs.h"
|
2023-02-02 17:52:15 -06:00
|
|
|
#include <chipmunk/chipmunk.h>
|
2023-01-10 07:13:00 -06:00
|
|
|
|
|
|
|
void ffi_load();
|
|
|
|
|
2023-04-18 14:49:17 -05:00
|
|
|
JSValue vec2js(cpVect v);
|
|
|
|
cpVect js2vec2(JSValue v);
|
2023-02-02 17:52:15 -06:00
|
|
|
|
2023-04-18 14:49:17 -05:00
|
|
|
JSValue bitmask2js(cpBitmask mask);
|
|
|
|
cpBitmask js2bitmask(JSValue v);
|
2023-02-02 17:52:15 -06:00
|
|
|
|
2023-04-19 15:16:35 -05:00
|
|
|
struct color js2color(JSValue v);
|
|
|
|
double js2number(JSValue v);
|
2023-04-18 17:58:44 -05:00
|
|
|
JSValue num2js(double g);
|
|
|
|
JSValue int2js(int i);
|
|
|
|
|
2023-02-02 17:52:15 -06:00
|
|
|
#endif
|