port: make ScreenView say what it could not draw; refute 'first-declared paints first'
skipped[] has been tracked and read by nobody since P1, under a comment saying a silently missing element looks like art. _note_structural prints from inside ScreenView rather than returning a value for a caller -- routing it through a caller is exactly what did not happen. Structural skips only; transparent-at- rest is ordinary animation. Zero found today: a guard, not a fix. The first version of that scan was a FALSE PASS: screen_view.gd did not parse (a line inserted at three tabs inside a four-tab block -- the substring assert matched a shallower indent), so grep counted zero from a dead script. The scan now counts the summary line as a positive control. Refutes 'the first-declared element paints first', which would have made the forced-backdrop rule redundant since all six forced elements are index 0. False on 8 of 16 screens -- decisively on main_menu, where index 0 is pteff00, painted LAST, and pteff00 is a measured control. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N7FiFFFwbvG2uxdcEh8HyF
This commit is contained in:
@@ -233,6 +233,7 @@ func _ready() -> void:
|
||||
if _menu != null and _sequence.is_empty():
|
||||
_menu_enter(name, true)
|
||||
|
||||
view.structural_skips.clear()
|
||||
var settle := view.settle_time()
|
||||
print("screen %s: %d elements, %d in paint order, design %dx%d, settles at t=%d (%.3f s)" % [
|
||||
name, view.screen["elements"].size(), view.screen["paint_order"].size(),
|
||||
|
||||
@@ -101,6 +101,19 @@ var tree: ExportTree = null
|
||||
var screen: Dictionary = {}
|
||||
var textures: Dictionary = {}
|
||||
var skipped: Array[String] = []
|
||||
|
||||
## Structural skips accumulated over the life of the CURRENT screen, deduplicated.
|
||||
##
|
||||
## 🔴 `skipped` itself is per-frame and was read by NOBODY. Its own comment says
|
||||
## "a silently missing element looks like art" -- and for eight milestones
|
||||
## nothing printed it, so the port could drop an element every frame and say so
|
||||
## to no one. That is the same shape as the black hold, which was implemented,
|
||||
## called, and emitted nothing until somebody filmed it.
|
||||
##
|
||||
## Only STRUCTURAL skips accumulate here. "(transparent at rest)" is ordinary
|
||||
## animation -- every element is transparent at some instant -- and reporting it
|
||||
## would bury the three that mean something under the one that never does.
|
||||
var structural_skips: Array[String] = []
|
||||
var drawn: Array[String] = []
|
||||
|
||||
## Which button is highlighted, by element id. P1 leaves it empty: initial focus
|
||||
@@ -604,6 +617,7 @@ func _draw() -> void:
|
||||
var tex: Texture2D = textures.get(rel)
|
||||
if tex == null:
|
||||
skipped.append("%s (sprite failed to load)" % id)
|
||||
_note_structural("%s (sprite failed to load)" % id)
|
||||
continue
|
||||
_draw_quad(tex, placement(pose, pivot, tex.get_size()), colour, pivot, pos, rot)
|
||||
drawn.append(id)
|
||||
@@ -616,3 +630,17 @@ func _draw() -> void:
|
||||
# A .t32 element whose sprite the exporter could not produce. Saying
|
||||
# so is the point -- a silently missing element looks like art.
|
||||
skipped.append("%s (no sprite in the export)" % id)
|
||||
_note_structural("%s (no sprite in the export)" % id)
|
||||
|
||||
|
||||
## Record a skip that is NOT ordinary animation, and SAY SO, once per screen.
|
||||
##
|
||||
## It prints from here rather than returning a value for a caller to report,
|
||||
## because "the caller will report it" is precisely what did not happen: the
|
||||
## per-frame `skipped` list has been correct and unread since P1. A fact that
|
||||
## needs somebody else to remember to look at it is a fact that goes unnoticed.
|
||||
func _note_structural(what: String) -> void:
|
||||
if not structural_skips.has(what):
|
||||
structural_skips.append(what)
|
||||
push_warning("element not drawn: %s" % what)
|
||||
print(" 🔴 element NOT DRAWN: %s" % what)
|
||||
|
||||
Reference in New Issue
Block a user