Skip to content
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 46 commits into from
Sep 10, 2019

Conversation

Qrox
Copy link
Contributor

@Qrox Qrox commented Sep 2, 2019

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:

8937ab92-eb7f-40df-a0a6-f6468b107d5b

675ba4ff-7ab9-4009-8413-73b60cd0a10b

578cc04e-df4b-4112-a16c-b8df1ed50aea

Qrox added 30 commits August 28, 2019 22:16
@ZhilkinSerg ZhilkinSerg added [C++] Changes (can be) made in C++. Previously named `Code` SDL: Tiles / Sound Tiles visual interface and sounds. labels Sep 2, 2019
@Leland
Copy link
Contributor

Leland commented Sep 2, 2019

Qrox for president. This looks amazing 👏

@Qrox Qrox changed the title [WIP] Implement debug map editor preview for Tiles Implement debug map editor preview for Tiles Sep 4, 2019
@ZhilkinSerg ZhilkinSerg merged commit f3ca6f3 into CleverRaven:master Sep 10, 2019
@Qrox Qrox deleted the debug-edit-preview branch September 19, 2019 12:00
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants