From 160e544a794dfc35e37d3790d606b76c0acb8b0e Mon Sep 17 00:00:00 2001 From: Eugenio Favalli Date: Mon, 11 Apr 2005 19:47:17 +0000 Subject: Improving sound engine (now it loads samples through resource manager) and support music fading (still somthing to fix) --- src/game.cpp | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'src/game.cpp') diff --git a/src/game.cpp b/src/game.cpp index 4ec83d5d..3ddd72a9 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -224,8 +224,8 @@ void do_input() } else if ((keysym.sym == SDLK_F7)) { - SOUND_SID id = sound.loadItem("data/sfx/fist-swish.ogg"); - sound.startItem(id, 120); + SOUND_ID id = sound.loadSfx("data/sfx/fist-swish.ogg"); + sound.playSfx(id); } // Emotions, Skill dialog @@ -373,7 +373,7 @@ void do_input() - } + } } else if (event.type == SDL_QUIT) { @@ -532,13 +532,8 @@ void do_input() player_node->y, player_node->direction); player_node->walk_time = tick_time; - - if (config.getValue("sound", 0) == 1) { // Temp fix - ResourceManager *resman = ResourceManager::getInstance(); - SoundEffect *sample = resman->getSoundEffect( - "sfx/fist-swish.ogg"); - sample->play(0, 120); - } + + sound.playSfx("sfx/fist-swish.ogg"); } } -- cgit v1.2.3-60-g2f50