[Scummvm-cvs-logs] scummvm branch-1-8 -> 4b514ceee5ddea6a84c42f539eb269e2cf9b2eec

lordhoto lordhoto at gmail.com
Sat Apr 23 19:17:55 CEST 2016


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:
aefaf011e6 KYRA: (LOL) fix bug #7104 (LOL-CD: mixing sfx and voice mode does not work)
4b514ceee5 KYRA: Initialize variable before usage.


Commit: aefaf011e60b8599762e604f8abd138209ab77f9
    https://github.com/scummvm/scummvm/commit/aefaf011e60b8599762e604f8abd138209ab77f9
Author: athrxx (athrxx at scummvm.org)
Date: 2016-04-23T19:15:10+02:00

Commit Message:
KYRA: (LOL) fix bug #7104 (LOL-CD: mixing sfx and voice mode does not work)

(cherry picked from commit 97a69022fd2cb7314d1ecc9e86b1a7dbc29dca67)

Changed paths:
    engines/kyra/lol.h
    engines/kyra/sound_lol.cpp
    engines/kyra/staticres_lol.cpp



diff --git a/engines/kyra/lol.h b/engines/kyra/lol.h
index e060b30..af58397 100644
--- a/engines/kyra/lol.h
+++ b/engines/kyra/lol.h
@@ -463,6 +463,7 @@ private:
 
 	const uint8 *_musicTrackMap;
 	const uint16 *_ingameSoundIndex;
+	int _ingameSoundIndexSize;
 	const uint8 *_ingameGMSoundIndex;
 	int _ingameGMSoundIndexSize;
 	const uint8 *_ingameMT32SoundIndex;
diff --git a/engines/kyra/sound_lol.cpp b/engines/kyra/sound_lol.cpp
index 8be0cb6..6e7551e 100644
--- a/engines/kyra/sound_lol.cpp
+++ b/engines/kyra/sound_lol.cpp
@@ -161,7 +161,7 @@ void LoLEngine::snd_playSoundEffect(int track, int volume) {
 		return;
 
 	_lastSfxTrack = track;
-	if (track == -1 || track >= _ingameSoundListSize)
+	if (track == -1 || track >= _ingameSoundIndexSize)
 		return;
 
 	volume &= 0xFF;
@@ -216,10 +216,10 @@ bool LoLEngine::snd_processEnvironmentalSoundEffect(int soundId, int block) {
 		for (int i = 3; i > 0; i--) {
 			int dir = calcMonsterDirection(cbl & 0x1F, cbl >> 5, block & 0x1F, block >> 5);
 			cbl = (cbl + blockShiftTable[dir]) & 0x3FF;
-			if (cbl != block) {
-				if (testWallFlag(cbl, 0, 1))
-					_environmentSfxVol >>= 1;
-			}
+			if (cbl == block)
+				break;
+			if (testWallFlag(cbl, 0, 1))
+				_environmentSfxVol >>= 1;
 		}
 	}
 
diff --git a/engines/kyra/staticres_lol.cpp b/engines/kyra/staticres_lol.cpp
index 9a4fc28..c40b4a0 100644
--- a/engines/kyra/staticres_lol.cpp
+++ b/engines/kyra/staticres_lol.cpp
@@ -255,7 +255,7 @@ void LoLEngine::initStaticResource() {
 	int tempSize;
 	_pakFileList = _staticres->loadStrings(kLoLIngamePakFiles, _pakFileListSize);
 	_charDefaults = _staticres->loadCharData(kLoLCharacterDefs, _charDefaultsSize);
-	_ingameSoundIndex = (const uint16 *)_staticres->loadRawData(kLoLIngameSfxIndex, tempSize);
+	_ingameSoundIndex = (const uint16 *)_staticres->loadRawData(kLoLIngameSfxIndex, _ingameSoundIndexSize);
 	_musicTrackMap = _staticres->loadRawData(kLoLMusicTrackMap, tempSize);
 	_ingameGMSoundIndex = _staticres->loadRawData(kLoLIngameGMSfxIndex, _ingameGMSoundIndexSize);
 	_ingameMT32SoundIndex = _staticres->loadRawData(kLoLIngameMT32SfxIndex, _ingameMT32SoundIndexSize);


Commit: 4b514ceee5ddea6a84c42f539eb269e2cf9b2eec
    https://github.com/scummvm/scummvm/commit/4b514ceee5ddea6a84c42f539eb269e2cf9b2eec
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2016-04-23T19:15:15+02:00

Commit Message:
KYRA: Initialize variable before usage.

Thanks to salty-horse for reporting.

(cherry picked from commit 30cae4d12d31f5ca86638e9eaf15d93e3375120c)

Changed paths:
    engines/kyra/kyra_v2.cpp



diff --git a/engines/kyra/kyra_v2.cpp b/engines/kyra/kyra_v2.cpp
index 925dcf7..106420d 100644
--- a/engines/kyra/kyra_v2.cpp
+++ b/engines/kyra/kyra_v2.cpp
@@ -46,6 +46,8 @@ KyraEngine_v2::KyraEngine_v2(OSystem *system, const GameFlags &flags, const Engi
 	memset(&_sceneScriptState, 0, sizeof(_sceneScriptState));
 	memset(&_sceneScriptData, 0, sizeof(_sceneScriptData));
 
+	Common::fill(_sceneSpecialScriptsTimer, ARRAYEND(_sceneSpecialScriptsTimer), 0);
+
 	_animObjects = 0;
 
 	_runFlag = true;






More information about the Scummvm-git-logs mailing list