@@ -6,7 +6,7 @@ This branch is an analysis-only bootstrap for a Mainline-first modernization of
The preserved 8,401-line Mainline source must be analyzed sequentially, in evidence-backed batches, before runtime work begins. All behavior-critical shortened symbols must be resolved and all batches must be complete before any public Lua API, runtime module, modern TOC, packaging, or release work is added.
Batches 01–16 (lines 1–8,000) are documented. The final batch remains scheduled but not analyzed.
All 17 batches (lines 1–8,401) are documented. Runtime work remains gated on a cross-batch audit that resolves or classifies the remaining behavior-critical `working`/`unresolved` ledger entries and verifies every retained Retail API contract.
## Goal
@@ -26,6 +26,6 @@ The eventual addon will target current Retail/Mainline World of Warcraft while p
Analysis contributions must proceed in schedule order and cite exact legacy line numbers. Record every shortened identifier by declaration and lexical scope, distinguish evidence from inference, retain unresolved names when proof is incomplete, and update the shared ledger with each batch. Do not edit preserved legacy code or assets.
Runtime contributions are premature until all 8,401 lines have been covered exactly once and behavior-critical symbols are resolved. Future Lua must remain Lua 5.1 compatible and must use current, verified Mainline APIs.
Runtime contributions remain premature until the completed coverage is converted into a closed behavior-critical symbol audit and implementation-ready API contract set. Future Lua must remain Lua 5.1 compatible and must use current, verified Mainline APIs.
See `ACKNOWLEDGEMENT.md` for attribution and the boundary between preserved legacy material and newly authored MIT-licensed work.
| `t` / chunk (first binding) | 4 | String initializer only before shadow at 186. | `addonRootPath` | dead | High: path literal at 4; no read before 186. | 01–01 | Core/Constants | Was elimination intentional? |
| `l` / chunk | 5 | Image/font root used for bundled fonts and attempted legal-popup background path (5, 618, 633, 1664). | `imageRootPath` | resolved | High: literal and direct asset-path consumers. | 01–04 | Core/Constants | Other consumers remain to inventory. |
| `l` / chunk | 5 | Image/font root used for bundled fonts, UI art, board/status/HUD textures, and the attempted legal-popup background path through final bootstrap (5, 618, 633, 1664, 8072–8321). | `imageRootPath` | resolved | High: literal and direct asset-path consumers. | 01–17 | Core/Constants | None. |
| `K` / chunk | 227 | Starts at zero; accumulates every value in `BejeweledData.played`during achievement setup (1397–1399). | `totalGamesAcrossCharacters` | resolved | High: direct account-data sum. | 01–03 | Core/SavedVariables | Not reset before summing; assess repeat calls. |
| `K` / chunk | 227 | Starts at zero, accumulates every `BejeweledData.played`value, and gates a splash-hide achievement above 1,000 games (1397–1399, 8323–8325). | `totalGamesAcrossCharacters` | resolved | High: direct account-data sum and threshold consumer. | 01–17 | Core/SavedVariables, UI/HUD | Accumulator is not reset before repeat initialization. |
| `Ae` / chunk | 305 | Receives `math.floor`, copied to `d` (314), nilled (331). | temporary `math.floor` alias | dead | High. | 01–01 | Core | None after `d` capture. |
| `Ie` / chunk | 302 | Supplies `string.byte` to `j`, is nilled, then receives game-surface frame level`+4`at 8371 without an in-file read. | temporary byte alias / unused frame tier | resolved | High: both temporal roles and dead final value are explicit. | 01–17 | Core, UI/GemPool | None. |
| `Be` / chunk | 303 | Supplies `string.char` to `P`, is nilled, then receives game-surface frame level`+2`and positions every final gem frame at that tier (313, 329, 8369, 8381). | `gemFrameLevel` after temporary char alias | resolved | High: final assignment and 64 direct consumers. | 01–17 | Core, UI/GemPool | Split temporal roles in rewrite. |
| `Ge` / chunk | 304 | Supplies `string.sub` to `G`, is nilled, then receives game-surface frame level`+5`at 8372 without an in-file read. | temporary substring alias / unused frame tier | resolved | High: both temporal roles and dead final value are explicit. | 01–17 | Core, UI/GemPool | None. |
| `Ae` / chunk | 305 | Supplies `math.floor` to `d`, is nilled, then receives game-surface frame level `+6` at 8373 without an in-file read. | temporary floor alias / unused frame tier | resolved | High: both temporal roles and dead final value are explicit. | 01–17 | Core, UI/GemPool | None. |
| `t` / chunk (line 306) | 306 | Receives `tostring`, copied to `Y` (317), nilled (332). | temporary `tostring` alias | dead | High. | 01–01 | Core | None after `Y` capture. |
| `m` / chunk | 307 | Copies `math.random`; drives gem velocities/spawn gaps, special placement/shards, and skill-gain probability through line 6667, then is shadowed by About factory at 7413. Earlier closures retain it. | `random` | resolved | High. | 01–15 | Engine/Grid, UI/Animator, Engine/Skills | None. |
| `ae` / chunk | 310 | Constant `2`; keys `Ce`; pause handling shows/hides `pausedText`and final New Game routing opens the timed menu for this mode (1299–1304, 8243–8244). | `GAME_MODE_TIMED` | resolved | High: paired PPS, pause UI, and final routing evidence. | 01–17 | Core/Constants | None. |
| `k` / chunk | 311 | Game-mode constant `3`; controls flight-learning timer/pause/animator/start/end behavior through line 7917, then is shadowed by compatibility function at 7995. Earlier closures retain it. | `GAME_MODE_FLIGHT_LEARNING` | resolved | High. | 01–16 | Core/Constants, UI/Flight | Preserve numeric mode value. |
| `T` / chunk (score-table binding) | 312 | Nine-number array indexed by `n.combo`, capped at final entry (977–980); shadowed at 1266, while earlier `M` retains it lexically. | `comboBaseScores` | resolved | High: direct scoring use and capture. | 01–03 | Engine/Scoring | Confirm whether combo resets per move/cascade. |
| `Ce` / chunk | 312 | Mode-keyed values scale non-classic bar maximum and final match points (626, 1007). | `modeScoreMultiplier` | resolved | High: two direct arithmetic consumers. | 01–03 | Core/Constants | Same factor serves range and score scaling. |
@@ -118,19 +118,19 @@ Each row identifies one declaration, not merely one spelling. `chunk` means the
| `R` / chunk | 320 | Copies `type`; rejects non-string scores and identifies numeric gem fields during reset (742, 1955). | `valueType` | resolved | High: direct alias and calls. | 01–04 | Core/SavedVariables, UI/GemPool | None. |
| `ge` / chunk | 327 | Populated by `ze` with faction-selected four-region coordinate adjacency graphs (1040–1249); disabled taxi estimator compares its candidate timing table with this graph (6213). | `flightGraph` | resolved | High. | 01–13 | Core/SavedVariables, UI/Flight | Disabled estimator conflates graph/timing-table shapes. |
| `we` / chunk | 327 | Set when max-score level-up begins (529); during level spawning it counts/removes carried hyper and big-star state for later restoration (3890–3906). | `levelSpawnSpecialRecovery` | working | Medium-high. | 01–08 | Engine/Scoring, Engine/BoardSpawn | Find reset and full restoration completion. |
| `r` / chunk | 333 | Six-entry array of four-number direction/offset tuples. | neighbor/offset patterns | working | Medium: signed coordinate-like tuples. | 01–01 | Engine/Matches | Establish tuple field semantics. |
| `C` / chunk function | 444 | Returns a fresh backdrop descriptor; consumers mutate/apply it to legal and score-migration popups (445–452, 1663–1668, 3501–3508). | `createBackdropInfo` | resolved | High. | 01–08 | UI/Backdrops | None. |
| `n` / chunk | 334 | Exported current-game state drives scoring, pause, events, save metadata, New Game routing, and splash resume logic; it also receives the erroneous `bgFile` write (443, 464–529, 874–1008, 1274–1407, 1664, 1924–1933, 8242–8250, 8346–8357). | `currentGame` | resolved | High: complete-file state transitions and final consumers. | 01–17 | Engine/Grid, Engine/Scoring, UI/HUD | Dynamic shape is documented across batch reports. |
| `C` / chunk function | 444 | Returns a fresh backdrop descriptor; consumers mutate/apply it from popups through final board/HUD construction (445–452, 1663–1668, 3501–3508, 8043–8301). | `createBackdropInfo` | resolved | High. | 01–17 | UI/Backdrops | None. |
| `st` / chunk function | 455 | Reads `e.animated`; appends `e` to `t.animationStack`; writes flag true (456–459). | `queueAnimationOnce` | working | High: full function body. | 01–01 | UI/Animations | Identify owner and element types at call sites. |
| `Bt` / chunk function | 597 | Assigns score range fields and is attached as `levelBar.SetMinMaxScore` at 8199. | `setMinMaxScore` | resolved | High: complete body and final attachment. | 02–17 | UI/HUD | None. |
| `e`,`n`,`t` / `Bt` parameters | 597 | Receiver plus values written to `minScore` and `maxScore`. | `levelBar`, `minScore`, `maxScore` | resolved | High: direct assignments. | 02–02 | UI/HUD | None. |
| `xt` / chunk function | 602 | Adds delta to receiver score and delegates to `SetScore` (603). | `addScore` | resolved | High: complete body. | 02–02 | Engine/Scoring, UI/HUD | Method attachment pending. |
| `xt` / chunk function | 602 | Adds delta to receiver score, delegates to `SetScore`, and is attached as `levelBar.AddScore` at 8200. | `addScore` | resolved | High: complete body and final attachment. | 02–17 | Engine/Scoring, UI/HUD | None. |
| `n` / `xt` parameter | 602 | Never read in the complete body. | — | dead | High. | 02–02 | Unassigned | Why third argument existed. |
| `rt` / chunk function | 606 | Initializes mode-specific level/timer bar and related HUD layout (607–644). | `initializeModeBar` | resolved | High: complete body. | 02–02 | UI/HUD | Method attachment pending. |
| `rt` / chunk function | 606 | Initializes mode-specific level/timer bar/HUD layout and is attached as `levelBar.SetMode` at 8201. | `initializeModeBar` | resolved | High: complete body and final attachment. | 02–17 | UI/HUD | None. |
| `t`,`o`,`i` / `rt` parameters | 606 | Receiver, mode value, and timer/duration seed drive all branches (608–642). | `levelBar`, `gameMode`, `timerValue` | resolved | High: direct branch and call flow. | 02–02 | UI/HUD | Exact units of `i` by caller. |
| `n` / `rt` local | 607 | Self-initializer captures outer current-game `n`, but the new alias is never read. | — | dead | High: no read in complete body. | 02–02 | Unassigned | Minifier artifact. |
| `kt` / chunk function | 646 | Sets timer start/remaining/elapsed, starts it, and is attached as `levelBar.SetTimer` at 8203. | `setTimer` | resolved | High: complete body and final attachment. | 02–17 | UI/HUD | None. |
| `Ft` / chunk function | 653 | Resets update accumulator, shows timer, and is attached as `levelBar.StartTimer` at 8204. | `startTimer` | resolved | High: final method and update-frame wiring are visible. | 02–17 | UI/HUD | None. |
| `Pt` / chunk function | 658 | Hides timer and is attached as `levelBar.StopTimer` at 8205; hiding the update frame pauses its updates. | `stopTimer` | resolved | High: complete body and final attachment. | 02–17 | UI/HUD | None. |
| `X` / chunk function | 662 | Converts legacy base-70 text to number with optional centered signed offset; migration consumes it through 3610 before gravity function shadows it at 4041. | `decodeBase70` | resolved | High. | 02–09 | Core/SavedVariables | Preserve malformed-input behavior. |
| `H` / first chunk function | 713 | Produces five decimal checksum digits from alternating byte sums (714–733); shadowed at 761 but captured by `P`/`fe`. | `checksumDigits` | resolved | High: complete body and consumers. | 02–02 | Core/SavedVariables | None. |
@@ -266,7 +266,7 @@ Complete helper bodies are resolved when their transformation and side effects a
| `i`,`l`,`e`,`o`,`n` / `jt` parameters | 1257 | Trig-table owner, texture, angle index, center X, and center Y (1258–1263). | `trig`, `texture`, `angle`, `centerX`, `centerY` | resolved | High: direct lookup/geometry. | 03–03 | UI/Animations | None. |
| `t` / `jt` local | 1261 | Sine lookup for normalized angle; used in texture corners (1263). | `sin` | resolved | High. | 03–03 | UI/Animations | None. |
| `e` / `jt` local | 1262 | Shadows angle after initializer; cosine lookup used in corners (1263). | `cos` | resolved | High. | 03–03 | UI/Animations | None. |
| `T` / chunk function | 1266 | Shadows combo-score table for later declarations; applies pause/resume UI across grid, animator, and timer (1267–1361). Earlier `M` retains the table binding. | `setPaused` | resolved | High: complete body and lexical capture. | 03–03 | Engine/Grid, UI/Animations, UI/HUD | Method/callback attachment pending. |
| `T` / chunk function | 1266 | Shadows combo-score table for later declarations; applies pause/resume UI across grid, animator, timer, and final splash saved-state restoration (1267–1361, 8349–8351). Earlier `M` retains the table binding. | `setPaused` | resolved | High: complete body and callsites. | 03–17 | Engine/Grid, UI/Animations, UI/HUD | None. |
| `i` / `T` duplicate declarations 1–2 | 1267 | Both nil bindings are shadowed by initialized `i` at 1274 before read. | — | dead | High. | 03–03 | Unassigned | Minifier artifact. |
| `l` / `T` local | 1267 | Dynamic method name `Hide` or `Show`, used on gems/animator (1268–1304). | `visibilityMethod` | resolved | High. | 03–03 | UI/GemPool, UI/Animations | None. |
@@ -418,7 +418,7 @@ Completed event callbacks and helpers are resolved by full local data flow. Lega
| `t` / `de` gem local | 2049 | Shadows column after indexing and receives rendered gem. | `gem` | resolved | High. | 05–05 | UI/GemPool | None. |
| `R` / chunk renderer | 2059 | Shadows type alias; renders normal/hyper/empty gems and is used by restore/spawn/gravity/animator paths through line 4872, then is shadowed by timed-menu factory at 6019. Earlier closures retain it. | `renderGem` | resolved | High. | 05–13 | UI/GemPool, UI/Animator | Earlier reset closure retains old type alias. |
| `j` / chunk game function | 2077 | Shadows leaderboard merger; initializes/restores game (2078–2245). | `startGame` | resolved | High. | 05–05 | Engine/Grid | Attachment pending. |
| `j` / chunk game function | 2077 | Shadows leaderboard merger; initializes/restores games and is the final New Game/splash launch target (2078–2245, 8246, 8344, 8348). | `startGame` | resolved | High: complete body and final call sites. | 05–17 | Engine/Grid, UI/HUD | None. |
| `Se` / chunk function | 2384 | Clears current/next selection and selector UI; gravity transfer uses it at 4070 before animator update shadows it at 4235. | `clearSelection` | resolved | High. | 05–09 | Engine/Grid | None. |
| `t`,`e` / `Se` bindings | 2384–2385 | Next flag and selected gem. | `next`,`gem` | resolved | High. | 05–05 | Engine/Grid | None. |
| `Me` / chunk function | 2403 | Finalizes game and starts board wipe (2404–2456). | `endGame` | resolved | High. | 05–05 | Engine/Scoring | Summary follows later. |
| `Me` / chunk function | 2403 | Finalizes game and starts board wipe; flight completion also calls it before cleanup (2404–2456, 7920). | `endGame` | resolved | High. | 05–16 | Engine/Scoring, UI/Flight | None. |
| `fe` / shadow function; `t`,`o` params | 3829 | Throttled gameplay timer updater for timer frame and elapsed delta; final level-bar timer installs it as `OnUpdate` at 8211 after it shadows the signed-score verifier. | `updateGameTimer`; `timer`,`delta` | resolved | High: body and attachment are complete. | 08–17 | Engine/Timer, UI/HUD | None. |
| `e` / `fe` flight-sync local | 3854 | Flight timer used to reconcile elapsed/remaining values. | `flightTimer` | resolved | High. | 08–08 | Engine/Timer | None. |
| `Le` / shadow function; `i` param | 3874 | Spawns/refills empty cells, rerolls for a legal board, restores special gems, advances levels, and checks achievement; attached as animator `HandleJewelDropping` at 4965. | `handleJewelDropping` | resolved | High. | 08–10 | Engine/BoardSpawn, UI/Animator | None. |
| `s` / first two `Le` declarations | 3878 | First and second duplicate bindings are hidden by later same-statement `s` declarations. | — | shadowed | High. | 08–08 | Engine/BoardSpawn | None. |
@@ -625,10 +625,10 @@ Complete spawn, gravity, countdown, and state-transition bodies support resolved
| `e` / big-star-glow local | 4678 | Gem receiving weighted glow around star parent. | `glowGem` | resolved | High. | 10–10 | UI/Animator | None. |
| `A` / shadow function | 4922 | Constructs/wires invisible animator frame and all effect queues/helpers; final bootstrap stores its return and releases the constructor (8005–8007, 8389) after it shadows the clear-work effect enum. | `createAnimator` | resolved | High. | 10–17 | UI/Animator | None. |
| `V` / shadow function | 4971 | Constructs and installs the network frame, send queue, one-second throttle, and receive dispatcher; closes at 5047 after shadowing idle animator state captured by earlier closures. | `createNetwork` | resolved | High. | 10–11 | Network/Transport | Factory installs globally rather than returning. |
| `V` / shadow function | 4971 | Constructs and installs the network frame, send queue, one-second throttle, and receive dispatcher; invoked by final bootstrap at 8015 after shadowing idle animator state captured by earlier closures. | `createNetwork` | resolved | High. | 10–17 | Network/Transport | Factory installs globally rather than returning. |
| `o` / `V` local | 4974 | Network frame with queue, send method, throttling, receive callback, and final `Bejeweled.network` installation. | `network` | resolved | High. | 10–11 | Network/Transport | None. |
| `t`,`o` / network `OnUpdate` params | 4988 | Network frame and elapsed delta; after a one-second accumulation the callback drains eligible queue entries until 20 sends succeed. | `network`,`delta` | resolved | High. | 10–11 | Network/Transport | Preserve successful-send rather than dequeue throttling. |
@@ -652,14 +652,14 @@ Complete spawn, gravity, countdown, and state-transition bodies support resolved
| `i` / friend pre-loop local | 5029 | Hidden by the numeric-for variable at 5030 without a read. | — | dead | High. | 11–11 | Network/Transport | None. |
| `o` / friend-check local | 5029 | Holds each `C_FriendList.GetFriendInfo` result for exact comparison with sender. | `friendName` | resolved | High. | 11–11 | Network/Transport | Verify modern return contract before runtime. |
| `i` / friend loop | 5030 | Iterates friend indices from 1 through `GetNumFriends()`. | `friendIndex` | resolved | High. | 11–11 | Network/Transport | None. |
| `O` / shadow function | 5049 | Constructs and installs the sound frame, deferred flag player, click limiter, and mouse-away updater; shadows the hyper atlas captured by earlier closures. | `createSoundManager` | resolved | High. | 11–11 | UI/Sound | Factory installs globally rather than returning. |
| `O` / shadow function | 5049 | Constructs and installs the sound frame, deferred flag player, click limiter, and mouse-away updater; invoked by final bootstrap at 8016 after shadowing the hyper atlas captured by earlier closures. | `createSoundManager` | resolved | High. | 11–17 | UI/Sound | Factory installs globally rather than returning. |
| `n` / `O` local | 5050 | Sound frame configured with flags/timers/scripts and installed as `Bejeweled.sound`. | `soundManager` | resolved | High. | 11–11 | UI/Sound | None. |
| `t`,`n`,`o` / sound `Play` params | 5060 | Sound manager, named sound flag, and combo index capped at six. | `soundManager`,`soundName`,`comboIndex` | resolved | High. | 11–11 | UI/Sound | Non-combo callers may omit index. |
| `t`,`n` / sound `OnUpdate` params | 5079 | Sound manager and delta used for hover/click timing and flag playback. | `soundManager`,`delta` | resolved | High. | 11–11 | UI/Sound | Disabled sounds freeze both timers. |
| `e` / sound-root local | 5112 | Starts at `ut`, optionally appends `q_`, and prefixes every bundled sound filename in the pass. | `soundPath` | resolved | High. | 11–11 | UI/Sound | None. |
| `n` / combo pre-loop local | 5173 | Immediately hidden by the numeric-for variable at 5174. | — | dead | High. | 11–11 | UI/Sound | None. |
| `E` / shadow function | 5194 | Constructs and installs minimap icon visuals, toggle/tooltip callbacks, and attached/detached drag persistence; shadows the earlier nil/reset binding. | `createMinimapButton` | resolved | High. | 11–11 | UI/Minimap | Factory installs globally rather than returning. |
| `E` / shadow function | 5194 | Constructs and installs minimap icon visuals, toggle/tooltip callbacks, and attached/detached drag persistence; invoked by final bootstrap at 8018 after shadowing the earlier nil/reset binding. | `createMinimapButton` | resolved | High. | 11–17 | UI/Minimap | Factory installs globally rather than returning. |
| `t` / `E` local | 5195 | Minimap frame configured through all callbacks and installed as `Bejeweled.minimap`. | `minimapButton` | resolved | High. | 11–11 | UI/Minimap | None. |
| `t`,`n` / minimap `OnMouseUp` params | 5226 | Minimap frame and mouse-button name; left release toggles the main window. | `minimapButton`,`mouseButton` | resolved | High. | 11–11 | UI/Minimap | None. |
@@ -672,7 +672,7 @@ Complete spawn, gravity, countdown, and state-transition bodies support resolved
| `a`,`l` / minimap-drag locals | 5268–5269 | Minimap center X/Y derived from its left/bottom and half dimensions. | `minimapCenterX`,`minimapCenterY` | resolved | High. | 11–11 | UI/Minimap | None. |
| `e`,`t` / minimap offset locals | 5270–5271 | UI-scaled cursor offsets from minimap center, then absolute cursor coordinates in the detached branch. | `x`,`y` | resolved | High. | 11–11 | UI/Minimap | Split offset/absolute roles in rewrite. |
| `e` / attached-angle local | 5280 | Shadows X offset inside the attached branch and stores degrees derived by `atan2`. | `angleDegrees` | resolved | High. | 11–11 | UI/Minimap | Preserve argument order/sign convention. |
| `g` / shadow function | 5290 | Constructs and returns the main window, backdrop, drag/show/hide/resize controls, and mouse-over overlay; closes at 5517 after shadowing the hyper-gem enum captured by animator code. | `createMainWindow` | resolved | High. | 11–12 | UI/MainWindow | None. |
| `g` / shadow function | 5290 | Constructs and returns the main window, backdrop, drag/show/hide/resize controls, and mouse-over overlay; final bootstrap stores its return and releases the constructor (8006–8009, 8390) after shadowing the hyper-gem enum captured by animator code. | `createMainWindow` | resolved | High. | 11–17 | UI/MainWindow | None. |
| `t` / `g` local | 5291 | Main window receiving all controls/children, stored overlay, and final return at 5516. | `window` | resolved | High. | 11–12 | UI/MainWindow | None. |
| `a` / main-window local | 5302 | Captured frame level used to place the resize handle three levels above it. | `frameLevel` | resolved | High. | 11–11 | UI/MainWindow | None. |
| `o` / backdrop local | 5303 | Descriptor from `C()` populated with window textures/dimensions and passed to `SetBackdrop`. | `backdropInfo` | resolved | High. | 11–11 | UI/MainWindow | None. |
@@ -705,7 +705,7 @@ Factories `V`, `O`, and `E` close and install their frames in this batch, so the
| `P` / shadow function | 5519 | Constructs and installs the pause/menu frame and its Resume, New Game, Feats, Options, and About controls; shadows authenticated-score encoder retained by earlier closures. | `createMenuWindow` | resolved | High. | 12–12 | UI/Menu | Factory installs globally rather than returning. |
| `P` / shadow function | 5519 | Constructs and installs the pause/menu frame and its Resume, New Game, Feats, Options, and About controls; invoked and later released by final bootstrap (8010, 8391) after shadowing the authenticated-score encoder retained by earlier closures. | `createMenuWindow` | resolved | High. | 12–17 | UI/Menu | Factory installs globally rather than returning. |
| `t` / `P` local | 5520 | Menu frame configured through show/hide behavior and installed as `Bejeweled.menuWindow`. | `menuWindow` | resolved | High. | 12–12 | UI/Menu | None. |
| `o` / menu backdrop local | 5530 | Backdrop descriptor populated and passed to the menu frame. | `backdropInfo` | resolved | High. | 12–12 | UI/Menu | None. |
| `o` / menu close-button local | 5540 | Inherited close button configured before the spelling is shadowed. | `closeButton` | resolved | High. | 12–12 | UI/Menu | Template owns click behavior. |
@@ -715,7 +715,7 @@ Factories `V`, `O`, and `E` close and install their frames in this batch, so the
| `n` / menu button locals | 5577, 5588, 5600, 5617, 5634 | Successive Resume, New Game, Feats, Options, and About buttons. Each initializer uses the prior `n` as temporary parent before reparenting to the menu, then shadows it. | role-specific button names | resolved | High. | 12–12 | UI/Menu | Preserve Lua 5.1 initializer scope. |
| `t` / Resume/New/Feats/Options callback params | 5582, 5594, 5606, 5623 | Four declaration-specific clicked-button parameters are never read. | — | dead | High. | 12–12 | UI/Menu | None. |
| `t` / About callback param | 5640 | Clicked About button supplies its attached `tabClick` method before the About screen is shown. | `aboutButton` | resolved | High. | 12–12 | UI/Menu | None. |
| `N` / shadow function | 5656 | Constructs and installs the tutorial/action popup; shadows shine-atlas binding captured by earlier effect closures. | `createPopup` | resolved | High. | 12–12 | UI/Popup | Factory installs globally rather than returning. |
| `N` / shadow function | 5656 | Constructs and installs the tutorial/action popup; invoked by final bootstrap at 8017 after shadowing the shine-atlas binding captured by earlier effect closures. | `createPopup` | resolved | High. | 12–17 | UI/Popup | Factory installs globally rather than returning. |
| `t` / `N` local | 5657 | Popup frame configured with message/caption/buttons/scripts and installed as `Bejeweled.popup`. | `popup` | resolved | High. | 12–12 | UI/Popup | None. |
| `n` / popup backdrop local | 5665 | Backdrop descriptor populated and applied to the popup. | `backdropInfo` | resolved | High. | 12–12 | UI/Popup | None. |
| `n` / popup top-right-button local | 5675 | Button created with only `BackdropTemplate` because Lua `and` returns its second string; configured but never retained or scripted before shadow. | `unwiredTopRightButton` | resolved | High. | 12–12 | UI/Popup | Preserved defect candidate. |
@@ -727,7 +727,7 @@ Factories `V`, `O`, and `E` close and install their frames in this batch, so the
| `n` / popup-button locals | 5726, 5735, 5745 | Successive OK, Feats of Skill, and Options buttons stored as `button1`–`button3`; third is parented to the second. | `okButton`,`skillsButton`,`optionsButton` | resolved | High. | 12–12 | UI/Popup | None. |
| `t` / popup OK callback param | 5731 | Clicked-button parameter is never read. | — | dead | High. | 12–12 | UI/Popup | None. |
| `t` / popup navigation callbacks | 5740, 5750 | Clicked buttons are forwarded to the corresponding menu button's `OnClick`; those target callbacks do not consume them. | `button` | resolved | High. | 12–12 | UI/Popup, UI/Menu | Preserve direct script invocation. |
| `W` / shadow function | 5757 | Constructs and installs the Classic/Timed game-type selector; shadows spawn-effect enum captured by earlier animator closures. | `createGameModeWindow` | resolved | High. | 12–12 | UI/Menu | Factory installs globally rather than returning. |
| `W` / shadow function | 5757 | Constructs and installs the Classic/Timed game-type selector; invoked by final bootstrap at 8012 after shadowing the spawn-effect enum captured by earlier animator closures. | `createGameModeWindow` | resolved | High. | 12–17 | UI/Menu | Factory installs globally rather than returning. |
| `t` / `W` local | 5758 | Game-type frame configured and installed as `Bejeweled.gameModeWindow`. | `gameModeWindow` | resolved | High. | 12–12 | UI/Menu | None. |
| `n` / game-mode close-button local | 5775 | Inherited close button configured before shadow. | `closeButton` | resolved | High. | 12–12 | UI/Menu | None. |
@@ -735,7 +735,7 @@ Factories `V`, `O`, and `E` close and install their frames in this batch, so the
| `t` / game-mode `OnHide` param | 5789 | Selector frame whose transient `gameMode` flag distinguishes forward transition from back navigation. | `gameModeWindow` | resolved | High. | 12–12 | UI/Menu | Field name is not gameplay-mode identity. |
| `n` / game-mode button locals | 5797, 5808 | Classic and Timed buttons; second initializer temporarily parents to the first before reparenting. | `classicButton`,`timedButton` | resolved | High. | 12–12 | UI/Menu | Preserve Lua 5.1 initializer scope. |
| `t` / game-mode button callbacks | 5802, 5814 | Distinct clicked-button parameters are never read. | — | dead | High. | 12–12 | UI/Menu | None. |
| `F` / shadow function | 5823 | Constructs and installs classic Continue/New Game selector; shadows gem atlas captured by earlier rendering/animator closures. | `createClassicModeWindow` | resolved | High. | 12–12 | UI/Menu | Factory installs globally rather than returning. |
| `F` / shadow function | 5823 | Constructs and installs classic Continue/New Game selector; invoked and released by final bootstrap (8013, 8396) after shadowing the gem atlas captured by earlier rendering/animator closures. | `createClassicModeWindow` | resolved | High. | 12–17 | UI/Menu | Factory installs globally rather than returning. |
| `t` / `F` local | 5824 | Classic selector configured and installed as `Bejeweled.classicModeWindow`. | `classicModeWindow` | resolved | High. | 12–12 | UI/Menu | None. |
| `t` / flight-timer local | 6008 | Hidden one-pixel frame driven by `Ne`, stored as `n.timer`. | `flightTimer` | resolved | High. | 13–13 | UI/Flight | None. |
| `R` / shadow function | 6019 | Constructs and installs timed-mode menu; shadows gem renderer retained by earlier closures. | `createTimedModeWindow` | resolved | High. | 13–13 | UI/Flight, UI/Menu | Factory installs globally rather than returning. |
| `R` / shadow function | 6019 | Constructs and installs timed-mode menu; invoked by final bootstrap at 8011 after shadowing the gem renderer retained by earlier closures. | `createTimedModeWindow` | resolved | High. | 13–17 | UI/Flight, UI/Menu | Factory installs globally rather than returning. |
| `o` / `R` local | 6020 | Timed-mode menu configured and installed as `Bejeweled.timedWindow`. | `timedWindow` | resolved | High. | 13–13 | UI/Flight, UI/Menu | None. |
| `t` / timed backdrop local | 6027 | Backdrop descriptor populated and applied to timed menu. | `backdropInfo` | resolved | High. | 13–13 | UI/Menu | None. |
| `t` / timed close-button local | 6036 | Inherited close button configured before shadow. | `closeButton` | resolved | High. | 13–13 | UI/Menu | None. |
@@ -775,9 +775,9 @@ Factories `g`, `P`, `N`, `W`, and `F` close in this batch, so their constructed-
| `n` / flight-checkbox local | 6107 | Checkbox returned by `CreateCheckbox`, styled and stored as `o.flightCheckbox`. | `flightCheckbox` | resolved | High. | 13–13 | UI/Flight | Empty click callback is intentional legacy behavior. |
| `t` / timed-Go local | 6133 | Go button that delegates to flight Start or starts fixed-duration timed play. | `goButton` | resolved | High. | 13–13 | UI/Flight | None. |
| `t` / timed-Go callback param | 6137 | Clicked-button parameter is never read. | — | dead | High. | 13–13 | UI/Flight | None. |
| `M` / shadow function | 6149 | Registers `UNIT_FLAGS` on the main window and shadows score presenter retained by earlier closures. | `registerUnitFlagsEvent` | resolved | High. | 13–13 | Core/Events | Callback/call site remains to locate. |
| `M` / shadow function | 6149 | Registers `UNIT_FLAGS` on the main window and is secure-hooked after `TakeTaxiNode` at 8003; shadows the score presenter retained by earlier closures. | `registerUnitFlagsEvent` | resolved | High: final hook site confirms post-taxi registration. | 13–17 | Core/Events | None. |
| `t` / `M` param | 6149 | Function parameter is never read. | — | dead | High. | 13–13 | Core/Events | None. |
| `B` / shadow function | 6252 | Constructs summary metrics, publishing/high-score/brag actions, dropdown/channel filtering, and nested brag screen; closes at 6519 after shadowing `table.remove` retained by earlier closures. | `createSummaryScreen` | resolved | High. | 13–14 | UI/Summary | None. |
| `B` / shadow function | 6252 | Constructs summary metrics, publishing/high-score/brag actions, dropdown/channel filtering, and nested brag screen; invoked and released by final bootstrap (8050, 8392) after shadowing `table.remove` retained by earlier closures. | `createSummaryScreen` | resolved | High. | 13–17 | UI/Summary | None. |
| `n` / summary-window local | 6253 | Main window used only to derive summary/inner-panel frame levels before line-6281 shadow. | `window` | resolved | High. | 13–13 | UI/Summary | None. |
| `o` / summary-frame local | 6254 | Summary screen receives metrics/actions/brag child and is installed globally; shadowed by dropdown local at 6485 after all needed closures capture it. | `summaryScreen` | resolved | High. | 13–14 | UI/Summary | None. |
| second `t` / `u` local | 6524 | Game-board frame used as parent for Feats screen before line-6555 shadow. | `gameBoard` | resolved | High. | 14–14 | UI/Skills | None. |
@@ -939,7 +939,7 @@ Summary factory `B` closes, so its open action/frame bindings are resolved. `Che
| `h`,`s`,`S` / achievement counters | 7335–7337 | Unlocked, total-record, and completed counts passed to title format. | `unlockedCount`,`totalCount`,`completedCount` | resolved | High. | 15–15 | UI/Skills | None. |
| `e`,`n` / achievement reset loops | 7338–7339 | Reverse type and entry indices clearing all preallocated plates. | `skillType`,`achievementIndex` | resolved | High. | 15–15 | UI/Skills | None. |
| `e`,`o` / achievement population loops | 7349–7350 | Forward type and entry indices selecting unlocked/completed plates. | `skillType`,`achievementIndex` | resolved | High. | 15–15 | UI/Skills | None. |
| `m` / shadow function | 7413 | Constructs/installs About screen and Tutorial, PopCap story/version, and Credits tabs; closes at 7631 after shadowing random alias retained by earlier closures. | `createAboutScreen` | resolved | High. | 15–16 | UI/About | None. |
| `m` / shadow function | 7413 | Constructs/installs About screen and Tutorial, PopCap story/version, and Credits tabs; invoked and released by final bootstrap (8052, 8394) after shadowing the random alias retained by earlier closures. | `createAboutScreen` | resolved | High. | 15–17 | UI/About | None. |
| `n` / About-window local | 7414 | Main window supplies frame levels through tab creation, then is shadowed by line-7500 child frame. | `window` | resolved | High. | 15–15 | UI/About | None. |
| first `t` / About locals | 7415 | Nil declaration immediately shadowed at line 7416. | — | shadowed | High. | 15–15 | UI/About | Minifier artifact. |
| second `t` / About local | 7416 | Game-board frame used as About parent before line-7447 shadow. | `gameBoard` | resolved | High. | 15–15 | UI/About | None. |
@@ -979,7 +979,7 @@ Feats factory `u` and both refresh callbacks close, resolving stats, leaderboard
| `n` / key-down separator local | 7846 | Empty/`-` separator used while composing modifier string and final keybind. | `separator` | resolved | High. | 16–16 | UI/Options | None. |
| `S` / shadow function | 7874 | Central window event dispatcher handles taxi/network/startup/death/ready/combat events and shadows inactive-hint enum retained by earlier closures. | `handleWindowEvent` | resolved | High. | 16–16 | Core/Events | Attachment appears in final batch or earlier factory. |
| `S` / shadow function | 7874 | Central window event dispatcher handles taxi/network/startup/death/ready/combat events; final bootstrap installs it on the main window at 8028 before a game-surface local shadows its spelling. | `handleWindowEvent` | resolved | High: body and attachment are complete. | 16–17 | Core/Events | None. |
| `i`,`t`,`l` / event-dispatch params | 7874 | Window/frame, event name, and first event argument/unit select and service all branches. | `window`,`event`,`arg1` | resolved | High. | 16–16 | Core/Events | None. |
| `o` / event-dispatch fourth param | 7874 | Parameter is shadowed by local `o` at 7875 without a read. | — | shadowed | High. | 16–16 | Core/Events | None. |
| `o` / event flight-window local | 7875 | Flight-option window supplies timer/learning state across flight-end and login branches before narrower shadowing. | `flightOptionWindow` | resolved | High. | 16–16 | Core/Events, UI/Flight | None. |
@@ -993,8 +993,55 @@ Feats factory `u` and both refresh callbacks close, resolving stats, leaderboard
| `o` / login friend pre-loop local | 7956 | Hidden by numeric-for variable at 7957 without a read. | — | dead | High. | 16–16 | Network/Publishing | None. |
| `t` / login friend local | 7956 | Friend name used as LogSync/HSPub whisper target when implicit `online` is truthy. | `friendName` | resolved | High. | 16–16 | Network/Publishing | Verify current friend API tuple. |
| `k` / shadow function | 7995 | Begins compatibility/limit initialization by forcing `skillLimit`; shadows flight-learning mode retained by earlier closures and remains open after line 8000. | `initializeSkillLimitCompatibility` | working | Medium until completed. | 16–16 | Core/Compatibility | Continue in batch 17. |
| `k` / shadow function | 7995 | One-shot addon bootstrap forces the post-map-API skill limit, hooks taxi handlers, constructs services/UI/HUD/grid, releases selected constructors including itself, closes at 8398, and is invoked at 8400. It shadows flight-learning mode retained by earlier closures. | `initializeAddon` | resolved | High: complete body, constructor order, cleanup, and call site. | 16–17 | Core/Init | None. |
## Batch 16 resolution policy
About factory `m`, Options initializer, and event dispatcher `S` close, resolving their UI, binding, event, and publishing scopes. Login payload duplication and dead checksum/numeric intermediates are recorded as wire/data-flow evidence. Open compatibility function `k` remains working until the final batch determines its complete fallback behavior.
| `x` / bootstrap local | 8005 | Animator returned by factory `A`, installed as `Bejeweled.animator`, used to create the hint, then constructor `A` is released. Shadows base-70 encoder after the `data` key assignment. | `animator` | resolved | High. | 17–17 | UI/Animator, Core/Init | None. |
| `r` / bootstrap local | 8006 | Main window returned by factory `g`; owns keyboard/event scripts, game/status children, splash, and relative frame levels. Shadows direction-pattern table for the bootstrap body. | `window` | resolved | High. | 17–17 | UI/MainWindow, Core/Init | None. |
| first `t` / bootstrap scratch | 8032 | Nil binding hidden by line-8033 `t` without a read. | — | shadowed | High. | 17–17 | Core/Init | Minifier artifact. |
| `h` / bootstrap scratch | 8032 | Survives repeated `t` shadowing, receives each created gem frame, and supplies handler/frame/grid fields in the final 8×8 loop. | `gem` | resolved | High. | 17–17 | UI/GemPool | None. |
| `t` / bootstrap dead bindings | 8033, 8034 | Two zero-valued same-scope locals are successively shadowed without reads. | — | shadowed | High. | 17–17 | Core/Init | Minifier artifact. |
| two `t` bindings / duplicate declaration | 8035 | First is hidden by the second in the same declaration; second is hidden by line-8036 before a read. | — | shadowed | High. | 17–17 | Core/Init | Minifier artifact. |
| `t` / board-anchor local | 8036 | Frame anchors the exported board and is consumed as `gameBoard` parent before line-8043 shadows it. | `gameBoardAnchor` | resolved | High. | 17–17 | UI/HUD | None. |
| `gameBoard` / implicit chunk global | external; write 8040, reads 8041–8317 | Undeclared framed board alias is configured, exported as `Bejeweled.gameBoard`, and reused as foreground/status/splash parent/anchor. | `gameBoard` | resolved | High for role; accidental global alias. | 17–17 | UI/HUD | Rewrite as a local while preserving namespace export. |
| `t` / bootstrap backdrop scratch | 8043 | Reassigned fresh `C()` descriptors for board, status borders, level bars, overlay, and state icon through line 8301. Nested loops/callbacks shadow it only in narrower scopes. | `backdropInfo` | resolved | High. | 17–17 | UI/Backdrops, UI/HUD | Split descriptors in rewrite. |
| `S` / game-surface local | 8053 | 400×400 interactive game surface parents background tiles and all gem frames and supplies frame-level base; shadows event dispatcher after its attachment. | `gameSurface` | resolved | High. | 17–17 | UI/GemPool | Duplicate global frame name matches foreground at 8078. |
| two `a` bindings / bootstrap duplicate declaration | 8059 | First is hidden by the second in the same declaration; surviving second is hidden at 8082 without a read. | — | shadowed | High. | 17–17 | Core/Init | Minifier artifact. |
| `i` / bootstrap UI scratch | 8059 | Receives each board-art tile, then paused-text and splash frames; all constructed frames are retained by parents or `Bejeweled` fields. | `uiFrame` | resolved | High. | 17–17 | UI/GemPool, UI/HUD | Split temporal roles in rewrite. |
| `a` / status-banner local | 8082 | Hidden one-pixel parent owns status texture/background and custom `SetText`; exported as `Bejeweled.gameStatusText` before line-8127 shadows it. | `gameStatusText` | resolved | High. | 17–17 | UI/HUD | None. |
| `d` / status-art local | 8083 | `largeText["Strip"]` metadata supplies background UVs, then line-8121 shadows it. | `stripMetadata` | resolved | High. | 17–17 | UI/HUD | None. |
| `n`,`t` / status `SetText` params | 8105 | Receiver and metadata key; parameter `t` is consumed by the initializer at 8106 before the new local shadows it. | `statusFrame`,`textKey` | resolved | High; Lua 5.1 initializer scope is behavior-critical. | 17–17 | UI/HUD | None. |
| `d` / status-bar local | 8121 | Bottom status-bar frame parents level/data/bar layout and supplies frame levels before line-8287 shadows it. | `statusBar` | resolved | High. | 17–17 | UI/HUD | None. |
| `a` / level-border local | 8127 | Left status segment owns level number/caption and final width 86 before line-8161 shadows it. | `levelBorder` | resolved | High. | 17–17 | UI/HUD | Initial width 122 is overwritten. |
| `s` / data-border local | 8150 | Middle status segment owns data text and final width 128 before line-8189 shadows it. | `dataBorder` | resolved | High. | 17–17 | UI/HUD | Initial width 72 is overwritten. |
| `a` / level-bar local | 8161 | Right status segment owns fill/text/mode/score/timer methods and hidden update timer before line-8212 shadows it. | `levelBar` | resolved | High. | 17–17 | UI/HUD, Engine/Scoring | None. |
| first `f` / level-bar backing local | 8175 | Dark frame behind the blue level-bar fill; hidden by line-8264 after setup. | `levelBarBackground` | resolved | High. | 17–17 | UI/HUD | None. |
| `s` / bar-fill scratch | 8189 | Starts as blue level-bar texture, then is reassigned at 8278 to the red New Game overlay texture; owners retain both. | `barFillTexture` | resolved | High. | 17–17 | UI/HUD | Split temporal roles in rewrite. |
| `a` / level-bar-button local | 8212 | Hidden mouse overlay coordinates menu/sub-screen handoff and mode-specific New Game behavior, then owns its red bar/text/icon. | `newGameOverlay` | resolved | High. | 17–17 | UI/HUD, UI/Menu | ID 1 and ID 2 are transient states. |
| `t` / overlay show/hide params | 8219, 8222 | Distinct callback parameters are never read; callbacks set status-bar alpha to 0 or 1. | — | dead | High. | 17–17 | UI/HUD | None. |
| `e` / overlay enter/leave params | 8225, 8228 | Overlay receiver supplies `.bar`, tinted bright red on enter and dark red on leave. | `newGameOverlay` | resolved | High. | 17–17 | UI/HUD | None. |
| `t` / overlay click param | 8231 | Overlay receiver supplies ID/state and is hidden/reset or routes current game mode. | `newGameOverlay` | resolved | High. | 17–17 | UI/HUD, UI/Menu | None. |
| `n` / overlay mode local | 8242 | Self-initializer reads outer current-game `n.lastGameMode`; new local selects timed, classic, or generic mode flow. | `lastGameMode` | resolved | High; Lua 5.1 initializer scope is required. | 17–17 | UI/Menu | None. |
| second `f` / overlay backing local | 8264 | Dark backing frame behind overlay's red bar; shadows consumed level-bar background local. | `newGameBackground` | resolved | High. | 17–17 | UI/HUD | None. |
| `d` / state-icon local | 8287 | Bordered frame immediately left of overlay owns the cropped `UI-StateIcon` texture; shadows consumed status-bar local. | `stateIconFrame` | resolved | High. | 17–17 | UI/HUD | None. |
| `t`,`o` / splash-update params | 8327 | Splash frame and elapsed delta drive accumulation/fade; `o` is clamped to 0.1 and later shadowed only in nested completion callback. | `splash`,`delta` | resolved | High. | 17–17 | UI/HUD | None. |
| `e` / splash fade local | 8335 | Fade descriptor table contains OUT mode, one-second endpoints, and completion callback passed to `UIFrameFade`. | `fadeInfo` | resolved | High. | 17–17 | UI/HUD | Replace only after authoritative API verification. |
| `o` / splash-finished local | 8341 | Snapshot of `Bejeweled.paused` restored after saved classic state is loaded. | `wasPaused` | resolved | High. | 17–17 | UI/HUD, Engine/Grid | None. |
| `FRAME_LEVEL_JEWEL_SWAP` / implicit chunk global | external; write 8370 | Receives `gameSurface:GetFrameLevel() + 3`; no in-file read follows. | `jewelSwapFrameLevel` | resolved | High for assigned role; external consumer absent. | 17–17 | UI/GemPool | Decide whether modernization needs an exported tier. |
| `t`,`e` / gem-grid loops | 8373–8374 | Zero-based row/column values create 64 gem frames at 50-pixel offsets and store them one-based in grid/fields. | `row`,`column` | resolved | High. | 17–17 | UI/GemPool, Engine/Grid | None. |
| `Initialize_OptionsScreen` / implicit chunk global | external; write 8395 | Unqualified nil assignment has no matching declaration/read and does not affect `Bejeweled.Initialize_OptionsScreen`. | — | dead | High. | 17–17 | Core/Init | Remove as dead write in rewrite. |
| `e` / final chunk local | 8401 | Declared after bootstrap invocation and never read. | — | dead | High. | 17–17 | Unassigned | Minifier artifact. |
## Batch 17 resolution policy
Complete function `k` proves bootstrap ownership and constructor order, so it is resolved as `initializeAddon`, not the narrower compatibility hypothesis from Batch 16. Final attachments resolve score/timer methods, taxi hooks, events, slash commands, gem handlers, board dimensions, and stat key `data`. Unqualified globals and unused frame tiers remain explicit evidence rather than being silently corrected. Sequential coverage is complete; remaining earlier `working`/`unresolved` rows require a cross-batch behavior-critical closure audit before runtime work.
Source: `Legacy/Bejeweled_Mainline.lua` at commit `6faec1c`
Coverage: lines 8001–8401 inclusive
Blank: 8002, 8399
Status: complete; one-shot bootstrap function `k` closes and is invoked, completing sequential coverage of all 8,401 lines
## Line-indexed coverage audit
| Lines | Evidence represented |
| ---: | --- |
| 8001 | Commented `end` closes only the removed continent check text; executable bootstrap function `k` remains open. |
| 8002 | Blank. |
| 8003–8004 | Secure-hooks taxi selection and hover handlers, then assigns `v = x(1378301, 4)`. The base-70 encoder produces the four-character key `data`, resolving the authenticated-score field name. |
| 8005–8031 | Creates animator and main window, installs menu/timed/mode/classic/flight/network/sound/popup/minimap factories, enables keyboard propagation, registers eight window events with dispatcher `S`, and installs `/bejeweled` plus `/bej` on command handler `Ze`. |
| 8032–8049 | Declares several dead/shadowed minifier locals, creates the board anchor, then assigns an undeclared `gameBoard` global. The exported `Bejeweled.gameBoard` is 414×412 from `s + 14` and `w + 12`, framed two levels above the window. |
| 8050–8052 | Installs Summary, Feats of Skill, and About screens through factories `B`, `u`, and `m`. |
| 8053–8077 | Creates the 400×400 mouse-enabled game surface. Nested 0–3 loops build sixteen 100×100 background tiles at 100-pixel offsets; every tile uses the same `board` texture crop `(0.046875, 0.828125, 0.046875, 0.828125)`, alpha `0.8`, and game-surface frame level. |
| 8078–8120 | Creates board foreground and hidden large status-banner frame. `SetText` reads `largeText` metadata: widths/heights are entries 1–2; arrays longer than nine use eight UV coordinates at 3–10 plus RGB at 11–13, otherwise rectangular UVs at 3–6 plus RGB at 7–9. It always restores banner/background alpha. |
| 8121–8160 | Creates bottom status bar, level border, level number/caption, and data border. Width writes `122→86` and `72→128` are intentional last-write-wins evidence; the data border reuses the level-border backdrop. |
| 8161–8211 | Builds the level/timer bar and darker backing frame, installs the blue `barArt` fill at width `0.01`, attaches score/range/mode/timer methods `ht`, `Bt`, `xt`, `rt`, `Tt`, `kt`, `Ft`, and `Pt`, and wires hidden timer frame `OnUpdate` to `fe`. |
| 8212–8263 | Builds an initially hidden mouse overlay for New Game/menu handoff. Show/hide toggles status-bar alpha; hover changes the red bar; click ID 1 closes sub-screens, while ID 2 resumes mode-specific flow: timed menu, immediate classic restart, or game-mode menu. |
| 8264–8302 | Adds the overlay backing/red fill, New Game caption, and a 70×32 state-icon border. The icon uses the top-left quadrant `(0, .49, 0, .49)` of `UI-StateIcon`. |
| 8303–8326 | Creates/scales hidden Paused text and full-board splash art/copyright. Splash hide checks account-wide `K > 1000` and absent `gainAchieve7`, then requests `SKILL_ACHIEVE4B`; the exact guard/award pairing is preserved evidence. |
| 8327–8364 | Splash `OnUpdate` clamps a single delta to `0.1`, accumulates only while `elapsed` is set, and fades out after `splashDisplayTime`. Completion hides splash, enables Menu, starts the first classic game, restores a saved classic state while preserving pause, or clears stale progress and shows Menu. |
| 8365–8386 | Places splash above the window and derives five game-surface-relative frame tiers: gem `+2`, implicit global swap `+3`, then unused local tiers `+4`, `+5`, `+6`. Nested 0–7 loops create the 8×8 gem grid at 50-pixel offsets, attach enter/leave/click/drag handlers, store one-based `gridX/gridY`, and write each frame to `o[row][column]`. |
| 8387–8398 | Creates the animator hint, then releases gem-frame, animator, window, menu, summary, Feats, About, Classic-menu, and bootstrap factory references. The unqualified `Initialize_OptionsScreen = nil` is a dead implicit-global write, not the `Bejeweled` method. Function `k` closes. |
| 8399 | Blank. |
| 8400 | Invokes `k` once; it can nil its own binding safely because the call target is evaluated before the function body runs. |
| 8401 | Declares final chunk local `e`, which is never read and is dead. |
## Findings
- `k` is not merely a compatibility helper. Its complete body is the addon's one-shot bootstrap: it forces the post-map-API skill cap, constructs services and UI, hooks taxi APIs, registers events/commands, creates the HUD and 64 gem frames, releases selected constructors, and invokes itself once.
- Base-70 constant decoding proves `v` is the literal key `data`; this pairs with `I = "score"` from Batch 13 and closes the two mode-stat key roles used by the preserved profile wire format.
- The board has three layers: exported framed `gameBoard`, 400×400 interactive game surface, and slightly oversized foreground. The repeated 4×4 background tiles are visual texture repetition, while the separately created 8×8 objects are the authoritative interactive gem grid.
- Frame-level derivation is explicit but asymmetric. Only `Be` (`surface + 2`) is consumed internally; `FRAME_LEVEL_JEWEL_SWAP` is an implicit global, and local `Ie`, `Ge`, and `Ae` receive higher tiers without any in-file reads.
- Constructor cleanup is selective. `A`, `g`, `P`, `B`, `u`, `m`, `F`, `tt`, and `k` are nilled, while several already-invoked constructors remain bound. This is legacy lifetime behavior, not proof that retained factories form a public API.
- The final unqualified `Initialize_OptionsScreen` assignment does not clear `Bejeweled.Initialize_OptionsScreen`; that method is invoked and cleared through the namespace during `VARIABLES_LOADED` at lines 1615–1618.
Sequential source coverage is complete. Before the runtime phase gate can open, perform a cross-batch closure audit of all remaining `working`/`unresolved` ledger rows, distinguish behavior-critical dependencies from dead or externally injected legacy defects, verify every retained WoW API contract against the authoritative Retail snapshot, and turn the completed evidence into an implementation sequence that preserves `BejeweledData` and `BejeweledProfile` wire formats.
Assert-True($lineCount-eq8401)"Legacy source has $lineCount lines, expected 8401"
Write-Output"Verified: forbidden files absent; legacy and $($assetPaths.Count) asset hashes match $SourceCommit."
Write-Output"Verified: strict UTF-8 text, exact 8,401-line schedule, and complete batch-01/02/03/04/05/06/07/08/09/10/11/12/13/14/15/16 line coverage."
Write-Output"Verified: strict UTF-8 text, exact 8,401-line schedule, and complete batch-01/02/03/04/05/06/07/08/09/10/11/12/13/14/15/16/17 line coverage."
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.