bool TmxMapWriter::writeTileset(const Tileset *tileset, const QString &fileName) { Preferences *prefs = Preferences::instance(); MapWriter writer; writer.setDtdEnabled(prefs->dtdEnabled()); bool result = writer.writeTileset(tileset, fileName); if (!result) mError = writer.errorString(); else mError.clear(); return result; }
bool TmxMapWriter::write(const Map *map, const QString &fileName) { Preferences *prefs = Preferences::instance(); MapWriter writer; writer.setLayerDataFormat(prefs->layerDataFormat()); writer.setDtdEnabled(prefs->dtdEnabled()); bool result = writer.writeMap(map, fileName); if (!result) mError = writer.errorString(); else mError.clear(); return result; }