-
Notifications
You must be signed in to change notification settings - Fork 62
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
Are .tsx resources supported? #1
Comments
I didn't see a fix posted for this, so I wrote one myself. I changed the code in Tmx::Tileset::Parse() to this: Please let me know if you have any issues, I tested it out with both external and normal tilesets but it's always possible I made a mistake. :) |
@mwhiter want to turn this into a pull request? I'll merge it. |
@andrewrk I'm having trouble cloning my fork onto my computer, so you'll have to wait on that. Github just doesn't want to do it right now. I'll try again sometime this week and keep you updated. But yeah that's fine. As I commented in the code, I highly recommend that we have access to the maps directory (where the map .tmx is stored) in a string variable that's easy to access. Because the tileset source attribute only refers to the url in relation to that directory, it needs to find that. I did it manually in my code, but that's not pretty. If that's too much of a problem I'll see about writing it myself. This is just a fix to get it working (assuming your .tmx is in "../maps". |
I haven't yet gone over all this code for quality checking, so I'm sure that there is some weird stuff going on here, such as the maps thing you just mentioned. By all means if you make any improvements, let's merge them in. I'd like this to be a community-maintained project. |
Okay, I fixed the clone issue and got the repo on my desktop. Submitted a pull request. That's just a phase 1 fix. I'm sure it could be cleaned up better. Let me know if any issues arise. edit: also above I said it's not pretty. No, I mean it's wrong, because everyone's map folder might be in a different directory. I remember a different library had the user load the filepath of the .tmx file and it stored it in a variable. That seems much more elegant. |
https://code.google.com/p/tmx-parser/issues/detail?id=5
What steps will reproduce the problem?
What is the expected output? What do you see instead?
Are map files that link to external .tsx tileset resources supported? When I use these, the parser causes a crash. When I just move the resources from the .tsx file back into the .tmx file, everything works correctly.
Thanks,
Fritz
The text was updated successfully, but these errors were encountered: