Implemented --help and --disable-sound (patch by Duong-Khang NGUYEN <neoneurone@users...
[supertux.git] / src / supertux.c
1 /*
2   supertux.c
3   
4   Super Tux
5   
6   by Bill Kendrick
7   bill@newbreedsoftware.com
8   http://www.newbreedsoftware.com/supertux/
9   
10   April 11, 2000 - April 12, 2000
11 */
12
13
14 #include <stdio.h>
15 #include <stdlib.h>
16 #include <string.h>
17 #include <errno.h>
18 #include <unistd.h>
19 #include <SDL.h>
20 #include <SDL_image.h>
21
22 #ifdef LINUX
23 #include <pwd.h>
24 #include <sys/types.h>
25 #include <ctype.h>
26 #endif
27
28 #include "defines.h"
29 #include "globals.h"
30 #include "setup.h"
31 #include "intro.h"
32 #include "title.h"
33 #include "gameloop.h"
34 #include "screen.h"
35
36
37 /* --- MAIN --- */
38
39 #ifdef WIN32
40 main(int argc, char * argv[])
41 #else
42 int main(int argc, char * argv[])
43 #endif
44 {
45   int done;
46   
47   parseargs(argc, argv);
48   
49   st_setup();
50   
51   done = intro();
52   
53   while (!done)
54     {
55       done = title();
56       if (!done)
57         done = gameloop();
58     }
59   
60   clearscreen(0, 0, 0);
61   updatescreen();
62   
63   st_shutdown();
64   
65   return(0);
66 }