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

Fix automatic sprite rotation for non-linear overmap tiles #1762

Merged
merged 1 commit into from
Jul 30, 2022

Conversation

olanti-p
Copy link
Contributor

@olanti-p olanti-p commented Jul 28, 2022

Summary

SUMMARY: Bugfixes "Fixed automatic sprite rotation for non-linear overmap tiles"

Purpose of change

If overmap terrain is rotatable, and the tileset has no explicitly defined rotations for the corresponding tile which is also marked as rotatable, then the game would try to automatically rotate that single tile to match rotation of the omt. Except the rotation direction is wrong (screenshot of ws_regional_dump found in latest unpacked UDP version):
image

This PR fixes this bug.

Describe the solution

Turns out rotations for omts are clockwise rotations, and rotations for tileset sprites are counterclockwise rotations. This PR adds proper conversion from omt rotation to sprite rotation.

Describe alternatives you've considered

Rewriting the renderer.

Testing

image

Additional context

Re-packed UDP with the aforementioned ws_regional_dump for testing:
UDP_REPACK.zip

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