diff options
Diffstat (limited to 'src/env.h')
| -rw-r--r-- | src/env.h | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -7,6 +7,8 @@ #include "pico8.h" #include "wasmrt.h" +#define PW_ENV_GPIO_SIZE 128 + /** * A host execution context. * @@ -30,15 +32,26 @@ struct w2c_env { struct wasm_rt_memory_t memory; struct wasm_rt_funcref_table_t table; struct pw_env_ctx context; + struct pw_env_data { uint32_t dynamictop; uint32_t tablebase; uint32_t mainloop; uint32_t errstr; uint32_t tempret; + uint32_t cartpos; + struct { + uint32_t index; + uint32_t pos; + } cartname; uint32_t command; uint32_t commandp; - bool exit; + struct { + bool pointerlock; + volatile bool shutdown; + } state; + uint32_t btn; + uint8_t gpio[PW_ENV_GPIO_SIZE]; } data; }; |
