2010-09-24 02:13:48 +03:00
|
|
|
/*
|
|
|
|
* solidify.c - Merge two opposing faces of a part into a solid
|
|
|
|
*
|
|
|
|
* Written 2010 by Werner Almesberger
|
|
|
|
* Copyright 2010 Werner Almesberger
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2010-09-22 23:04:43 +03:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <locale.h>
|
|
|
|
#include <gtk/gtk.h>
|
|
|
|
|
|
|
|
#include "face.h"
|
|
|
|
#include "level.h"
|
|
|
|
|
|
|
|
|
|
|
|
static void usage(const char *name)
|
|
|
|
{
|
|
|
|
fprintf(stderr, "usage: %s top XXXbottomXXX\n", name);
|
|
|
|
exit(1);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
int main(int argc, char **argv)
|
|
|
|
{
|
|
|
|
struct face *top;
|
|
|
|
|
|
|
|
gtk_init(&argc, &argv);
|
|
|
|
switch (argc) {
|
|
|
|
case 2:
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
usage(*argv);
|
|
|
|
}
|
|
|
|
setlocale(LC_ALL, "C"); /* damage control */
|
|
|
|
top = read_face(argv[1]);
|
|
|
|
level(top);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|