diff options
author | Paweł Kołodziejski | 2003-11-17 22:21:59 +0000 |
---|---|---|
committer | Paweł Kołodziejski | 2003-11-17 22:21:59 +0000 |
commit | 5334ce49a884158c4f228f94a4a8fd05bf9eab12 (patch) | |
tree | 8dec8f1178afd14a3242a9830114c435060cb58e /scumm/sound.cpp | |
parent | a79b7af3e17d7031eea4d2040f883cf618f71976 (diff) | |
download | scummvm-rg350-5334ce49a884158c4f228f94a4a8fd05bf9eab12.tar.gz scummvm-rg350-5334ce49a884158c4f228f94a4a8fd05bf9eab12.tar.bz2 scummvm-rg350-5334ce49a884158c4f228f94a4a8fd05bf9eab12.zip |
added voice support in dig demo
svn-id: r11329
Diffstat (limited to 'scumm/sound.cpp')
-rw-r--r-- | scumm/sound.cpp | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/scumm/sound.cpp b/scumm/sound.cpp index 5f71322d20..e6dd3cd356 100644 --- a/scumm/sound.cpp +++ b/scumm/sound.cpp @@ -509,6 +509,43 @@ void Sound::startTalkSound(uint32 offset, uint32 b, int mode, PlayingSoundHandle int size; byte *sound; + if ((_scumm->_gameId == GID_DIG) && (_scumm->_features & GF_DEMO)) { + char filename[30]; + char roomname[10]; + + if (offset == 1) + strcpy(roomname, "logo"); + else if (offset == 15) + strcpy(roomname, "canyon"); + else if (offset == 17) + strcpy(roomname, "pig"); + else if (offset == 18) + strcpy(roomname, "derelict"); + else if (offset == 19) + strcpy(roomname, "wreck"); + else if (offset == 20) + strcpy(roomname, "grave"); + else if (offset == 23) + strcpy(roomname, "nexus"); + else if (offset == 79) + strcpy(roomname, "newton"); + else { + warning("startTalkSound: dig demo: unknown room number: %d", offset); + return; + } + + sprintf(filename, "audio/%s.%d/%d.voc", roomname, offset, b); + _sfxFile->close(); + _sfxFile->open(filename); + if (!_sfxFile->isOpen()) { + warning("startTalkSound: dig demo: voc file not found: %s", filename); + return; + } + + startSfxSound(_sfxFile, 0, handle); + return; + } + if (_sfxFile->isOpen() == false) { warning("startTalkSound: SFX file is not open"); return; |