From 35c6b7570656fa062e243dfd3008a14213b338f5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tobias=20Gl=C3=A4=C3=9Fer?= Date: Mon, 10 May 2004 19:06:03 +0000 Subject: [PATCH] Fixed some TODO-list bugs. SVN-Revision: 1079 --- src/gameloop.cpp | 3 ++- src/level.cpp | 4 ++-- src/leveleditor.cpp | 2 +- src/player.cpp | 2 ++ src/world.cpp | 2 +- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/gameloop.cpp b/src/gameloop.cpp index fb3e55771..6ea6f4a6a 100644 --- a/src/gameloop.cpp +++ b/src/gameloop.cpp @@ -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!? diff --git a/src/level.cpp b/src/level.cpp index 8ba49b1d6..1a2866a93 100644 --- a/src/level.cpp +++ b/src/level.cpp @@ -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); diff --git a/src/leveleditor.cpp b/src/leveleditor.cpp index f258f7243..6f8dc3f7f 100644 --- a/src/leveleditor.cpp +++ b/src/leveleditor.cpp @@ -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, diff --git a/src/player.cpp b/src/player.cpp index 25e144047..3e8bde098 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -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; } } diff --git a/src/world.cpp b/src/world.cpp index a09c771cd..b1ad31f03 100644 --- a/src/world.cpp +++ b/src/world.cpp @@ -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); } -- 2.11.0