diff options
author | Eugenio Favalli <elvenprogrammer@gmail.com> | 2005-04-11 19:47:17 +0000 |
---|---|---|
committer | Eugenio Favalli <elvenprogrammer@gmail.com> | 2005-04-11 19:47:17 +0000 |
commit | 160e544a794dfc35e37d3790d606b76c0acb8b0e (patch) | |
tree | f4b7e07482271bf638b053b6f1afaf2aeec1ee5d /src/game.cpp | |
parent | ceaae48958dd674e5aac67606de183bb6b0ac36e (diff) | |
download | mana-160e544a794dfc35e37d3790d606b76c0acb8b0e.tar.gz mana-160e544a794dfc35e37d3790d606b76c0acb8b0e.tar.bz2 mana-160e544a794dfc35e37d3790d606b76c0acb8b0e.tar.xz mana-160e544a794dfc35e37d3790d606b76c0acb8b0e.zip |
Improving sound engine (now it loads samples through resource manager)
and support music fading (still somthing to fix)
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 15 |
1 files changed, 5 insertions, 10 deletions
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"); } } |