code wiki / _hdl_build / nx_game_touch.nx

nx_game_touch.nx

buildroot/runtime/_hdl_build/nx_game_touch.nx

1433 B36 linesdepth 2pulls 2 transitivereach 11 importersview sourcekind librarytopic game
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_game_touch.nx nx_game_touch_gate.nx nx_input_abstract.nx

imports: nx_syscalls.nx

imported by: nx_game_touch_gate.nxnx_input_abstract.nx

structs

none

consts

8const NX_KEY_SPACE: i64 = 32
9const NX_KEY_LEFT: i64 = 37
10const NX_KEY_UP: i64 = 38
11const NX_KEY_RIGHT: i64 = 39
12const NX_KEY_DOWN: i64 = 40

functions

15func tz_third(a: i64, span: i64) -> i64
called by 1: nx_touch_zone
24func nx_touch_zone(tx: i64, ty: i64, w: i64, h: i64) -> i64
called by 2: mainia_touch calls 1: tz_third