Please sign in to comment.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhanced sound support (PR #450)
This fork features some enhancements for the sound system. Although my plans initially were more ambitious, this will do for now. Adds sound_file_path option, making the current sound option much easier to use. Moved all the sound code to its own set of files for future expansion (I have some plans). Also, makes it painless to fiddle around with PLAY_SOUND_COMMAND, which previously was in AppHdr.h despite being used in just one function. (UPDATE) Adds multiple cues that can be used in place of typical regular expressions. Some examples are PICKUP, MEMORISE_SPELL, and CHANGE QUIVER. See sound.h for a full list. I intend of expanding this. Very incomplete support for a hold_sound option, which is supposed to pause the game while the sound is playing. This pause is intended to be sequential, delaying the rest of the message until the sound finishes. I have two purposes for this: giving battles a real-time feel, and to highlight those epic victories. This feature doesn't work as intended, so I dropped the in-game documentation for now. (UPDATE) Adds one_SDL_sound_channel. Originally, sound behavior depended on whether you were playing with SDL or using the SOUND_PLAY_COMMAND define; if playing with SDL/Tiles, only one sound would play at once, whereas SOUND_PLAY_COMMAND allowed as many sounds as were necessary. By default, one_SDL_sound_channel is set to false, making it behave as SOUND_PLAY_COMMAND. However, players can restore the old behavior by setting this option to true. (UPDATE) The version screen now tells the user how sounds will be played. (i.e. "Windows Multimedia API," "External command," or "SDL_mixer") Anyway, I know this works as intended on Linux and Cygwin, and I did run crawl -test to double check stuff. UPDATE: I have now verified that it works with Tiles! However, I can't test with Windows, Mac, etc. I may or may not have broken the sound stuff. At worst, some more files need to be included in sound.cc. Finally, the game works as normal when compiled without sound support. I only tested this in Linux, but I'm certain that it should be the same everywhere else. Happy crawling! ~Autofire
- Loading branch information
Showing with 341 additions and 78 deletions.
- +2 −2 crawl-ref/INSTALL.txt
- +1 −0 crawl-ref/docs/keybind.txt
- +28 −1 crawl-ref/docs/options_guide.txt
- +0 −9 crawl-ref/source/AppHdr.h
- +1 −0 crawl-ref/source/MSVC/crawl.vcxproj
- +2 −1 crawl-ref/source/Makefile
- +1 −0 crawl-ref/source/Makefile.obj
- +1 −0 crawl-ref/source/android-project/jni/src/Android.mk
- +1 −0 crawl-ref/source/command-type.h
- +6 −2 crawl-ref/source/command.cc
- +13 −0 crawl-ref/source/delay.cc
- +12 −3 crawl-ref/source/initfile.cc
- +14 −0 crawl-ref/source/item-use.cc
- +9 −0 crawl-ref/source/items.cc
- +1 −0 crawl-ref/source/l-crawl.cc
- +1 −37 crawl-ref/source/libutil.cc
- +0 −4 crawl-ref/source/libutil.h
- +9 −0 crawl-ref/source/main.cc
- +25 −18 crawl-ref/source/message.cc
- +9 −1 crawl-ref/source/options.h
- +5 −0 crawl-ref/source/quiver.cc
- +107 −0 crawl-ref/source/sound.cc
- +86 −0 crawl-ref/source/sound.h
- +5 −0 crawl-ref/source/throw.cc
- +2 −0 crawl-ref/source/windowmanager-sdl.cc
Oops, something went wrong.