Fix incubator island, fix level in bonus island 2
[supertux.git] / src / supertux / main.cpp
index c7efd55..17571a3 100644 (file)
@@ -191,9 +191,9 @@ public:
     {
       std::string physfs_userdir = PHYSFS_getUserDir();
 #ifdef _WIN32
-      userdir = FileSystem::join(physfs_userdir, "." PACKAGE_NAME);
-#else
       userdir = FileSystem::join(physfs_userdir, PACKAGE_NAME);
+#else
+      userdir = FileSystem::join(physfs_userdir, "." PACKAGE_NAME);
 #endif
     }
 
@@ -217,11 +217,12 @@ public:
   void print_search_path()
   {
     const char* writedir = PHYSFS_getWriteDir();
-    log_info << "PhysfsWritedDir: " << (writedir || "<null>") << std::endl;
+    log_info << "PhysfsWritedDir: " << (writedir ? writedir : "(null)") << std::endl;
+    log_info << "PhysfsSearchPath:" << std::endl;
     char** searchpath = PHYSFS_getSearchPath();
     for(char** i = searchpath; *i != NULL; ++i)
     {
-      log_info << "PhysfsSearchPath: " << *i << std::endl;
+      log_info << "  " << *i << std::endl;
     }
     PHYSFS_freeList(searchpath);
   }
@@ -298,6 +299,11 @@ Main::launch_game()
   SDLSubsystem sdl_subsystem;
   ConsoleBuffer console_buffer;
 
+  timelog("audio");
+  SoundManager sound_manager;
+  sound_manager.enable_sound(g_config->sound_enabled);
+  sound_manager.enable_music(g_config->music_enabled);
+
   timelog("controller");
   InputManager input_manager(g_config->keyboard_config, g_config->joystick_config);
 
@@ -305,15 +311,9 @@ Main::launch_game()
 
   timelog("video");
   std::unique_ptr<VideoSystem> video_system = VideoSystem::create(g_config->video);
-  DrawingContext context(video_system->get_renderer(),
-                         video_system->get_lightmap());
+  DrawingContext context(*video_system);
   init_video();
 
-  timelog("audio");
-  SoundManager sound_manager;
-  sound_manager.enable_sound(g_config->sound_enabled);
-  sound_manager.enable_music(g_config->music_enabled);
-
   Console console(console_buffer);
 
   timelog("scripting");
@@ -325,8 +325,7 @@ Main::launch_game()
   Resources resources;
 
   timelog("addons");
-  AddonManager addon_manager(g_config->disabled_addon_filenames);
-  addon_manager.load_addons();
+  AddonManager addon_manager("addons", g_config->addons);
 
   timelog(0);