diff options
author | Alexander Baldeck <alexander@archlinux.org> | 2004-12-29 12:29:58 +0000 |
---|---|---|
committer | Alexander Baldeck <alexander@archlinux.org> | 2004-12-29 12:29:58 +0000 |
commit | 8fe800f7afa25e052c387b8a1a7ad6d46f38d916 (patch) | |
tree | ca0f0bf3ef5f556caa3b82f77b9691680182c799 /src/game.cpp | |
parent | ff208227c9dcda7a8279acc8ee43fa28ea284478 (diff) | |
download | mana-8fe800f7afa25e052c387b8a1a7ad6d46f38d916.tar.gz mana-8fe800f7afa25e052c387b8a1a7ad6d46f38d916.tar.bz2 mana-8fe800f7afa25e052c387b8a1a7ad6d46f38d916.tar.xz mana-8fe800f7afa25e052c387b8a1a7ad6d46f38d916.zip |
- ported sound engine to SDL_Mixer
- name change from TmwSound to Sound as required by HACKING.txt
- slight modification of other files using it due to interface changes
- minor speedups in Configuration
- makefile.static modfified to link against SDL
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/game.cpp b/src/game.cpp index 21c5aa3a..8e8c8036 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -40,7 +40,7 @@ char map_path[480]; -extern TmwSound sound; +extern Sound sound; unsigned short dest_x, dest_y, src_x, src_y; unsigned int player_x, player_y; @@ -121,7 +121,7 @@ void do_init() { error("Could not find map file"); } - sound.StartMOD("./data/sound/Mods/somemp.xm", -1); + sound.startBgm("./data/sound/Mods/somemp.xm", -1); // Initialize timers tick_time = 0; @@ -228,9 +228,9 @@ void do_input() { if (key[KEY_F1]) { save_bitmap("./data/graphic/screenshot.bmp", buffer, NULL); } else if (key[KEY_F12]){ - sound.SetAdjVol( 1, 1, 1); + sound.adjustVolume(1); } else if (key[KEY_F11]){ - sound.SetAdjVol(-1,-1,-1); + sound.adjustVolume(-1); } if (key[KEY_F5] && action_time) { if (player_node->action == STAND) @@ -707,7 +707,9 @@ void do_parse() { // Level up case 0x019b: if(RFIFOL(2)==player_node->id) { - sound.StartWAV("./data/sound/wavs/level.wav", 10); + SOUND_SID sound_id = sound.loadItem("./data/sound/wavs/level.wav"); + sound.startItem(sound_id, 64); + sound.clearCache(); } break; // Emotion |