prosperon/source/engine/jsffi.h

25 lines
442 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 "HandmadeMath.h"
2024-01-14 10:24:31 -06:00
#include "dsp.h"
2023-01-10 07:13:00 -06:00
void ffi_load();
JSValue vec22js(HMM_Vec2 v);
2023-11-14 09:20:09 -06:00
HMM_Vec2 js2vec2(JSValue v);
2023-04-18 14:49:17 -05:00
JSValue bitmask2js(cpBitmask mask);
cpBitmask js2bitmask(JSValue v);
2023-10-10 17:37:58 -05:00
int js_print_exception(JSValue v);
2023-05-16 01:31:13 -05:00
struct rgba js2color(JSValue v);
2023-04-19 15:16:35 -05:00
double js2number(JSValue v);
2024-01-14 10:24:31 -06:00
JSValue number2js(double g);
2023-04-25 16:59:12 -05:00
JSValue str2js(const char *c);
2023-04-18 17:58:44 -05:00
2024-01-14 12:56:52 -06:00
void nota_int(char *blob);
#endif