bjorn/tiled — pull request #261 by encukou (2012-08-14 16:33:43+00:00)
Title: Embedded images & tilesets with individual tiles

This adds basic support for images embedded in the XML file, and tilesets where each tile is backed by an individual image.

No UI is added for creating such tilesets, and the way they're displayed in the dock leaves much to be desired, especially if tiles are of different sizes.

To be honest, the patch is more about adding this to the TMX format rather than the GUI :) Here are the format changes:

- Instead of ``, you can say `...`.
- Individual tiles may contain image tags. These override any image the tile would get from a tileset-wide ("tilesheet") image.
- The tileset may leave "tilewidth" and "tileheight" unspecified *if* it is not using an external image.
- Tags for individual tiles that aren't loaded from the "tilesheet" image must be ordered by their IDs. There may be no gaps. If there's no tileset timage, the first tile must have ID 0.

This means there's a couple of options for the TMX layout:
1. Tileset with external image (what Tiled does now)
2. Tileset with embedded "tilesheet" image
3. Tiles with individual external images
4. Tiles with individual embedded images (these patches add save support for this)
5. Tileset with both an "tilesheet" image and individual tile images (individual images override the tilesheet)

With these patches, Tiled should be able to read all of these, but it will only save the first or fourth. It will only save base64-encoded PNGs.
The editor will always set a tileset's "tilewidth" and "tileheight" to the largest of the individual tiles.

Helps with #103