Repository navigation
Render world behind the interface bar on widescreen - #15
Open
berlint-hub wants to merge 1 commit into
Open
berlint-hub wants to merge 1 commit into
berlint-hub wants to merge 1 commit into
Conversation
On 16:9 (854x480) the 640px interface bar is centered, leaving black strips on its sides because the map window is only screenHeight-100 tall. Make the map window full-height so the live world shows behind and around the bar. The bar stays on top (created later, clipping and click routing handled by the window manager). - map.cc: full-height display window, tile/obj heights, scroll math - tile.cc: scroll-limit bounds inset matches full-height viewport
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.
On 16:9 (854x480) the 640px interface bar is centered, but the strips on its sides stay black because the map window is only
screenHeight - INTERFACE_BAR_HEIGHTtall and nothing ever draws there.This makes the map window full-height so the live world renders behind and around the bar (overlay style). The bar itself is untouched and stays on top: it is created after the map window (
intface_initruns afterdisplay_win), and the window manager already clips map refreshes and routes clicks to the topmost window.Changes (7 lines):
src/game/map.cc: full-heightdisplay_win; tile/object buffer heights, scroll blit math use full heightsrc/game/tile.cc: scroll-limit bounds inset matches the full-height viewportTested on Switch (854x480, devkitA64 CI build): bar pixel-identical 1:1 in the center, live world visible on both sides, scrolling/clicks unaffected.