aboutsummaryrefslogtreecommitdiff
path: root/src/input.c
diff options
context:
space:
mode:
authorNicholas Rodrigues Lordello <[email protected]>2026-10-19 09:58:25 +0200
committerNicholas Rodrigues Lordello <[email protected]>2026-10-19 09:58:25 +0200
commitb7d0c353c7ff265f4904fd710c96395078e1dbe9 (patch)
tree6f6635f7272a15834dddfa8b34148bb4848e66f3 /src/input.c
parent0783cdf83f98bb8e1359892fa318b93f71d10b44 (diff)
Implement Many Host Functions
Implemented many of the missing host functions, but some things are still unimplemented: 1. Audio, because I have _no_ idea how that works. 2. Syscalls, they look hairy and will look into them separately. 3. ASM constants, we need to go over the array in the the exported JS module and understand how each one maps to our host. The other functions are _mostly_ straightforward to implement, and I did so with some caveats (for example, only supporting the single format the PICO-8 uses for `strftime`) which is good enough for us. Next, I need to refactor how we load carts: in particular, all carts need to come from the `_cartdat` mechanism, so the "embedded" carts instead of loading them ad-hoc. This requires us to refactor how we do the multicart loading to pre-load the entire `.p8.dir` when a cart is selected (instead of just keeping their names and lazy-loading them in).
Diffstat (limited to 'src/input.c')
-rw-r--r--src/input.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/input.c b/src/input.c
index 412cf88..9c03002 100644
--- a/src/input.c
+++ b/src/input.c
@@ -244,7 +244,8 @@ bool pw_input_event(struct pw_input *input, struct pw_players *players,
static uint32_t convert_scancode(SDL_Scancode scancode) {
// Some of the scancodes have slightly different numbering.
switch (scancode) {
- // TODO: remap scancodes that are different in case we run into any issues.
+ // TODO(nlordell): remap scancodes that are different in case we run into
+ // any issues.
default:
return scancode;
}