Repository navigation
Engine train 10: draw the starter UI's map page as the app's own map - #238
Merged
Merged
Conversation
vadi2
force-pushed
the
ccr-14671218-tf96z6-engine-train-10
branch
from
November 21, 2026 22:59
57f12fe to
2eabb26
Compare
A script's mapper shown much larger than its window, as the starter UI's Map page is on a phone, was laid out in the window's own pixels and magnified: Mudlet's outlines, line weights and the room size below which a room's border fades and then goes are in pixels, so its rooms lost their borders, the levels above and below became filled dots and the exits grew thin, unlike the map button's map of the same area. setMapScale takes the screen's density as an optional density, and the engine lays such a mapper out in the app's dp and draws it scaled down to the window (renderMap()'s layoutScale, Mudlet patch 0045), so its rooms are drawn as on the app's own map. The window's size, the zoom, the view and the points stay what the script set and sees. An engine without it ignores the field and a UI without it sends none, so the protocol keeps its version. Part of Mudlet/Mudlet#9011 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016ujaeFyaqXXDx8xjoThE6J
Mudlet's painter tints a selected room, so a frame drawn after the press can never show room 2 in its own colour. Part of Mudlet/Mudlet#9011 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016ujaeFyaqXXDx8xjoThE6J
vadi2
force-pushed
the
ccr-14671218-tf96z6-engine-train-10
branch
from
November 21, 2026 23:50
2eabb26 to
75cb0e4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brief overview of PR changes/additions
The starter UI's Map tab now draws rooms as the map button's map does: the same outlines, line weights, exits and
levels above and below.
setMapScaletakes an optionaldensity, the screen's. A mapper shown larger than the app's dp is laid out indp and drawn scaled down to its window.
THeadlessSession::renderMap()takes alayoutScale. Pointer, wheel, drags and the view stayin the window's pixels.
ignores the field, and a request without it draws as before.
map_layoutcompares the mapper's and the app map's pixels around a room, and checks a press, adrag and a pinch in window pixels; ScriptMapTest checks the density sent.
Motivation for adding to Mudlet
A player found the Map tab worse than the map button's map: its small mapper window was laid out in its own pixels and magnified, and Mudlet's painter sets border fading, borderless rooms and outline widths in absolute pixels, so every room was drawn as a tiny one.
Other info (issues closed, discussion etc)
Part of Mudlet/Mudlet#9011
Checked: patches 0001-0045 apply and re-apply at Mudlet development e47ab4596; clang-format, strings, vendored, conflict markers. CI: PR CI and PTB green on 75cb0e4. bite: 44959525533, host test map_layout red without the engine's layout scale (380 of 1681 pixels differ); app-side 44967621658, the app sending no density: ScriptMapTest red on both emulators, nothing else. device-only: how the Map tab looks on a phone.
Size (PTB arm64-v8a): total 82.25 MB of 81.98 MB, dex 4.10 MB of 3.96 MB, within the 5% headroom
🤖 Generated with Claude Code
https://claude.ai/code/session_016ujaeFyaqXXDx8xjoThE6J