match(address): reconstruct nullable drag text measurement #1013

Merged
coah80 merged 1 commits from agent/bittle/address-drag-width into main 2026-10-03 01:31:57 +00:00
coah80 commented 2026-10-03 01:29:53 +00:00 (Migrated from github.com)

Exact source reconstruction

Recover nullable drag text measurement in a small inline helper, including target record-address evaluation before the text-box guard, root-pane lookup, and the explicit projected right-edge accumulator. The old reconstruction added the 0.01f margin even with no text box; the target skips it on that path.

NWC24FriendInfo::attr.name is an inline u16[12], not a nullable pointer for a valid record. The pre-existing target-emitted name check is retained, but tests do not manufacture invalid/null-name records.

Independent verification

  • movePane_onDrag: 92.451614% → 100%; source 153 → 155 instructions, target 155; relocation-aware ctxdiff zero
  • Address unit: 99.69818% → 99.89328%; exact functions 97 → 98/101; exact code 21236 → 21856/23988
  • All 97 previously exact symbol streams are unchanged; data remains 1964/1964, with all allocated non-text bytes and normalized relocations unchanged
  • Only Address .text changes among 1027 source objects; no report regression
  • Parent reran 200,000 extracted-production geometry cases, including 66,667 null text boxes: target-ordered float bits and font-call counts agree under UBSan/bounds checks
  • Tests use deterministic font/UI/controller stubs, valid empty/nonempty inline names and bounded geometry; no Wii runtime claim
  • Pool 81/81, literal audit 86 arguments and full 43U all_source/report/progress/DOL pass; worktree/diff checks pass

No header, metadata, artificial storage, assembly or linking change.

Parent baseline: 674722c158
Tested tree: ffa64c93ee
DOL SHA1: 26116613f624061ba99c8d1a299aaa6efa85670d

No merge performed or requested by this author.

Note

Reconstruct nullable drag-name width measurement in Address::movePane_onDrag

  • Adds an inline ipl.scene.GetDragNameWidth helper in iplAddress.cpp. It returns zero when the text box or name pointer is null, and sums per-character font widths plus a 0.01f margin otherwise.
  • Address::movePane_onDrag now finds the moving-name text box via the root pane's recursive FindPaneByName and measures the friend name through the new helper.
  • A rightEdge local keeps the existing add, projection-ratio multiply, and negation sequence for the right-edge clamp.
  • Behavioral Change: the 0.01f margin is skipped when the text box or friend name is unavailable; an empty but valid name still gets it.

Macroscope summarized 918d19b.

## Exact source reconstruction Recover nullable drag text measurement in a small inline helper, including target record-address evaluation before the text-box guard, root-pane lookup, and the explicit projected right-edge accumulator. The old reconstruction added the 0.01f margin even with no text box; the target skips it on that path. NWC24FriendInfo::attr.name is an inline u16[12], not a nullable pointer for a valid record. The pre-existing target-emitted name check is retained, but tests do not manufacture invalid/null-name records. ## Independent verification - movePane_onDrag: 92.451614% → 100%; source 153 → 155 instructions, target 155; relocation-aware ctxdiff zero - Address unit: 99.69818% → 99.89328%; exact functions 97 → 98/101; exact code 21236 → 21856/23988 - All 97 previously exact symbol streams are unchanged; data remains 1964/1964, with all allocated non-text bytes and normalized relocations unchanged - Only Address .text changes among 1027 source objects; no report regression - Parent reran 200,000 extracted-production geometry cases, including 66,667 null text boxes: target-ordered float bits and font-call counts agree under UBSan/bounds checks - Tests use deterministic font/UI/controller stubs, valid empty/nonempty inline names and bounded geometry; no Wii runtime claim - Pool 81/81, literal audit 86 arguments and full 43U all_source/report/progress/DOL pass; worktree/diff checks pass No header, metadata, artificial storage, assembly or linking change. Parent baseline: 674722c158ff057be7a5110841cf18b50d1cb631 Tested tree: ffa64c93ee69f7b9e59ea704b7191c019abfdd6e DOL SHA1: 26116613f624061ba99c8d1a299aaa6efa85670d No merge performed or requested by this author. <!-- Macroscope's pull request summary starts here --> <!-- Macroscope will only edit the content between these invisible markers, and the markers themselves will not be visible in the GitHub rendered markdown. --> <!-- If you delete either of the start / end markers from your PR's description, Macroscope will append its summary at the bottom of the description. --> > [!NOTE] > ### Reconstruct nullable drag-name width measurement in `Address::movePane_onDrag` > - Adds an inline `ipl.scene.GetDragNameWidth` helper in [iplAddress.cpp](https://github.com/coah80/wii-ipl/pull/1013/files#diff-b3414531de53b522b97ea93a663b4425148ead606a4c0ad87ef48ba0b28864c9). It returns zero when the text box or name pointer is null, and sums per-character font widths plus a 0.01f margin otherwise. > - `Address::movePane_onDrag` now finds the moving-name text box via the root pane's recursive `FindPaneByName` and measures the friend name through the new helper. > - A `rightEdge` local keeps the existing add, projection-ratio multiply, and negation sequence for the right-edge clamp. > - Behavioral Change: the 0.01f margin is skipped when the text box or friend name is unavailable; an empty but valid name still gets it. > > <!-- Macroscope's review summary starts here --> > > <sup><a href="https://app.macroscope.com">Macroscope</a> summarized 918d19b.</sup> > <!-- Macroscope's review summary ends here --> > <!-- Macroscope's pull request summary ends here -->
coah80 commented 2026-10-03 01:31:55 +00:00 (Migrated from github.com)

Reviewed and merged: rebased on main, full build ok, DOL sha1 26116613f624061ba99c8d1a299aaa6efa85670d, 0 regressions, 0 forbidden patterns.

Reviewed and merged: rebased on main, full build ok, DOL sha1 26116613f624061ba99c8d1a299aaa6efa85670d, 0 regressions, 0 forbidden patterns.
Sign in to join this conversation.