Project

General

Profile

Statistics
| Revision:

root / branches / simulator / projects / simulator / simulator / core / main.c @ 988

History | View | Annotate | Download (496 Bytes)

1 988 bcoltin
/**
2
 * @file main.c
3
 * @author Colony Project
4
 * @brief Initializes the program.
5
 *
6
 * Contains only the main function, which
7
 * initializes the program.
8
 **/
9
10
#include <stdlib.h>
11 981 bneuman
#include <stdio.h>
12 973 bcoltin
13 988 bcoltin
#include "gtk_gui.h"
14
#include "robot.h"
15 981 bneuman
16 988 bcoltin
int main(int argc, char** argv)
17 984 ayeager
{
18 988 bcoltin
        if (robots_initialize())
19
                return -1;
20 984 ayeager
21 988 bcoltin
        if(argc<=1){
22
                printf("Usage: simulator <robot execetuable>\n");
23
                exit(-1);
24
        }
25
        robot_create(argv[1]);
26 981 bneuman
27 988 bcoltin
        printf("returned to parent\n");
28 981 bneuman
29 988 bcoltin
        gtk_gui_run(argc, argv);
30 981 bneuman
31 988 bcoltin
        return 0;
32 981 bneuman
}