summaryrefslogtreecommitdiff
path: root/meme/meme.c
diff options
context:
space:
mode:
Diffstat (limited to 'meme/meme.c')
-rw-r--r--meme/meme.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/meme/meme.c b/meme/meme.c
index 4480f3f..2a8d11b 100644
--- a/meme/meme.c
+++ b/meme/meme.c
@@ -15,6 +15,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
+#include <math.h>
#include "time.h"
#include "mesh.h"
@@ -52,6 +53,13 @@ static void slice_out(double x, double y, double z, bool last)
}
+static void overlay_xform(float x, float y, float *res_x, float *res_y)
+{
+ *res_x = round(x * 1000);
+ *res_y = round(y * 1000);
+}
+
+
static void usage(const char *name)
{
fprintf(stderr,
@@ -85,7 +93,8 @@ int main(int argc, char **argv)
fprintf(stderr, "too many overlays\n");
exit(1);
}
- overlays[n_overlays] = overlay_load(optarg);
+ overlays[n_overlays] = overlay_load(optarg,
+ overlay_xform);
n_overlays++;
break;
case 's':