Initial revision
[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 #ifndef NOSOUND
23 #include <SDL_mixer.h>
24 #endif
25
26 #ifdef LINUX
27 #include <pwd.h>
28 #include <sys/types.h>
29 #include <ctype.h>
30 #endif
31
32 #include "defines.h"
33 #include "globals.h"
34 #include "setup.h"
35 #include "intro.h"
36 #include "title.h"
37 #include "gameloop.h"
38 #include "screen.h"
39
40
41 /* --- MAIN --- */
42
43 #ifdef WIN32
44 main(int argc, char * argv[])
45 #else
46 int main(int argc, char * argv[])
47 #endif
48 {
49   int done;
50   
51   parseargs(argc, argv);
52   
53   st_setup();
54   
55   done = intro();
56   
57   while (!done)
58     {
59       done = title();
60       if (!done)
61         done = gameloop();
62     }
63   
64   clearscreen(0, 0, 0);
65   updatescreen();
66   
67   st_shutdown();
68   
69   return(0);
70 }