libtiled-java cannot write external tile source image #370

Open
devnewton opened this Issue Feb 20, 2013 · 3 comments

Projects

None yet

2 participants

@devnewton

The TmxMapWriter class does not write the image source of a tile.

   private void writeTile(Tile tile, XMLWriter w) throws IOException {
        w.startElement("tile");
        w.writeAttribute("id", tile.getId());

        writeProperties(tile.getProperties(), w);

        if (tile instanceof AnimatedTile)
            writeAnimation(((AnimatedTile)tile).getSprite(), w);

        w.endElement();
    }
@bjorn
Owner

Right, I have removed that code at some point because per-tile external source images were anyway not supported by Tiled Qt. Support for such tiles has been added to Tiled Qt as of version 0.9.0, but still you can't create such tilesets using the UI.

If you need this functionality you may want to add it back. Compare it with:
https://github.com/bjorn/tiled-java/blob/master/src/tiled/io/xml/XMLMapWriter.java#L528

The prefs variable refers to the Tiled Java preferences, which of course can't be relied upon anymore. Might make sense to reintroduce some of those options as TmxMapWriter properties.

@devnewton
@bjorn
Owner

No worries, good luck with that! This issue will be a reminder to either of us not to forget about it later. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment