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.
Summary
Bugfixes "Fixes for isometric tilesets"
Purpose of change
Fixes #57123
Sort of fixes as it just disables selecting smashbutton for overmap tileset until an implementation is done:
Fixes #58951
Fixes #60169 (issue unrelated to android)
As in, these are bugs because smashbutton is available for selection, but appears to be that they should be feature requests instead
Describe the solution
Tileset load order determined if you had experienced the bug or not - cached_options.h had a global
iso_mode
that was set by whatever tileset happened to load last, and read (and cached, for example in minimap) at random times, this caused weird behaviour.Removed the global, added
tileset::tile_isometric
that returns the right value for that tileset, a few getters for it, and routed queries for the global through the getters.Minimap now syncs to whichever iso/ortho tileset is currently active.
The terrain offset issue in #58951 and #60169 is trivial to fix, something like this (click me) will get terrain and extras rendering sort of correctly (centered)
But it appears that there's lots of other issues such as tiles overdrawing each other, city labels floating and appear to be moving in mysterious ways, the (centered) isometric map also doesn't fill the entire screen - a simple fix is bumping up max_row/max_col in draw_om, but that is again a dirty fix.
TL;DR Overmap iso tileset support needs a proper implementation before it can work right. Smashbutton also appears to be missing most tiles used by overmap so it looks like super bugged ascii map just rendered in iso projection.
For now ( until someone gets a desire to implement overmap iso support ) I think disallowing smashbutton as overmap tileset is acceptable workaround, if not then cherrypick all but the last commit.
Using smashbutton as a "normal" game tileset should work, including mixing iso and non-iso for near/far tilesets.
Describe alternatives you've considered
Testing
both modes should work
check in iso mode the direction keys have an intercept that rotates them "right".
check minimap syncs up to current tileset - when in iso tileset it should be in iso mode, and same for ortho mode
Additional context