- Cleanups
[supertux.git] / src / player.cpp
index 624f181..84d2f02 100644 (file)
@@ -24,7 +24,7 @@
 #include "gameloop.h"
 #include "app/globals.h"
 #include "player.h"
-#include "app/defines.h"
+#include "defines.h"
 #include "scene.h"
 #include "tile.h"
 #include "special/sprite.h"
@@ -419,7 +419,7 @@ Player::handle_horizontal_input()
   if(on_ground() && ((vx < 0 && dirsign >0) || (vx>0 && dirsign<0))) {
       if(fabs(vx)>SKID_XM && !skidding_timer.check()) {
           skidding_timer.start(SKID_TIME);
-          sound_manager->play_sound(sounds[SND_SKID]);
+          SoundManager::get()->play_sound(IDToSound(SND_SKID));
           ax *= 2.5;
       } else {
           ax *= 2;
@@ -486,9 +486,9 @@ Player::handle_vertical_input()
       jumping = true;
       can_jump = false;
       if (size == SMALL)
-        sound_manager->play_sound(sounds[SND_JUMP]);
+        SoundManager::get()->play_sound(IDToSound(SND_JUMP));
       else
-        sound_manager->play_sound(sounds[SND_BIGJUMP]);
+        SoundManager::get()->play_sound(IDToSound(SND_BIGJUMP));
     }
   // Let go of jump key
   else if(input.up == UP && jumping && physic.get_velocity_y() > 0)
@@ -681,7 +681,7 @@ Player::grabdistros()
       if(player_status.lives < MAX_LIVES)
         ++player_status.lives;
       /*We want to hear the sound even, if MAX_LIVES is reached*/
-      sound_manager->play_sound(sounds[SND_LIFEUP]);
+      SoundManager::get()->play_sound(IDToSound(SND_LIFEUP));
     }
 }
 
@@ -923,7 +923,7 @@ Player::kill(HurtMode mode)
   if(dying)
     return;
   
-  sound_manager->play_sound(sounds[SND_HURT]);
+  SoundManager::get()->play_sound(IDToSound(SND_HURT));
 
   physic.set_velocity_x(0);