port: the plate pulses -- restore the looping record, over the base rather than instead of it

Ask #1 measured: held at the title with no input the plate oscillates ~23 cycles
per window with no decay and NEVER goes off -- floor 159 thresholded pixels,
pulse bottoming at 714. A glow alone cannot do that (0 -> 80 -> 0); a steady base
plus a pulsing glow can, and 714/1520 are base-only and base-plus-glow.

The port already had the base right: ptbtn00's fade to 0 at t=244 is its EXIT
ramp, and while held the base sits at alpha 255. The glow was missing.

The defect was in the renderer, not the entry I deleted on 2026-08-29. _draw
treated a looping record like a focused one -- drawn INSTEAD of the base, which
is right for a focused button and wrong here. I deleted the right thing for the
wrong reason. A looping record now draws OVER the base and the entry is restored.

Rendered: 95.68 base only, 115.52 at peak, period 1.980 s against a declared 120
units = 2.000 s, ratio 0.990. Visible on the boot path; not under --screen
--overlay, where a static overlay poses at its arrival by design.

Authored in UNITS on their instruction, with their three limits verbatim: one
boot, does not distinguish boot from attract title, and 714/1520 is not an alpha
ratio so no duty cycle is inferred.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N7FiFFFwbvG2uxdcEh8HyF
This commit is contained in:
Sylpheed port agent
2026-08-30 07:51:11 +00:00
parent 10ae0bd464
commit aa6be8e809
3 changed files with 124 additions and 36 deletions

View File

@@ -638,13 +638,28 @@ func _draw() -> void:
and draw_leaf_for.has(String(element.get("id", ""))) \
and _draw_leaf(element):
continue
# A focused button draws its own record instead of its base sprite -- and
# so does an element the authored table says always shows it, which is
# how the PRESS (A) plate gets its glow on a screen that has no buttons
# and focuses nothing.
if (focused_id == id or looping_focus.has(id)) and element.has("focus"):
# A FOCUSED button draws its record INSTEAD of its base sprite -- measured,
# the focused sprite covers the base at 100.0 % of base-visible pixels.
if focused_id == id and element.has("focus"):
_draw_focus(element)
continue
# 🔴 A LOOPING record draws IN ADDITION to the base, not instead of it.
#
# This used to take the same branch as a focused button, and that is why
# the authored entry for the `PRESS (A)` plate had to be deleted: it
# substituted a dim glow for the plate's own bright sprite and the plate
# became invisible at every instant (max 0 against max 252.5).
#
# The Decoder has since MEASURED the real behaviour -- held at the title
# with no input, the plate oscillates continuously for ~23 cycles with no
# decay and NEVER GOES OFF, bottoming at 714 thresholded green pixels
# against a plate-absent floor of 159. A glow alone cannot do that: its
# record ramps 0 -> 80 -> 0. A steady base plus a pulsing glow can, and
# the two numbers line up with base-only and base-plus-glow.
#
# So the base is drawn first and the record over it. `_draw_focus` runs
# after, with no `continue`.
var loops_focus := looping_focus.has(id) and element.has("focus")
var rel: String = element.get("sprite", "")
if focused_id == id and element.get("focus_sprite", "") != "":
rel = element["focus_sprite"]
@@ -656,6 +671,8 @@ func _draw() -> void:
continue
_draw_quad(tex, placement(pose, pivot, tex.get_size()), colour, pivot, pos, rot)
drawn.append(id)
if loops_focus:
_draw_focus(element)
elif element.get("role", "") == "primitive" and element.has("size"):
# A primitive has no texture; the quad is its declared size and its
# colour is the pose's own modulate.