Begin refactor.

This commit is contained in:
2021-09-18 23:13:05 -07:00
parent df53c646a2
commit 2b7446b818
143 changed files with 1706 additions and 2345 deletions

View File

@ -6,7 +6,27 @@
*/
#pragma once
#include <dawn/dawn.h>
#include "../libs.h"
#include "api/io.h"
#include "../engine/engine.h"
/** Implies that the arguments the function will take is variable */
#define SCRIPTER_VARIABLE_ARGUMENT_COUNT DUK_VARARGS
/** Global context defintion of the pointer referring back to the scripter */
#define SCRIPTER_SELF_NAME "__scripter"
/** Type forwarders */
typedef duk_context scriptercontext_t;
typedef duk_ret_t scripterreturn_t;
typedef struct {
duk_context *context;
engine_t *engine;
void *user;
} scripter_t;
typedef scripterreturn_t scriptermethod_t(scriptercontext_t *context);
/**
* Initialize the scripter engine.