- more c++-ification
[supertux.git] / src / supertux.cpp
1 /*
2   supertux.c
3   
4   Super Tux
5   
6   by Bill Kendrick & Tobias Glaesser <tobi.web@gmx.de>
7   bill@newbreedsoftware.com
8   http://www.newbreedsoftware.com/supertux/
9   
10   April 11, 2000 - March 15, 2004
11 */
12
13 #include "supertux.h"
14
15
16 /* --- MAIN --- */
17
18 int main(int argc, char * argv[])
19 {
20   int done;
21   
22   st_directory_setup();
23   parseargs(argc, argv);
24   
25   st_audio_setup();
26   st_video_setup();
27   st_joystick_setup();
28   st_general_setup();
29   st_menu();
30
31   if (launch_worldmap_mode)
32     {
33       worldmap_run();
34     }
35   else if (level_startup_file)
36     {
37       gameloop(level_startup_file, 1, ST_GL_LOAD_LEVEL_FILE);
38     }
39   else
40     {  
41       done = 0;
42   
43       while (!done)
44         {
45           done = title();
46         }
47     }
48   
49   clearscreen(0, 0, 0);
50   updatescreen();
51
52   st_shutdown();
53   
54   return(0);
55 }