debug-mode featuring backscrolling! Split up of st_setup.
[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 #ifdef LINUX
15 #include <pwd.h>
16 #include <sys/types.h>
17 #include <ctype.h>
18 #endif
19
20 #include "defines.h"
21 #include "globals.h"
22 #include "setup.h"
23 #include "intro.h"
24 #include "title.h"
25 #include "gameloop.h"
26 #include "screen.h"
27
28
29 /* --- MAIN --- */
30
31 #ifdef WIN32
32 main(int argc, char * argv[])
33 #else
34 int main(int argc, char * argv[])
35 #endif
36 {
37   int done;
38   
39   parseargs(argc, argv);
40   
41   st_directory_setup();
42   st_audio_setup();
43   st_video_setup();
44   st_joystick_setup();
45   st_general_setup();
46   
47   done = intro();
48   
49   done = 0;
50   
51   while (!done)
52     {
53       done = title();
54       if (!done)
55         done = gameloop();
56     }
57   
58   clearscreen(0, 0, 0);
59   updatescreen();
60   
61   st_shutdown();
62   
63   return(0);
64 }