Skip to content

fix(bake): store complex linestyle runs — the baker never wrote them#17

Merged
beetlebugorg merged 1 commit into
mainfrom
fix/bake-complex-linestyles
Jul 13, 2026
Merged

fix(bake): store complex linestyle runs — the baker never wrote them#17
beetlebugorg merged 1 commit into
mainfrom
fix/bake-complex-linestyles

Conversation

@beetlebugorg

Copy link
Copy Markdown
Owner

The bake surface's vtable CLAIMED, in a comment, to store complex runs un-tessellated so replay could re-walk the period at the display's scale:

// Bake path: store complex runs un-tessellated (no size_scale set — bake is
// native; replay re-walks the period display-scaled).

...but .store_complex_run was never set on the vtable. So canStoreComplexRun() returned false, drawComplexLine tessellated the period at bake time at size_scale = 1, and no tile ever carried an ls_style — the replay path that re-walks them has been dead code.

The bricks then scale with the display at render time while their SPACING stays frozen at 1x, so on a HiDPI display (size_scale ~3) the symbols swell into each other and a caution/restricted boundary reads as a smashed-up sawtooth instead of spaced marks.

Wire storeComplexRun on the bake surface, writing the clipped run with its style id, phase (arc0), colour and width — exactly what replay.zig already reads. A rebaked Boston cell now carries CTNARE51/ENTRES51/NAVARE51 runs, and the brick count falls as size_scale rises (74 -> 40 -> 32), i.e. the spacing finally scales with the bricks.

REQUIRES A REBAKE: the period lives in the tiles.

The bake surface's vtable CLAIMED, in a comment, to store complex runs
un-tessellated so replay could re-walk the period at the display's scale:

    // Bake path: store complex runs un-tessellated (no size_scale set — bake is
    // native; replay re-walks the period display-scaled).

...but .store_complex_run was never set on the vtable. So
canStoreComplexRun() returned false, drawComplexLine tessellated the
period at bake time at size_scale = 1, and no tile ever carried an
ls_style — the replay path that re-walks them has been dead code.

The bricks then scale with the display at render time while their SPACING
stays frozen at 1x, so on a HiDPI display (size_scale ~3) the symbols swell
into each other and a caution/restricted boundary reads as a smashed-up
sawtooth instead of spaced marks.

Wire storeComplexRun on the bake surface, writing the clipped run with its
style id, phase (arc0), colour and width — exactly what replay.zig already
reads. A rebaked Boston cell now carries CTNARE51/ENTRES51/NAVARE51 runs,
and the brick count falls as size_scale rises (74 -> 40 -> 32), i.e. the
spacing finally scales with the bricks.

REQUIRES A REBAKE: the period lives in the tiles.
@beetlebugorg beetlebugorg merged commit 294e96f into main Jul 13, 2026
5 checks passed
@beetlebugorg beetlebugorg deleted the fix/bake-complex-linestyles branch July 13, 2026 02:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant