Fixed some TODO-list bugs.
authorTobias Gläßer <tobi.web@gmx.de>
Mon, 10 May 2004 19:06:03 +0000 (19:06 +0000)
committerTobias Gläßer <tobi.web@gmx.de>
Mon, 10 May 2004 19:06:03 +0000 (19:06 +0000)
SVN-Revision: 1079

src/gameloop.cpp
src/level.cpp
src/leveleditor.cpp
src/player.cpp
src/world.cpp

index fb3e557..6ea6f4a 100644 (file)
@@ -424,6 +424,7 @@ GameSession::check_end_conditions()
       last_x_pos = -1;
       music_manager->play_music(level_end_song, 0);
       endsequence_timer.start(7000);
+      tux->invincible_timer.start(7000); //FIXME: Implement a winning timer for the end sequence (with special winning animation etc.)
     }
   else if(end_sequence && !endsequence_timer.check())
     {
@@ -440,11 +441,11 @@ GameSession::check_end_conditions()
       last_x_pos = -1;
       music_manager->play_music(level_end_song, 0);
       endsequence_timer.start(7000); // 5 seconds until we finish the map
+      tux->invincible_timer.start(7000); //FIXME: Implement a winning timer for the end sequence (with special winning animation etc.)
     }
   else if (!end_sequence && tux->is_dead())
     {
       player_status.bonus = PlayerStatus::NO_BONUS;
-      player_status.lives -= 1;             
 
       if (player_status.lives < 0)
         { // No more lives!?
index 8ba49b1..1a2866a 100644 (file)
@@ -238,7 +238,7 @@ Level::init_defaults()
   gravity    = 10.;
   back_scrolling = false;
   hor_autoscroll_speed = 0;
-  bkgd_speed = 2;
+  bkgd_speed = 50;
   bkgd_top.red   = 0;
   bkgd_top.green = 0;
   bkgd_top.blue  = 0;
@@ -320,7 +320,7 @@ Level::load(const std::string& filename)
       hor_autoscroll_speed = 0;
       reader.read_float("hor_autoscroll_speed",  &hor_autoscroll_speed);
       
-      bkgd_speed = 2;
+      bkgd_speed = 50;
       reader.read_int("bkgd_speed",  &bkgd_speed);
 
       
index f258f72..6f8dc3f 100644 (file)
@@ -911,7 +911,7 @@ void le_drawlevel()
   /* Draw the real background */
   if(le_world->get_level()->bkgd_image[0] != '\0')
   {
-    s = (int)((float)pos_x * ((float)le_world->get_level()->bkgd_speed/60.)) % screen->w;
+    s = (int)((float)pos_x * ((float)le_world->get_level()->bkgd_speed/100.0f)) % screen->w;
     le_world->get_level()->img_bkgd->draw_part(s,0,0,0,
         le_world->get_level()->img_bkgd->w - s - 32, le_world->get_level()->img_bkgd->h);
     le_world->get_level()->img_bkgd->draw_part(0,0,screen->w - s - 32 ,0,s,
index 25e1440..3e8bde0 100644 (file)
@@ -709,6 +709,8 @@ Player::kill(HurtMode mode)
       physic.enable_gravity(true);
       physic.set_acceleration(0, 0);
       physic.set_velocity(0, 7);
+      if(dying != DYING_SQUISHED)
+      --player_status.lives;
       dying = DYING_SQUISHED;
     }
 }
index a09c771..b1ad31f 100644 (file)
@@ -180,7 +180,7 @@ World::draw()
   /* Draw the real background */
   if(level->img_bkgd)
     {
-      int s = (int)((float)scroll_x * ((float)level->bkgd_speed/60.)) % screen->w;
+      int s = (int)((float)scroll_x * ((float)level->bkgd_speed/100.0f)) % screen->w;
       level->img_bkgd->draw_part(s, 0,0,0,level->img_bkgd->w - s, level->img_bkgd->h);
       level->img_bkgd->draw_part(0, 0,screen->w - s ,0,s,level->img_bkgd->h);
     }