- Upgraded ambient sound source to rounded rectangule dimension
[supertux.git] / src / title.cpp
index 3ae54f6..255b38d 100644 (file)
 
 static Surface* bkg_title;
 static Surface* logo;
-static Surface* img_choose_subset;
+//static Surface* img_choose_subset;
 
 static bool walking;
-static Timer2 random_timer;
+static Timer random_timer;
 
 static int frame;
 
@@ -246,10 +246,10 @@ void draw_demo(float elapsed_time)
   controller->press(Controller::RIGHT);
   
   if(random_timer.check() || 
-      (walking && (int) last_tux_x_pos == (int) tux->get_pos().x)) {
+      (walking && fabsf(last_tux_x_pos - tux->get_pos().x)) < .1) {
     walking = false;
   } else {
-      if(!walking && (int) tux->get_pos().y == (int) last_tux_y_pos) {
+      if(!walking && fabsf(tux->get_pos().y - last_tux_y_pos) < .1) {
         random_timer.start(float(rand() % 3000 + 3000) / 1000.);
         walking = true;
       }
@@ -265,7 +265,7 @@ void draw_demo(float elapsed_time)
     sector->camera->reset(tux->get_pos());
   }
 
-  sector->action(elapsed_time);
+  sector->update(elapsed_time);
   sector->draw(*titlesession->context);
 }
 
@@ -282,8 +282,8 @@ void title()
 
   /* Load images: */
   bkg_title = new Surface(datadir + "/images/background/arctis.jpg", false);
-  logo = new Surface(datadir + "/images/title/logo.png", true);
-  img_choose_subset = new Surface(datadir + "/images/status/choose-level-subset.png", true);
+  logo = new Surface(datadir + "/images/engine/menu/logo.png", true);
+  //img_choose_subset = new Surface(datadir + "/images/status/choose-level-subset.png", true);
 
   titlesession->get_current_sector()->activate("main");
   titlesession->set_current();
@@ -338,7 +338,7 @@ void title()
               Vector(0, SCREEN_HEIGHT - 50), LEFT_ALLIGN, LAYER_FOREGROUND1);
       context.draw_text(white_small_text,
         _(
-"Copyright (c) 2003 SuperTux Devel Team\n"
+"Copyright (c) 2005 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"
         ),
@@ -350,7 +350,7 @@ void title()
       if(menu)
         {
           menu->draw(context);
-          menu->action();
+          menu->update();
          
           if(menu == main_menu)
             {
@@ -448,5 +448,5 @@ void title()
   delete titlesession;
   delete bkg_title;
   delete logo;
-  delete img_choose_subset;
+  //delete img_choose_subset;
 }