Begin refactor.
This commit is contained in:
@ -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.
|
||||
|
Reference in New Issue
Block a user