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

Orthographic rotation/flipping #6

Open
jgordon510 opened this issue May 11, 2020 · 0 comments
Open

Orthographic rotation/flipping #6

jgordon510 opened this issue May 11, 2020 · 0 comments

Comments

@jgordon510
Copy link

I noticed that rotation/flipping wasn't supported. Flipped and rotated tiles do not show up. This is because the flips are encoded in three bits at the end of the number, which changes the decimal value stored on the data map. In order to display the flipped tiles, you need to strip these bits from the number. I also used these bits to affect the rotation, which required using translation inside a push/pop instead of drawing directly at the x/y coordinates.

In another issue, I talked about how I got multiple tilesets with selective loading implemented. This requires stripping the bits at the point of load as well, to get the proper tile number, to determine if it's present on the map.

Please let me know if you'd like to implement my changes.

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

No branches or pull requests

1 participant