Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
Loading...
Searching...
No Matches
estella_abi.h File Reference
#include <stddef.h>
#include <stdint.h>
#include <string.h>
#include <math.h>
Include dependency graph for estella_abi.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  EsQueryRows
struct  EsCmd
struct  EsSysCtx
struct  EsEventOut
struct  EsQueryDecl
struct  EsSystemDecl

Macros

#define ES_PTR(a)
#define ES_EXPORT
#define ES_CMD_DESPAWN   1u
#define ES_CMD_REMOVE   2u
#define ES_PIO2_HI   1.5707963267341256
#define ES_PIO2_LO   6.077100506506192e-11
#define ES_TWO_OVER_PI   0.6366197723675814

Typedefs

typedef uintptr_t es_addr_t
typedef struct EsQueryRows EsQueryRows
typedef struct EsCmd EsCmd
typedef struct EsSysCtx EsSysCtx
typedef struct EsEventOut EsEventOut
typedef struct EsQueryDecl EsQueryDecl
typedef struct EsSystemDecl EsSystemDecl
typedef char es_check_sysctx[sizeof(EsSysCtx)==6 *sizeof(es_addr_t) ? 1 :-1]
typedef char es_check_rows[sizeof(EsQueryRows)==2 *sizeof(es_addr_t) ? 1 :-1]
typedef char es_check_cmd[sizeof(EsCmd)==4 *4 ? 1 :-1]
typedef char es_check_eventout[sizeof(EsEventOut)==3 *sizeof(es_addr_t) ? 1 :-1]

Functions

static double es_f32 (const unsigned char *p)
static void es_set_f32 (unsigned char *p, double v)
static double es_f64 (const unsigned char *p)
static void es_set_f64 (unsigned char *p, double v)
static int es_bool (const unsigned char *p)
static int es_bit (const unsigned char *p, unsigned bit)
static void es_set_bool (unsigned char *p, int v)
static double es_abs (double x)
static double es_floor (double x)
static double es_ceil (double x)
static double es_trunc (double x)
static double es_sqrt (double x)
static double es_kernel_sin (double x)
static double es_kernel_cos (double x)
static double es_trig_quadrant (double x, double *r)
static double es_exact_sin (double x)
static double es_exact_cos (double x)
static double es_sign (double x)
static double es_round (double x)
static double es_min (double a, double b)
static double es_max (double a, double b)
static double es_rem (double a, double b)

Macro Definition Documentation

◆ ES_CMD_DESPAWN

#define ES_CMD_DESPAWN   1u

Definition at line 62 of file estella_abi.h.

Referenced by esengine::aot::applyCommands().

◆ ES_CMD_REMOVE

#define ES_CMD_REMOVE   2u

Definition at line 63 of file estella_abi.h.

◆ ES_EXPORT

#define ES_EXPORT

Definition at line 44 of file estella_abi.h.

◆ ES_PIO2_HI

#define ES_PIO2_HI   1.5707963267341256

Definition at line 163 of file estella_abi.h.

Referenced by es_trig_quadrant().

◆ ES_PIO2_LO

#define ES_PIO2_LO   6.077100506506192e-11

Definition at line 164 of file estella_abi.h.

Referenced by es_trig_quadrant().

◆ ES_PTR

#define ES_PTR ( a)
Value:
((unsigned char *)(a))

Definition at line 32 of file estella_abi.h.

◆ ES_TWO_OVER_PI

#define ES_TWO_OVER_PI   0.6366197723675814

Definition at line 165 of file estella_abi.h.

Referenced by es_trig_quadrant().

Typedef Documentation

◆ es_addr_t

typedef uintptr_t es_addr_t

Definition at line 31 of file estella_abi.h.

◆ es_check_cmd

typedef char es_check_cmd[sizeof(EsCmd)==4 *4 ? 1 :-1]

Definition at line 120 of file estella_abi.h.

◆ es_check_eventout

typedef char es_check_eventout[sizeof(EsEventOut)==3 *sizeof(es_addr_t) ? 1 :-1]

Definition at line 121 of file estella_abi.h.

◆ es_check_rows

