GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Make the editor window resizable and fill it with the (wrapping) map by FlexApex · Pull Request #51 · Return-To-The-Roots/s25edit

Conversation

@FlexApex

@FlexApex FlexApex commented Jun 27, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Selecting resolutions from the options listbox requires a lot of clicking and many modern resolutions are missing.
A much more userfriendly solution is to allow user to resize the s25edit window, like any other application.

This PR implements exactly that and was tested successfully on Linux with various resolutions, including a 5k widescreen display. It was written with Opus 4.8.

  • Create the window with SDL_WINDOW_RESIZABLE and a 640x480 minimum size, and follow SDL_WINDOWEVENT_SIZE_CHANGED by recreating the display surface/texture at the new size (ResizeDisplay), so the working area grows with the window.

  • Rework the terrain renderer so the wrapping world tiles across the whole viewport instead of leaving a black void when the window is larger than the map. DrawTriangle now draws one map-tile copy at a given offset; the new drawTriangleTiled replicates each triangle at every visible map-period offset. This replaces the old single-wrap logic (GetAdjustedPoints and the k-pass edge handling), which assumed the viewport was never larger than the map.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@FlexApex
Make the editor window resizable and fill it with the (wrapping) map
1d3b98a
The map editor window could only be created at a fixed size (or fullscreen).
Allow it to be resized and maximized like the game client:

- Create the window with SDL_WINDOW_RESIZABLE and a 640x480 minimum size, and
  follow SDL_WINDOWEVENT_SIZE_CHANGED by recreating the display surface/texture
  at the new size (ResizeDisplay), so the working area grows with the window.

- Rework the terrain renderer so the wrapping world tiles across the whole
  viewport instead of leaving a black void when the window is larger than the
  map. DrawTriangle now draws one map-tile copy at a given offset; the new
  drawTriangleTiled replicates each triangle at every visible map-period offset.
  This replaces the old single-wrap logic (GetAdjustedPoints and the k-pass
  edge handling), which assumed the viewport was never larger than the map.
@morganchristiansson

morganchristiansson commented Jun 27, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Hello new contributor! Are you on discord? https://discord.gg/k8h6YZwA6

Window resizing was already merged in #46.
Also resolution is now saved across restarts in #44.

I've noticed the black area for small maps & big screens #37 (comment) but not submitted PR, I have some OpenGL branches where I wanted to fix it but reviews and approvals the take time.

Can be worth getting fixed still!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@littleant littleant mentioned this pull request Nov 23, 2026
Fix wrong map-heights saved while zoomed and draw the map wrapped around for large views #66
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@FlexApex @morganchristiansson
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.