Skip to content

Conversation

@NicksWorld
Copy link
Contributor

This adds a new plugin that when enabled can automatically pan the game world and various region maps throughout the game.
The particular supported screens are:

  • Fortress/Adventure Game World
  • Worldgen Preview
  • Embark (overview, and zoomed)
  • World screen

In action:

2025-11-27.14-46-13.mp4
2025-11-27.14-46-56.mp4

@NicksWorld
Copy link
Contributor Author

An edge case was found where some screen resolutions cause df to mark the precise_mouse_x/y as invalid when moved to the border. Mouse position will need read from SDL directly.

@NicksWorld NicksWorld marked this pull request as draft November 27, 2025 22:46
@NicksWorld
Copy link
Contributor Author

In order to read the mouse position directly, dfhooks_sdl_loop is connected to a queue mechanism in DFSDL to queue callback methods to run on the renderer thread. This is done because many SDL methods, including those to get mouse position, need to run on the main thread. These methods are executed from dfhooks_sdl_loop and are cleared after execution.

For window-edge presence detection, real coordinates are used instead of logical coordinates as DF doesn't update the logical size of the renderer when the window is resized whilst in fullscreen (very possible with tiling window managers).

@NicksWorld NicksWorld marked this pull request as ready for review November 28, 2025 02:37
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.

2 participants