this.convertObjectToTileSpace = parameters.convertObjectToTileSpace;
FileHandle tmxFile = resolve(fileName);
root = xml.parse(tmxFile);
ObjectMap<String, Texture> textures = new ObjectMap<String, Texture>();
for (FileHandle textureFile : loadTilesets(root, tmxFile)) {
Texture texture = new Texture(textureFile, parameters.generateMipMaps);
texture.setFilter(parameters.textureMinFilter, parameters.textureMagFilter);
textures.put(textureFile.path(), texture);
}
DirectImageResolver imageResolver = new DirectImageResolver(textures);
TiledMap map = loadTilemap(root, tmxFile, imageResolver);
map.setOwnedResources(textures.values().toArray());