Examples of XMLMapTransformer


Examples of tiled.io.xml.XMLMapTransformer

   * @throws Exception */
  public void convert(final String tmxFile) throws Exception {
    final File file = new File(tmxFile);

    final String filename = file.getAbsolutePath();
    final Map map = new XMLMapTransformer().readMap(filename);
    saveImageMap(map, tmxFile);
  }
View Full Code Here

Examples of tiled.io.xml.XMLMapTransformer

   * @throws Exception */
  public void convert(final String tmxFile) throws Exception {
    final File file = new File(tmxFile);

    final String filename = file.getAbsolutePath();
    final Map map = new XMLMapTransformer().readMap(filename);
    removeUnusedTilesets(map);
    new XMLMapWriter().writeMap(map, filename);
  }
View Full Code Here

Examples of tiled.io.xml.XMLMapTransformer

   */
  private void convert(final String tmxFile) throws Exception {
    final File file = new File(tmxFile);

    final String filename = file.getAbsolutePath();
    final Map map = new XMLMapTransformer().readMap(filename);
    addNewTilesets(map);
    translateMap(map);
    removeUnusedTilesets(map);
    new XMLMapWriter().writeMap(map, filename);
  }
View Full Code Here

Examples of tiled.io.xml.XMLMapTransformer

      }
    }
    /*
     * Reload all the maps
     */
    XMLMapTransformer loader = new XMLMapTransformer();
    File nextMap;
    ServerMap s;
    for(int x = -50; x < 50; x++) {
      for(int y = -50; y < 50; y++) {
        nextMap = new File("res/maps/" + String.valueOf(x) + "." + String.valueOf(y) + ".tmx");
        if(nextMap.exists()) {
          try {
            s = new ServerMap(loader.readMap(nextMap.getCanonicalPath()), x, y);
            s.setMapMatrix(m_mapMatrix);
            s.loadData();
            m_mapMatrix.setMap(s , x + 50, y + 50);
            Thread.sleep(100);
          } catch (Exception e) {
View Full Code Here

Examples of tiled.io.xml.XMLMapTransformer

        Map ret = null;
        try {
            MapReader mr;
            if (file.endsWith(".tmx") || file.endsWith(".tmx.gz")) {
                // Override, so people can't overtake our format
                mr = new XMLMapTransformer();
            } else {
                mr = (MapReader)pluginLoader.getReaderFor(file);
            }

            if (mr != null) {
View Full Code Here

Examples of tiled.io.xml.XMLMapTransformer

        TileSet ret = null;
        try {
            MapReader mr;
            if (file.endsWith(".tsx")) {
                // Override, so people can't overtake our format
                mr = new XMLMapTransformer();
            } else {
                mr = (MapReader)pluginLoader.getReaderFor(file);
            }

            if (mr != null) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.