src/util/main.c
changeset 34 a387bc77ad52
parent 26 72fd5ba8d8c1
child 52 148a120ea7d5
--- a/src/util/main.c	Wed Jan 06 16:05:02 2010 +0200
+++ b/src/util/main.c	Wed Jan 06 16:23:35 2010 +0200
@@ -19,6 +19,7 @@
     { "height",         true,   NULL,   'H' },
     { "x",              true,   NULL,   'x' },
     { "y",              true,   NULL,   'y' },
+    { "zoom",           true,   NULL,   'z' },
     { "threads",        true,   NULL,   'j' },
     { 0,                0,      0,      0   }
 };
@@ -41,6 +42,7 @@
         "\t-H, --height         set tile height\n"
         "\t-x, --x              set tile x offset\n"
         "\t-y, --y              set tile z offset\n"
+        "\t-z, --zoom           set zoom factor (<0)\n"
         "\t-j, --threads        number of threads\n"
     );
 }
@@ -49,12 +51,12 @@
 {
     int opt;
     bool force_update = false;
-    struct pt_tile_info ti = {0, 0, 0, 0};
+    struct pt_tile_info ti = {0, 0, 0, 0, 0};
     int threads = 2;
     int tmp, err;
     
     // parse arguments
-    while ((opt = getopt_long(argc, argv, "hqvDUW:H:x:y:j:", options, NULL)) != -1) {
+    while ((opt = getopt_long(argc, argv, "hqvDUW:H:x:y:z:j:", options, NULL)) != -1) {
         switch (opt) {
             case 'h':
                 // display help
@@ -93,6 +95,9 @@
             case 'y':
                 ti.y = strtol(optarg, NULL, 0); break;
 
+            case 'z':
+                ti.zoom = strtol(optarg, NULL, 0); break;
+
             case 'j':
                 if ((tmp = strtol(optarg, NULL, 0)) < 1)
                     FATAL("Invalid value for -j/--threads");