-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement debug map editor preview for Tiles #33760
Merged
Merged
Conversation
This file contains 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
Qrox for president. This looks amazing 👏 |
…view # Conflicts: # src/cata_tiles.cpp
…view # Conflicts: # src/editmap.cpp
…view # Conflicts: # src/cata_tiles.cpp
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
[C++]
Changes (can be) made in C++. Previously named `Code`
SDL: Tiles / Sound
Tiles visual interface and sounds.
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
SUMMARY: Interface "Debug map editor preview for Tiles"
Purpose of change
As part of my effort to overhaul the debug editor, this PR implements mapgen preview and map editing preview for the tiles build. Previously only the curses build had map editor preview and nothing was shown in the tiles build during map editing.
Describe the solution
The overall solution is to store preview data as overrides, passed to
cata_tiles
before refreshing the main display.cata_tiles
then draws using the override data if there are any. The overrides are also checked when accesing neighbouring tiles, so the preview will show what the change will look like after it is applied, if the preview is on visible tiles. Even if the preview is on invisible tiles, the overrides are still shown with full visibility. Map memory will not be affected by the overrides since they're not actually what the player character is seeing.To fully implement debug editor preview, I also fixed several display and map-memory related bugs along the way.
This is built on top of #33619.
Additional context
Some gifs of the new map editor preview in action: