Closes the two open issues and lands the pending unreleased batch: - #90: `Sprite { atlas: 1 }` routes esys_sprite through atlas_draw_ex (scale/flip/tint), so cell / cell_span / strip ids of any size draw through the engine sprite-render system. examples/library/sprite_atlas is the pixel-readback regression. - #91: `become` from an @On(Event) listener / global handler / plain function no longer segfaults the compiler; it emits @L_scene_leave() (a dispatch on the live scene id) so the leaving scene's on-exit runs. UI_* handles are readable from any code (widget table built on first use). examples/library/scene_menus covers it. - fix: a windowed `ludicc -o` build that reaches the audio runtime only through the atlas/Assets preload import now links audio.ll + AVFoundation (the audio backend link was gated on a game-level Audio.* call, so any windowed game declaring Sprite failed to link). - the hand-written "Unreleased" CHANGELOG section is converted to changesets under changes/ so `x release` generates it. - plus the batch: engine-driven retained UI + UiClicked event, Overlay phase, TileSkin tilemap-render system, Key.* constants, Font/Ui/File namespaces, Sprite.strip, prefabs, managers, countdown fields, enum-typed machines, layer @Queries, ludic.prefs / ludic.dungeon packages, Ai.seek pathing, Solids.solid2, cursor confine (mode 3) fix, shooter centre-aim fix, reserved-word function diagnostic. Verified: x test (124/124), x test-tools, check-impl, check-vocabulary, check-docs, docs-gen + docs-check, bootstrap-cfree (seed is a fixpoint). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
parent
e9c2c51bc3
commit
ad548840c7
139 changed files with 58981 additions and 43671 deletions
|
|
@ -381,6 +381,22 @@ function input_axis_i(neg: int, pos: int) -> int {
|
|||
if in_bit_get(in_held, neg) { v = v - 1 }
|
||||
return v
|
||||
}
|
||||
# The standard top-down movement intent as -1/0/1 per axis: WASD or the arrow
|
||||
# keys, and the left stick of pad 0 (past a 0.35 deadzone) when one is connected.
|
||||
function input_move_i() -> IVec2 {
|
||||
in_init()
|
||||
var x = input_axis_i(Key.A, Key.D) + input_axis_i(Key.Left, Key.Right)
|
||||
var y = input_axis_i(Key.W, Key.S) + input_axis_i(Key.Up, Key.Down)
|
||||
if input_pad_connected(0) {
|
||||
let sx = input_pad_axis(0, 0)
|
||||
let sy = input_pad_axis(0, 1)
|
||||
if sx > 0.35 { x = 1 }
|
||||
if sx < -0.35 { x = 0 - 1 }
|
||||
if sy > 0.35 { y = 1 }
|
||||
if sy < -0.35 { y = 0 - 1 }
|
||||
}
|
||||
return IVec2.make(clamp(x, 0 - 1, 1), clamp(y, 0 - 1, 1))
|
||||
}
|
||||
# A 2D vector from four direction keys, normalized so a diagonal is not faster.
|
||||
function input_vector(left: int, right: int, up: int, down: int) -> Vector {
|
||||
in_init()
|
||||
|
|
@ -412,6 +428,9 @@ function input_strength(name: pointer) -> fixed {
|
|||
# 3 confined — dissociated but visible; the mouse cannot leave the window.
|
||||
# The platform auto-releases (shows + reconnects) while the window is not key
|
||||
# (Cmd-Tab) and on close. Headless / non-windowed: a no-op.
|
||||
enum CursorMode { Normal, Hidden, Locked, Confined } # Input.cursor_mode(mode:)
|
||||
enum PadButton { A, B, X, Y, LeftShoulder, RightShoulder, Back, Start } # Input.bind_pad(button:) / pad_button
|
||||
enum MouseButton { Left, Right, Middle } # Input.mouse_down(button:)
|
||||
function input_cursor_mode(mode: int) -> void {
|
||||
if is_windowed() { win_cursor_mode(mode) }
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue