Skip to content

Render world behind the interface bar on widescreen - #15

Open
berlint-hub wants to merge 1 commit into
ryandeering:mainfrom
berlint-hub:overlay-world-behind-bar
Open

berlint-hub wants to merge 1 commit into
ryandeering:mainfrom
berlint-hub:overlay-world-behind-bar

Conversation

@berlint-hub

Copy link
Copy Markdown

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_HEIGHT tall 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_init runs after display_win), and the window manager already clips map refreshes and routes clicks to the topmost window.

Changes (7 lines):

  • src/game/map.cc: full-height display_win; tile/object buffer heights, scroll blit math use full height
  • src/game/tile.cc: scroll-limit bounds inset matches the full-height viewport

Tested on Switch (854x480, devkitA64 CI build): bar pixel-identical 1:1 in the center, live world visible on both sides, scrolling/clicks unaffected.

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
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