code wiki / _hdl_build / nx_game_touch.nx
nx_game_touch.nx
buildroot/runtime/_hdl_build/nx_game_touch.nx
about
nx_game_touch.nx -- SOVEREIGN virtual-d-pad touch mapping (the SSOT spec for mobile game input). Maps a
touch point (tx,ty) on a (w x h) canvas to the SAME keyCode the existing wasm games already read: 3 columns
-> LEFT(37)/RIGHT(39); the center column -> UP(38)/ACTION-SPACE(32)/DOWN(40) by row. So EVERY existing game
becomes touch-playable with ZERO engine change. The last-mile JS in game_page.tpl.html MIRRORS this mapping
(pure transport per the arcade architecture -- the wasm still owns input meaning). NO float. license_tier: ORIGINAL
dependencies 1 imports · 2 importers
imports: nx_syscalls.nx
imported by: nx_game_touch_gate.nxnx_input_abstract.nx
structs
| none |
consts
| 8 | const NX_KEY_SPACE: i64 = 32 |
| 9 | const NX_KEY_LEFT: i64 = 37 |
| 10 | const NX_KEY_UP: i64 = 38 |
| 11 | const NX_KEY_RIGHT: i64 = 39 |
| 12 | const NX_KEY_DOWN: i64 = 40 |
functions
| 15 | func tz_third(a: i64, span: i64) -> i64 called by 1: nx_touch_zone |
| 24 | func nx_touch_zone(tx: i64, ty: i64, w: i64, h: i64) -> i64 |