summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorEugenio Favalli <elvenprogrammer@gmail.com>2005-04-10 14:16:58 +0000
committerEugenio Favalli <elvenprogrammer@gmail.com>2005-04-10 14:16:58 +0000
commit26d50af0fb1b07e662978f7c341a3c2548074840 (patch)
tree548619f2a360bcef9227bbde4aa1592128a48e53 /src/game.cpp
parentb42e9e23fd6fe4819d34f04124ba66eca6a6c020 (diff)
downloadmana-26d50af0fb1b07e662978f7c341a3c2548074840.tar.gz
mana-26d50af0fb1b07e662978f7c341a3c2548074840.tar.bz2
mana-26d50af0fb1b07e662978f7c341a3c2548074840.tar.xz
mana-26d50af0fb1b07e662978f7c341a3c2548074840.zip
Resource manager can now load sfx and music as samples.
(added a new sfx to test the sound engine)
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 8f211ff5..2b63c023 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -224,8 +224,12 @@ void do_input()
}
else if ((keysym.sym == SDLK_F7))
{
- SOUND_SID id = sound.loadItem("data/sfx/bow_shoot_1.ogg");
- sound.startItem(id, 70);
+ /*SOUND_SID id = sound.loadItem("data/sfx/fist-swish.ogg");
+ sound.startItem(id, 120);*/
+ ResourceManager *resman = ResourceManager::getInstance();
+ SoundEffect *sample = resman->getSoundEffect(
+ "sfx/fist-swish.ogg");
+ sample->play(0, 120);
}
// Emotions, Skill dialog
@@ -371,7 +375,10 @@ void do_input()
}
*/
}
- }
+
+
+
+ }
}
else if (event.type == SDL_QUIT)
{