introduce a new SoundManager class and merged MusicManager with it. Using this class...
[supertux.git] / src / gameloop.cpp
index 08df481..613d927 100644 (file)
@@ -55,7 +55,6 @@
 #include "resources.h"
 #include "background.h"
 #include "tilemap.h"
-#include "music_manager.h"
 
 GameSession* GameSession::current_ = 0;
 
@@ -145,7 +144,7 @@ GameSession::~GameSession()
 void
 GameSession::levelintro(void)
 {
-  music_manager->halt_music();
+  sound_manager->halt_music();
   
   char str[60];
 
@@ -459,7 +458,7 @@ GameSession::check_end_conditions()
     {
       end_sequence = ENDSEQUENCE_RUNNING;
       last_x_pos = -1;
-      music_manager->play_music(level_end_song, 0);
+      sound_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.)
     }
@@ -689,7 +688,7 @@ void bumpbrick(float x, float y)
   Sector::current()->add_bouncy_brick(Vector(((int)(x + 1) / 32) * 32,
                          (int)(y / 32) * 32));
 
-  play_sound(sounds[SND_BRICK], SOUND_CENTER_SPEAKER);
+  sound_manager->play_sound(sounds[SND_BRICK], Vector(x, y));
 }
 
 /* (Status): */