packer = new TexturePacker(texturePackerSettings);
for (TiledMapTileSet set : sets.values()) {
String tilesetName = set.getName();
System.out.println("Processing tileset " + tilesetName);
IntArray usedIds = this.settings.stripUnusedTiles ? getUsedIdsBucket(tilesetName, -1) : null;
int tileWidth = set.getProperties().get("tilewidth", Integer.class);
int tileHeight = set.getProperties().get("tileheight", Integer.class);
int firstgid = set.getProperties().get("firstgid", Integer.class);
String imageName = set.getProperties().get("imagesource", String.class);
TileSetLayout layout = new TileSetLayout(firstgid, set, inputDirHandle);
for (int gid = layout.firstgid, i = 0; i < layout.numTiles; gid++, i++) {
if (usedIds != null && !usedIds.contains(gid)) {
System.out.println("Stripped id #" + gid + " from tileset \"" + tilesetName + "\"");
continue;
}
tileLocation = layout.getLocation(gid);