.stl is the new extension for levels
[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 #ifdef WIN32
19 main(int argc, char * argv[])
20 #else
21 int main(int argc, char * argv[])
22 #endif
23 {
24   int done;
25   
26   parseargs(argc, argv);
27   
28   st_directory_setup();
29   st_audio_setup();
30   st_video_setup();
31   st_joystick_setup();
32   st_general_setup();
33   st_menu();
34
35   if (launch_worldmap_mode)
36     {
37       worldmap_run();
38     }
39   else if (level_startup_file)
40     {
41       gameloop(level_startup_file, 1, ST_GL_LOAD_LEVEL_FILE);
42     }
43   else
44     {  
45       done = intro();
46   
47       done = 0;
48   
49       while (!done)
50         {
51           done = title();
52         }
53     }
54   
55   clearscreen(0, 0, 0);
56   updatescreen();
57
58   st_shutdown();
59   
60   return(0);
61 }