a few fixes that I had lying around here, select walk animation in worldmap when...
[supertux.git] / src / title.cpp
index 266b28b..94ccc5a 100644 (file)
@@ -59,6 +59,7 @@
 #include "control/joystickkeyboardcontroller.hpp"
 #include "control/codecontroller.hpp"
 #include "main.hpp"
+#include "exceptions.hpp"
 
 static Surface* bkg_title;
 static Surface* logo;
@@ -285,9 +286,9 @@ void title()
   titlesession = new GameSession("levels/misc/menu.stl", ST_GL_DEMO_GAME);
 
   /* Load images: */
-  bkg_title = new Surface("images/background/arctis.jpg", false);
-  logo = new Surface("images/engine/menu/logo.png", true);
-  //img_choose_subset = new Surface("images/status/choose-level-subset.png", true);
+  bkg_title = new Surface("images/background/arctis.jpg");
+  logo = new Surface("images/engine/menu/logo.png");
+  //img_choose_subset = new Surface("images/status/choose-level-subset.png");
 
   titlesession->get_current_sector()->activate("main");
   titlesession->set_current();
@@ -328,21 +329,21 @@ void title()
         }
         main_controller->process_event(event);
         if (event.type == SDL_QUIT)
-          throw std::runtime_error("Received window close");
+          throw graceful_shutdown();
       }
   
       /* Draw the background: */
       draw_demo(elapsed_time);
 
       if (Menu::current() == main_menu)
-        context.draw_surface(logo, Vector(SCREEN_WIDTH/2 - logo->w/2, 30),
+        context.draw_surface(logo, Vector(SCREEN_WIDTH/2 - logo->get_width()/2, 30),
             LAYER_FOREGROUND1+1);
 
       context.draw_text(white_small_text, " SuperTux " PACKAGE_VERSION "\n",
               Vector(0, SCREEN_HEIGHT - 50), LEFT_ALLIGN, LAYER_FOREGROUND1);
       context.draw_text(white_small_text,
         _(
-"Copyright (c) 2005 SuperTux Devel Team\n"
+"Copyright (c) 2006 SuperTux Devel Team\n"
 "This game comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to\n"
 "redistribute it under certain conditions; see the file COPYING for details.\n"
         ),