-
Notifications
You must be signed in to change notification settings - Fork 52
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
Added support for reading tile properties. #5
Conversation
Hi @adtennant, Thank you for your contribution. My feedback on your pull request: Rename _tmx_tile_props → _tmx_tile (tmx_tile_props → tmx_tile)As you can see in the TMX file format page, section If you agree with me, don't forget to rename the alloc, free, json and xml functions too. Otherwise, everything looks good to me. |
} else { | ||
/* Unknow element, skipping it's tree */ | ||
if (xmlTextReaderNext(reader) != 1) return 0; | ||
printf("skipped %s\n", name); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this line.
@baylej Thanks for the feedback, I'll make the changes sometime later this week. I missed the line in the documentation that mentioned it could also contain an image or objectgroup. So far I've only implemented what I need for my current project, but if someone else doesn't get around to it I'm sure when I have the time I will add the other features. |
@@ -129,6 +136,8 @@ void tmx_map_free(tmx_map *map); | |||
of the tile associated with this gid, returns NULL if it fails */ | |||
tmx_tileset* tmx_get_tile(tmx_map *map, unsigned int gid, unsigned int *x, unsigned int *y); | |||
|
|||
tmx_tile_prop* tmx_get_tile_props(tmx_map *map, unsigned int gid); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a comment to describe what the function does.
@baylej The last commit should incorporate all of your feedback. |
Added support for reading tile properties.
Add support for reading tile properties from the tileset for both XML and JSON.