[Scummvm-git-logs] scummvm master -> cfa89898211fec65c36e163bd0837fe42b0a9b13
yuv422
yuv422 at users.noreply.github.com
Sun Aug 23 13:00:00 UTC 2020
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
a33107ba38 DRAGONS: Don't play sfx if program >= numVags
cfa8989821 DRAGONS: Don't try to load music if msq file is missing.
Commit: a33107ba3873e97402c87902c575fcf30a1edcdf
https://github.com/scummvm/scummvm/commit/a33107ba3873e97402c87902c575fcf30a1edcdf
Author: Eric Fry (yuv422 at users.noreply.github.com)
Date: 2020-08-23T22:59:09+10:00
Commit Message:
DRAGONS: Don't play sfx if program >= numVags
Changed paths:
engines/dragons/vabsound.cpp
diff --git a/engines/dragons/vabsound.cpp b/engines/dragons/vabsound.cpp
index d5b14b32d5..3239a35318 100644
--- a/engines/dragons/vabsound.cpp
+++ b/engines/dragons/vabsound.cpp
@@ -156,13 +156,16 @@ void VabSound::loadToneAttributes(Common::SeekableReadStream *vhData) {
}
int16 VabSound::getVagID(uint16 program, uint16 key) {
- assert(program < _header.numVAG);
-
- for (int i = 0; i < _programAttrs[program].tones; i++) {
- if (_toneAttrs[i].prog == program && _toneAttrs[i].min == key && _toneAttrs[i].max == key) {
- return _toneAttrs[i].vag - 1;
+ if (program < _header.numVAG) {
+ for (int i = 0; i < _programAttrs[program].tones; i++) {
+ if (_toneAttrs[i].prog == program && _toneAttrs[i].min == key && _toneAttrs[i].max == key) {
+ return _toneAttrs[i].vag - 1;
+ }
}
+ } else {
+ warning("program >= _header.numVAG %d %d", program, _header.numVAG);
}
+
return -1;
}
Commit: cfa89898211fec65c36e163bd0837fe42b0a9b13
https://github.com/scummvm/scummvm/commit/cfa89898211fec65c36e163bd0837fe42b0a9b13
Author: Eric Fry (yuv422 at users.noreply.github.com)
Date: 2020-08-23T22:59:09+10:00
Commit Message:
DRAGONS: Don't try to load music if msq file is missing.
Changed paths:
engines/dragons/sound.cpp
diff --git a/engines/dragons/sound.cpp b/engines/dragons/sound.cpp
index 5d9598cfc9..958269c47a 100644
--- a/engines/dragons/sound.cpp
+++ b/engines/dragons/sound.cpp
@@ -526,6 +526,11 @@ void SoundManager::playMusic(int16 song) {
snprintf(filename, 12, "%sz%02d.msq", sceneName, song);
debug(1, "Load music file %s", filename);
+ if (!_bigFileArchive->doesFileExist(filename)) {
+ warning("Could not find music file %s", filename);
+ return;
+ }
+
uint32 dataSize;
byte *seqData = _bigFileArchive->load(filename, dataSize);
Common::MemoryReadStream *seq = new Common::MemoryReadStream(seqData, dataSize, DisposeAfterUse::YES);
More information about the Scummvm-git-logs
mailing list