Example #1
0
  /**
   * Main process method which executes the program. Returns the appropriate system exit code.
   *
   * @return the system exit code
   */
  int process() {
    printOut("McQuad!");

    if (parsedArgs.showHelp()) return 0;

    long started = System.currentTimeMillis();

    RegionData regionData;
    try {
      regionData = new RegionData().load(parsedArgs.regionDir);
      printOut(regionData);

    } catch (Exception e) {
      printOut(e);
      parsedArgs.printUsage();
      return 1;
    }

    QuadData quad = new QuadData(regionData);
    printOut(quad);
    print(EOL);
    printOut(quad.schematic());

    printOut("Regions to process: " + regionData.regions().size());

    TileRenderer tr = new TileRenderer(quad, parsedArgs.outputDir);
    tr.render();

    long duration = System.currentTimeMillis() - started;
    printOut(EOL + readableDuration(duration));

    done = true;
    printOut("All Done!");
    return 0;
  }
Example #2
0
 /**
  * Main launch point.
  *
  * @param args command line arguments
  */
 public static void main(String[] args) {
   System.exit(new McQuad(ParsedArgs.build(args)).process());
 }