Huge code merge. This reflects the current status of my rewrite/restructuring. A...
[supertux.git] / src / supertux.c
index 8616f1c..ad86fd6 100644 (file)
@@ -7,23 +7,11 @@
   bill@newbreedsoftware.com
   http://www.newbreedsoftware.com/supertux/
   
-  April 11, 2000 - April 12, 2000
+  April 11, 2000 - December 29, 2003
 */
 
 
-#ifdef LINUX
-#include <pwd.h>
-#include <sys/types.h>
-#include <ctype.h>
-#endif
-
-#include "defines.h"
-#include "globals.h"
-#include "setup.h"
-#include "intro.h"
-#include "title.h"
-#include "gameloop.h"
-#include "screen.h"
+#include "supertux.h"
 
 
 /* --- MAIN --- */
@@ -38,8 +26,12 @@ int main(int argc, char * argv[])
   
   parseargs(argc, argv);
   
-  st_setup();
-  
+  st_directory_setup();
+  st_audio_setup();
+  st_video_setup();
+  st_joystick_setup();
+  st_general_setup();
+    
   done = intro();
   
   done = 0;
@@ -48,7 +40,12 @@ int main(int argc, char * argv[])
     {
       done = title();
       if (!done)
+      {
+      if(game_started)
        done = gameloop();
+      else if(level_editor_started)
+        done = leveleditor(1);
+      }
     }
   
   clearscreen(0, 0, 0);