formats: a scale-0 leaf must not claim the draw and blank its parent
Found by inspection while the disc tests ran. The leaf branch set its something-was-drawn flag unconditionally after calling blit, but blit returns early on a zero scale -- collapsed to nothing, not unset. So a scale-0 leaf would have been counted as drawn, its parent skipped, and the element blanked outright. pgloading_loop5 s leaf is scale (0,0), so this was live on all four loading screens, and scale-0 is one of the failures this corpus is already named for. Fixed by skipping a zero-scale leaf pose before it can claim the draw; the loading builds render afterwards at 4.0 percent non-black. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsEPXWVaEpyfudtR6re1Pd
This commit is contained in:
@@ -1158,6 +1158,15 @@ pub fn compose_with_order(
|
||||
let lsp = le.sprite.clone().unwrap_or_else(|| le.name.clone());
|
||||
let Some(&(so, ss)) = build.sprites.get(&lsp) else { continue };
|
||||
let Some(limg) = t8ad::parse(&bundle[so..so + ss]) else { continue };
|
||||
// 🔴 Only count it as drawn if it CAN draw. `blit` returns early
|
||||
// on a zero scale — "collapsed to nothing", not "unset" — so
|
||||
// setting the flag unconditionally would let a scale-0 leaf
|
||||
// suppress its parent and blank the element outright.
|
||||
// `pgloading_loop5`'s leaf is scale (0,0), and scale-0 is one of
|
||||
// the failures this corpus is already named for.
|
||||
if lk.scale_x == 0 || lk.scale_y == 0 {
|
||||
continue;
|
||||
}
|
||||
blit(&mut canvas, w, h, &limg, &lk, le.pivot_x, le.pivot_y);
|
||||
any = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user