Fix incorrect rendering of tilemaps with csv data on windows #20483
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.
Each tilemap row would be shifted to the right a certain number of tiles.
When saving Tiled maps with data in CSV format it is saved like this:
When reading each line there is a carriage return at the beginning which in windows is '\r\n'.
Because of how each line is parsed the '\r' at the beginning of each line would be parsed as a tile id.
On windows we must remove all '\r' from the parsed string.
I had talked about the issue here: https://discuss.cocos2d-x.org/t/cocos2d-x-v4-0-released/48487/106?u=bolin