port: delete the authored blend map for the decoded field, and find a counter-example doing it
PORT-MISSION §3: "When the RE agent later decodes something you had authored, delete the authored entry and let the exporter emit it. That deletion is the measure of progress." This is that deletion. authored/rendering.json's `additive_elements` -- a per-screen list transcribed from the Decoder's per-draw RB_BLENDCONTROL0 log -- is gone. The exporter emits `blend_additive` per element and per nested focus/leaf element from `T8aD +0x04` bit 0x02, and ScreenView reads it there. Both accessor spellings are needed: `ptbtn00f.t32` is in build.sprites while no element carries it as `sprite`, and it is the sharp case -- the plate alpha-over, its own glow additive, adjacent draws on one screen. CHECKED BEFORE THE SWAP, and the map turned out to be a SUBSET, not the answer: 15 elements it called additive the disc agrees with, ZERO contradictions, and 17 MORE the disc marks that it did not. Those include the sweep LEAVES (draw_leaf_for means pteff03/pteff03a are what reach the screen while the map listed their parents) and TWELVE on `title`, where the map was deliberately empty -- so the port has been drawing every title effect with the wrong blend. H6 closes with no capture at all: the JP asymmetry was an artefact of a NAME-KEYED map, and the bit is on the disc for every screen at once. 🔴 AND IT INTRODUCED A REGRESSION, WHICH IS REPORTED, NOT HIDDEN. Against the oracle captures on the GPU: main_menu 10.88 -> 13.02, main_menu_options 11.56 -> 13.57. Deterministic to the digit over three runs, so not sampling noise. Isolated to ONE element, with a control: - main_menu's only newly-additive top-level element is pteff10; - extras gained none and did not move -- the same change on a screen with nothing new moves nothing; - the leaf rule was disabled separately and main_menu stayed at 13.02, so pteff03/pteff03a are NOT the cause. That prediction of mine failed; the rule is restored, being provably neutral here; - title did not move despite twelve newly-additive elements, consistent with verify-capture posing at settle t=198 where those quads are transparent. That is a potential COUNTER-EXAMPLE to a ✅ DECODED claim, and it is a sharp question rather than a guess: their own map lists pteff10 additive on `extras` and not on `main_menu`, and they logged BOTH screens. Asked in BLOCKED.md H6. Shipped anyway, for reasons stated rather than assumed: +2.14 is inside the harness's own ±3.78 capture-phase term for that screen and cannot adjudicate a disc fact; the decoded source is far better evidenced (35 elements, zero errors, out-of-sample prediction 3 of 16); and fitting an exception for one element would put an authored entry back to make one number smaller, which is the move this project keeps having to undo. It is a KNOWN regression, not an unnoticed one. Also settled this iteration, for the Decoder's open question: the port FADES the plate, it does not pop it. Frozen sweep of the plate region -- 210u 0.1457, 216u 0.1573, 222u 0.1727, 228u 0.1900, 236u 0.2142 -- a clean monotone ramp across the declared 214->236. So t=236 is the port's COMPLETION, not its onset, and the 0.367 s "late plus a pop" reading does not apply. Not settled: whether pteff10 has a counter-example; H1's repeat half; the four red verify-screen rows; and finding 3, which still has no cause now that units/s is settled at 60. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018AHUQvXGyNcKonSEWsgWcX
This commit is contained in:
@@ -305,7 +305,10 @@ func _ready() -> void:
|
||||
var rendering: Variant = export_tree.authored("rendering.json")
|
||||
_draw_leaf_for = [] if rendering == null else rendering.get("draw_leaf_for", [])
|
||||
_loop_leaf_screens = [] if rendering == null else rendering.get("loop_leaf_on_screens", [])
|
||||
_additive_elements = {} if rendering == null else rendering.get("additive_elements", {})
|
||||
# `additive_elements` is DELETED from authored/rendering.json -- the blend is
|
||||
# decoded now (`T8aD +0x04` bit 0x02) and the exporter emits `blend_additive`
|
||||
# per element, which `ScreenView._draw` reads directly. Nothing to assign,
|
||||
# and the four assignments that used to carry it are gone with it.
|
||||
# `--no-hold` plays a screen's groups PAST their rest instead of clamping each
|
||||
# element at its own `rest.t`. A diagnostic, not a mode: `rest.t` is the last
|
||||
# HOLD keyframe before the exit, not the settled state, and the only way to
|
||||
@@ -333,7 +336,6 @@ func _ready() -> void:
|
||||
view.looping_focus = _looping_for(name)
|
||||
view.loop_phase_units = _loop_phase
|
||||
view.draw_leaf_for = _draw_leaf_for
|
||||
view.additive_elements = _additive_elements
|
||||
view.loop_leaf = _loop_leaf_screens.has(name)
|
||||
view.focused_id = _force_focus
|
||||
if not view.load_screen(export_tree, name):
|
||||
@@ -431,7 +433,6 @@ var _looping: Dictionary = {}
|
||||
## `authored/rendering.json` `draw_leaf_for`.
|
||||
var _draw_leaf_for: Array = []
|
||||
## `authored/rendering.json` `additive_elements` -- measured off the running game.
|
||||
var _additive_elements: Dictionary = {}
|
||||
## `authored/rendering.json` `loop_leaf_on_screens`.
|
||||
var _loop_leaf_screens: Array = []
|
||||
var _script: PackedStringArray = PackedStringArray()
|
||||
@@ -668,7 +669,6 @@ func _advance() -> void:
|
||||
view.looping_focus = _looping_for(name)
|
||||
view.loop_phase_units = _loop_phase
|
||||
view.draw_leaf_for = _draw_leaf_for
|
||||
view.additive_elements = _additive_elements
|
||||
view.loop_leaf = _loop_leaf_screens.has(name)
|
||||
if not view.load_screen(view.tree, name):
|
||||
push_error(view.tree.error)
|
||||
@@ -1046,7 +1046,6 @@ func _menu_arrive() -> void:
|
||||
view.looping_focus = _looping_for(name)
|
||||
view.loop_phase_units = _loop_phase
|
||||
view.draw_leaf_for = _draw_leaf_for
|
||||
view.additive_elements = _additive_elements
|
||||
view.loop_leaf = _loop_leaf_screens.has(name)
|
||||
if not view.load_screen(view.tree, name):
|
||||
push_error(view.tree.error)
|
||||
@@ -1572,7 +1571,6 @@ func _raise_overlay(name: String) -> void:
|
||||
# focus record alpha-over after the blend was wired in. The change reported
|
||||
# EXACTLY ZERO against the capture, which is what a change that never reached
|
||||
# the renderer looks like.
|
||||
overlay.additive_elements = _additive_elements
|
||||
overlay.loop_leaf = _loop_leaf_screens.has(name)
|
||||
overlay.holding = true
|
||||
overlay.time_units = 0.0
|
||||
|
||||
@@ -146,9 +146,6 @@ var loop_phase_units: float = -1.0
|
||||
var draw_leaf_for: Array = []
|
||||
|
||||
## Elements the game draws ADDITIVELY, by screen -- `authored/rendering.json`
|
||||
## `additive_elements`. Measured off the running game per draw; see that file for
|
||||
## what is in the list and, more importantly, what is not.
|
||||
var additive_elements: Dictionary = {}
|
||||
## The canvas items backing the paint-order runs. See `_band`.
|
||||
var _bands: Array[RID] = []
|
||||
## The canvas item the next `_draw_quad` paints into. It is a member rather than
|
||||
@@ -779,8 +776,17 @@ func _draw() -> void:
|
||||
# have a measurement and that is an accident of those two screens. A cache
|
||||
# keyed on "the additive block" would be correct today and silently wrong on
|
||||
# the first screen that interleaves.
|
||||
var additive_here: Array = additive_elements.get(
|
||||
String(screen.get("name", "")), [])
|
||||
# 🔴 THE AUTHORED MAP IS GONE. `blend_additive` is now emitted per element by
|
||||
# the exporter, decoded from `T8aD +0x04` bit 0x02 -- so this asks the ELEMENT
|
||||
# rather than a table keyed by screen name.
|
||||
#
|
||||
# The map was a transcription of the Decoder's per-draw RB_BLENDCONTROL0 log,
|
||||
# and a name-keyed table can only answer for screens somebody drove the game
|
||||
# to. Checked before the swap, over four screens: of 15 elements the map
|
||||
# called additive the disc agrees with **all 15 and contradicts none** -- but
|
||||
# the disc marks **17 more**, including twelve on `title`, where the map was
|
||||
# deliberately empty. The map was not wrong; it was a subset of what was
|
||||
# observed, and was being read as the whole answer.
|
||||
var order: Array = screen.get("paint_order", [])
|
||||
# 🔴 BANDS ARE PER DRAW OP, NOT PER ELEMENT, and the plate is why. `ptbtn00` is
|
||||
# drawn alpha-over and its own focus record `ptbtn00f` ADDITIVE -- same screen,
|
||||
@@ -796,11 +802,31 @@ func _draw() -> void:
|
||||
var parts: Array = [[index, "base"], [index, "focus"]] if el.has("focus") \
|
||||
else [[index, "base"]]
|
||||
for part: Array in parts:
|
||||
var pid := eid
|
||||
# Which DECLARATION the blend bit comes from depends on what this
|
||||
# band actually draws:
|
||||
# focus -> the focus record's own sprite (ptbtn00f, additive,
|
||||
# while its base ptbtn00 is not -- the case that forced
|
||||
# bands to be per draw op rather than per element);
|
||||
# base -> the LEAF's sprite when this element draws its leaf,
|
||||
# otherwise the element's own.
|
||||
# That last line is not a detail: `ptloop01`/`ptloop02` are in
|
||||
# `draw_leaf_for`, so what reaches the screen is `pteff03`/`pteff03a`,
|
||||
# and those carry the bit while the parents the old map listed are not
|
||||
# what was drawn.
|
||||
var src: Dictionary = el
|
||||
if part[1] == "focus":
|
||||
var fes: Array = el.get("focus", {}).get("elements", [])
|
||||
pid = String(fes[0].get("id", eid)) if not fes.is_empty() else eid
|
||||
var add_it: bool = additive_here.has(pid)
|
||||
if not fes.is_empty():
|
||||
src = fes[0]
|
||||
elif draw_leaf_for.has(eid):
|
||||
var les: Array = el.get("leaf", {}).get("elements", [])
|
||||
if not les.is_empty():
|
||||
src = les[0]
|
||||
# Absent means the sprite resolves to no T8aD header -- a `.prm`
|
||||
# primitive has no header and so no blend bit. Alpha-over is the
|
||||
# documented meaning of a clear bit, and a missing header is not a
|
||||
# set one.
|
||||
var add_it: bool = bool(src.get("blend_additive", false))
|
||||
if prev == -1 or add_it != band_additive[prev]:
|
||||
band_additive.append(add_it)
|
||||
prev += 1
|
||||
|
||||
Reference in New Issue
Block a user