carry: the runtime and render3d work Maroon Lake builds against
Input.text, App.monitor_count / window_to_monitor / window_fixed, gl_sleep_us, and the grass and collide changes, uncommitted on main and depended on by the game; carried here so the language work starts from what the game actually uses. main's working tree is untouched.
This commit is contained in:
parent
86492064aa
commit
e6f565a6c4
17 changed files with 622 additions and 34 deletions
|
|
@ -21,6 +21,7 @@ function is_intrinsic2(name: pointer) -> bool {
|
|||
if (name == "win_open") or (name == "win_poll") or (name == "win_present") { return true }
|
||||
if (name == "win_running") or (name == "win_close") { return true }
|
||||
if (name == "win_held") or (name == "win_mouse") { return true } # #50 device layer
|
||||
if (name == "win_text") { return true } # typed characters
|
||||
if (name == "win_key_char") { return true } # Input.key_label
|
||||
if (name == "win_pad") or (name == "win_touch") { return true } # #51 gamepad / touch
|
||||
if (name == "win_cursor_mode") { return true } # #89 cursor capture
|
||||
|
|
@ -75,6 +76,10 @@ function emit_intrinsic2(name: pointer, e: Node) -> Val {
|
|||
# what the active keyboard layout types on a held-set key position (windowed only,
|
||||
# DCE'd headless): a code point, 0 for none.
|
||||
if (name == "win_key_char") { let a = arg_code(e, 0); return val(emit_bind(`call i32 @win_key_char(i32 {a})`), "int") }
|
||||
# what the player TYPED since the last call - UTF-16 code units into the caller's buffer, one per
|
||||
# word, returning how many. The layout, the modifiers and any dead key are already applied, which
|
||||
# is why a name field must read this rather than build text out of key codes.
|
||||
if (name == "win_text") { let a = arg_code(e, 0); let b = arg_code(e, 1); return val(emit_bind(`call i32 @win_text(ptr {a}, i32 {b})`), "int") }
|
||||
# #51 — win_pad: 6 words/pad [connected, mask, lx, ly, rx, ry]; win_touch: 3
|
||||
# words/point [active, x, y]. Both windowed-only, DCE'd headless.
|
||||
if (name == "win_pad") { let a = arg_code(e, 0); emit(" call void @win_pad(ptr "); emit(a); emit(")\n"); return val("0", "void") }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue