Update!
Finally, after many months, I've found the time to update this and correct many bugs. Additionally, I have added support for per-tile properties. *cheering and clapping*
New download in first post.
Changelog:
// Recent changelog:
//
// - Now correctly supports "tilesetoffset" attribute (part of fix for loading isos/stags)
// - Fixed loading of Iso and Stag maps (something was checking 0 instead of -1)
// - Added support for per-tile properties (FINALLY!)
// - Fixed many bugs with tmx_GetTileIndex() and tmx_DrawGridTile()
// - Added tmx_GetTileIndexBySpriteFast() which finds a tile index underneath any sprite
// - Added tmx_GetTileIndexBySprite() which finds a tile index by its exact sprite number
// - Fixed many little bugs that didn't show up without extensive testing but caused all sorts of problems
// - Added support for objects with images
There are, however, still bugs.
Known issues:
-
tmx_GetTileIndex and
tmx_GetTileIndexBySpriteFast won't work with Iso or Stag maps; use
tmx_GetTileIndexBySprite instead
- Depending on how AppGameKit works, there may be memory leaks when loading and deleting more than 1 map (loaded images are not deleted in
tmx_DeleteMap)
- Finding tile indices is currently really hacked and could be a
lot better. I want to rewrite how this works so all commands work with all map types
- There are quite a few missing commands, for example, there's no command to set visibility of object layers
//////////////////////////////////////////////////////////////////////
// TODO:
// -- DONE -- Add support for per-tile properties
// Add commands to check for visibility of maps and
// individual layers
// Add support for visibility of layers (as modified within Tiled)
// Add commands for changing layers in realtime (in
// particular, the opacity)
// Add support for Base64 and what-have-you
// Add a command to set starting directory for texture-loading
//
//////////////////////////////////////////////////////////////////////