Giter Club home page Giter Club logo

Comments (2)

fallahn avatar fallahn commented on July 26, 2024

Thanks for the feedback. I've taken a quick look, and here's what I have so far: flip and rotation flags are, from what I can tell, simply bitmasked onto the UID of the tile. For instance the xml output of Tiled with a single tile placed in a variety of rotations looks like this:

<tile gid="45"/>
<tile gid="2684354605"/>
<tile gid="3221225517"/>

These are the same tile (45) only the second two have flip flags OR'd with the UID - and therefore look something like the incorrect ID you're getting. HOWEVER when I tried the ParseTest project included in the repository the tile IDs are apparently decoded properly - that is they all appear with the ID of 45, with the decoded flip flags on the left.

image

The pertinent code is here if you'd like to test yourself:

https://github.com/fallahn/tmxlite/blob/master/tmxlite/src/TileLayer.cpp#L264

I should add that I didn't write the flag decoding part of the code, it was submitted by a user some time (many years) ago, so until I have time to investigate further I don't know for sure how it works. There could be something else down the line (in tmxlite) which is providing your erronous result. When I have more time I shall investigate further. If you could provide a means of reproducing your problem, such as details of your map file or even a minimal map file which exhibits the error, that would also be a great help, thanks!

from tmxlite.

fallahn avatar fallahn commented on July 26, 2024

My apologies, I misread 'Object' as being 'Tile'. Object flags were indeed not being parsed, but it's fixed now!

from tmxlite.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.