typedef char es_check_rows[sizeof(EsQueryRows)==2 *sizeof(es_addr_t) ? 1 :-1]

Definition at line 119 of file estella_abi.h.

◆ es_check_sysctx

typedef char es_check_sysctx[sizeof(EsSysCtx)==6 *sizeof(es_addr_t) ? 1 :-1]

Definition at line 118 of file estella_abi.h.

◆ EsCmd

typedef struct EsCmd EsCmd

◆ EsEventOut

typedef struct EsEventOut EsEventOut

◆ EsQueryDecl

typedef struct EsQueryDecl EsQueryDecl

◆ EsQueryRows

typedef struct EsQueryRows EsQueryRows

◆ EsSysCtx

typedef struct EsSysCtx EsSysCtx

◆ EsSystemDecl

typedef struct EsSystemDecl EsSystemDecl

Function Documentation

◆ es_abs()

double es_abs ( double x)
inlinestatic

Definition at line 144 of file estella_abi.h.

◆ es_bit()

int es_bit ( const unsigned char * p,
unsigned bit )
inlinestatic

Definition at line 135 of file estella_abi.h.

◆ es_bool()

int es_bool ( const unsigned char * p)
inlinestatic

Definition at line 133 of file estella_abi.h.

◆ es_ceil()

double es_ceil ( double x)
inlinestatic

Definition at line 146 of file estella_abi.h.

◆ es_exact_cos()

double es_exact_cos ( double x)
inlinestatic

Definition at line 203 of file estella_abi.h.

References es_kernel_cos(), es_kernel_sin(), and es_trig_quadrant().

◆ es_exact_sin()

double es_exact_sin ( double x)
inlinestatic

Definition at line 193 of file estella_abi.h.

References es_kernel_cos(), es_kernel_sin(), and es_trig_quadrant().

◆ es_f32()

double es_f32 ( const unsigned char * p)
inlinestatic

Definition at line 126 of file estella_abi.h.

◆ es_f64()

double es_f64 ( const unsigned char * p)
inlinestatic

Definition at line 128 of file estella_abi.h.

◆ es_floor()

double es_floor ( double x)
inlinestatic

Definition at line 145 of file estella_abi.h.

◆ es_kernel_cos()

double es_kernel_cos ( double x)
inlinestatic

Definition at line 175 of file estella_abi.h.

Referenced by es_exact_cos(), and es_exact_sin().

◆ es_kernel_sin()

double es_kernel_sin ( double x)
inlinestatic

Definition at line 167 of file estella_abi.h.

Referenced by es_exact_cos(), and es_exact_sin().

◆ es_max()

double es_max ( double a,
double b )
inlinestatic

Definition at line 239 of file estella_abi.h.

◆ es_min()

double es_min ( double a,
double b )
inlinestatic

Definition at line 234 of file estella_abi.h.

◆ es_rem()

double es_rem ( double a,
double b )
inlinestatic

Definition at line 246 of file estella_abi.h.

◆ es_round()

double es_round ( double x)
inlinestatic

Definition at line 224 of file estella_abi.h.

◆ es_set_bool()

void es_set_bool ( unsigned char * p,
int v )
inlinestatic

Definition at line 136 of file estella_abi.h.

◆ es_set_f32()

void es_set_f32 ( unsigned char * p,
double v )
inlinestatic

Definition at line 127 of file estella_abi.h.

◆ es_set_f64()

void es_set_f64 ( unsigned char * p,
double v )
inlinestatic

Definition at line 129 of file estella_abi.h.

◆ es_sign()

double es_sign ( double x)
inlinestatic

Definition at line 215 of file estella_abi.h.

◆ es_sqrt()

double es_sqrt ( double x)
inlinestatic

Definition at line 148 of file estella_abi.h.

◆ es_trig_quadrant()

double es_trig_quadrant ( double x,
double * r )
inlinestatic

Definition at line 185 of file estella_abi.h.

References ES_PIO2_HI, ES_PIO2_LO, and ES_TWO_OVER_PI.

Referenced by es_exact_cos(), and es_exact_sin().

◆ es_trunc()

double es_trunc ( double x)
inlinestatic

Definition at line 147 of file estella_abi.h.