fix(input): Key.Up/Down/Left/Right are the held set's 128-131

The arrow Key constants folded to the codes of w/s/a/d, which is what the
per-frame key reports for an arrow, but cocoa.ll has always stored an arrow in
the held-key set under 128-131. So Input.key_down(Key.Up) read the W bit and
Input.move_i's arrow half never moved anything. Input.key keeps its WASD alias,
so games comparing it with 'w' (snake, chronorift) still take the arrows.

New example input_arrows.ludic, checked by ludic-dev test.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-13 03:00:29 +03:00
parent 572e09b2b1
commit 6117f73602
4 changed files with 54 additions and 10 deletions

View file

@ -61197,7 +61197,7 @@ ifend23:
%t27 = icmp ne i32 %t26, 0
br i1 %t27, label %then24, label %ifend26
then24:
store i32 119, ptr %retval
store i32 128, ptr %retval
br label %ret
ifend26:
%t28 = load ptr, ptr %t0
@ -61205,7 +61205,7 @@ ifend26:
%t30 = icmp ne i32 %t29, 0
br i1 %t30, label %then27, label %ifend29
then27:
store i32 115, ptr %retval
store i32 129, ptr %retval
br label %ret
ifend29:
%t31 = load ptr, ptr %t0
@ -61213,7 +61213,7 @@ ifend29:
%t33 = icmp ne i32 %t32, 0
br i1 %t33, label %then30, label %ifend32
then30:
store i32 97, ptr %retval
store i32 130, ptr %retval
br label %ret
ifend32:
%t34 = load ptr, ptr %t0
@ -61221,7 +61221,7 @@ ifend32:
%t36 = icmp ne i32 %t35, 0
br i1 %t36, label %then33, label %ifend35
then33:
store i32 100, ptr %retval
store i32 131, ptr %retval
br label %ret
ifend35:
%t37 = load ptr, ptr %t0