prosperon/source/engine/ffi.h

21 lines
352 B
C
Raw Normal View History

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"
#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-04-18 14:49:17 -05:00
JSValue bitmask2js(cpBitmask mask);
cpBitmask js2bitmask(JSValue v);
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);
#endif