Update of /cvsroot/super-tux/supertux/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5539/src
Modified Files:
gameloop.cpp world.cpp
Log Message:
fixed musicproblems in endgame and fixed multicoinblock problems (not optimal yet, but I don't want to do a complicated real fix before the release)
Index: world.cpp
===================================================================
RCS file: /cvsroot/super-tux/supertux/src/world.cpp,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -d -r1.48 -r1.49
--- world.cpp 29 Apr 2004 23:23:20 -0000 1.48
+++ world.cpp 2 May 2004 15:51:12 -0000 1.49
@@ -266,15 +266,6 @@
for (unsigned int i = 0; i < broken_bricks.size(); i++)
broken_bricks[i]->action(frame_ratio);
- /* Handle distro counting: */
- if (counting_distros)
- {
- distro_counter--;
-
- if (distro_counter <= 0)
- counting_distros = -1;
- }
-
// Handle all kinds of game objects
for (unsigned int i = 0; i < bouncy_bricks.size(); i++)
bouncy_bricks[i]->action(frame_ratio);
@@ -513,14 +504,22 @@
add_bouncy_distro(((int)(x + 1) / 32) * 32,
(int)(y / 32) * 32);
+ // TODO: don't handle this in a global way but per-tile...
if (!counting_distros)
{
counting_distros = true;
- distro_counter = 50;
+ distro_counter = 5;
+ }
+ else
+ {
+ distro_counter--;
}
if (distro_counter <= 0)
- plevel->change(x, y, TM_IA, tile->next_tile);
+ {
+ counting_distros = false;
+ plevel->change(x, y, TM_IA, tile->next_tile);
+ }
play_sound(sounds[SND_DISTRO], SOUND_CENTER_SPEAKER);
player_status.score = player_status.score + SCORE_DISTRO;
Index: gameloop.cpp
===================================================================
RCS file: /cvsroot/super-tux/supertux/src/gameloop.cpp,v
retrieving revision 1.117
retrieving revision 1.118
diff -u -d -r1.117 -r1.118
--- gameloop.cpp 29 Apr 2004 00:51:21 -0000 1.117
+++ gameloop.cpp 2 May 2004 15:51:12 -0000 1.118
@@ -540,10 +540,6 @@
update_time = last_update_time = st_get_ticks();
- /* Clear screen: */
-// clearscreen(0, 0, 0);
-// updatescreen();
-
// Eat unneeded events
SDL_Event event;
while (SDL_PollEvent(&event)) {}
@@ -619,18 +615,17 @@
world->get_tux()->kill(Player::KILL);
/* Handle music: */
- if(world->get_tux()->invincible_timer.check())
+ if(world->get_tux()->invincible_timer.check() && !end_sequence)
{
- if(world->get_music_type() != HERRING_MUSIC)
- world->play_music(HERRING_MUSIC);
+ world->play_music(HERRING_MUSIC);
}
/* are we low on time ? */
- else if (time_left.get_left() < TIME_WARNING)
+ else if (time_left.get_left() < TIME_WARNING && !end_sequence)
{
world->play_music(HURRYUP_MUSIC);
}
/* or just normal music? */
- else if(world->get_music_type() != LEVEL_MUSIC)
+ else if(world->get_music_type() != LEVEL_MUSIC && !end_sequence)
{
world->play_music(LEVEL_MUSIC);
}
|