re(ui): scale 0 means collapsed, not "unset" -- stop drawing it full size
blit() and fill_quad() both opened with
let sx_pct = if kf.scale_x == 0 { 100 } else { kf.scale_x };
so an element whose pose is collapsed to nothing rendered at FULL SIZE.
I first described this as "a 1-pixel sliver", reading the .max(1) in the
size arithmetic two lines below -- the guard above it meant .max(1) never
saw a zero. Read the whole function, not the lines you went looking for.
Control run before the change: if 0 meant "unset", something on the disc
would use it throughout. Nothing does.
elements with a keyframe group 15 493
at least one keyframe at scale 0 2 166
EVERY keyframe at scale 0 0
zero is a transient the element grows out of 1 762
ptlogo_eff3.t32 runs 0% -> 200%. An "unset" marker no element ever uses
throughout is not a marker.
Both functions now return without drawing when either scale is 0.
Reach: 24 of 24 renders byte-identical across GP_TITLE (all 16 builds),
GP_PAUSE_MENU and GP_OPTIONS -- additive on every screen the port needs.
195 elements have a guessed rest pose at scale 0 and 126 of those have a
non-zero alpha, so the old code painted them; all 126 are in
GP_READY_ROOM.pak, which S1 already declared a no-go. They are
tactical-map sprites at sx=0/sy=100, mid-horizontal-wipe, that the
coercion drew full-width.
So: a real correctness fix with no visible effect on the menu port.
Suite green, 122 passed / 0 failed across 3 suites at commit time.
This commit is contained in:
@@ -408,3 +408,14 @@ agent's loop prompt, i.e. nowhere durable. See [`README.md`](README.md) for the
|
||||
a heredoc two lines later wrote nowhere — while the `echo` after it still
|
||||
printed "written". A success message after a failed redirect is not a success.
|
||||
Use `(setsid nohup … &)` and keep the file-writing in its own call.
|
||||
* **Read the whole function before describing what it does.** I wrote "a
|
||||
zero-scale pose paints a 1-pixel sliver" into a tool's docstring, from the
|
||||
`.max(1)` in the size arithmetic. Two lines above it, a guard coerced
|
||||
`scale == 0` to **100 %**, so the `.max(1)` never saw a zero and the element
|
||||
rendered at *full size* — a much larger bug than the one I described. I had
|
||||
read the lines I went looking for and stopped.
|
||||
* **Never diff a file a background job might still be writing.** A comparison
|
||||
loop over an output directory reported `GP_TITLE` build 6 as changed; the pixel
|
||||
diff was then all zeros, because `cmp` had read a half-written PNG. Compare
|
||||
only after the job signals done, or skip the newest file. A "difference" that
|
||||
vanishes on re-examination is usually a race, not a flake.
|
||||
|
||||
Reference in New Issue
Block a user