You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running it in DartPad shows several IDs turn to 268435492 and 268435498 post flag-clearing. Given that there are bit shifts in this code and 2^28=268435456 it looks like some sort of an overflow error.
I can't see any issues just by looking at the code in tiled/src/layer.dart assempleTileMatrix vs the docs (https://doc.mapeditor.org/en/stable/reference/tmx-map-format/) but I don't know enough about bitwise operations in Dart to really understand it
The text was updated successfully, but these errors were encountered:
The root issue is from this section of the tiled documentation: https://doc.mapeditor.org/en/stable/reference/global-tile-ids/#gid-tile-flipping
The tile data probably comes from a hexagonal map, meaning the 29th bit is on, but tiled.dart only handles orthogonal maps, and only clears the top 3 bits. It should clear the top 4, and possibly even save the status of the bit into a new Flips flag in case a user wants to parse a hexagonal map.
See this example including sample data:
https://gist.github.com/pgainullin/bdf8ac141e9501958c993bb4467685fb
Running it in DartPad shows several IDs turn to 268435492 and 268435498 post flag-clearing. Given that there are bit shifts in this code and 2^28=268435456 it looks like some sort of an overflow error.
I can't see any issues just by looking at the code in tiled/src/layer.dart assempleTileMatrix vs the docs (https://doc.mapeditor.org/en/stable/reference/tmx-map-format/) but I don't know enough about bitwise operations in Dart to really understand it
The text was updated successfully, but these errors were encountered: