[Scummvm-cvs-logs] scummvm master -> 88be409dc3cbab96ade83898a5269364799864bc

johndoe123 benjamin.haisch at t-online.de
Thu Apr 17 23:03:42 CEST 2014


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:
c0d83b0b29 NEVERHOOD: Fix bug #6520: 'NEVERHOOD: buggy sound of the waterfall'
88be409dc3 Merge branch 'master' of github.com:scummvm/scummvm


Commit: c0d83b0b298f1116cb69948107ba867fc73f16df
    https://github.com/scummvm/scummvm/commit/c0d83b0b298f1116cb69948107ba867fc73f16df
Author: johndoe123 (john_doe at techie.com)
Date: 2014-04-17T23:02:25+02:00

Commit Message:
NEVERHOOD: Fix bug #6520: 'NEVERHOOD: buggy sound of the waterfall'

Changed paths:
    engines/neverhood/modules/module2300.cpp
    engines/neverhood/modules/module2300.h
    engines/neverhood/modules/module3000.cpp
    engines/neverhood/modules/module3000.h



diff --git a/engines/neverhood/modules/module2300.cpp b/engines/neverhood/modules/module2300.cpp
index c0edc95..68ae07f 100644
--- a/engines/neverhood/modules/module2300.cpp
+++ b/engines/neverhood/modules/module2300.cpp
@@ -31,14 +31,14 @@ static const uint32 kModule2300SoundList[] = {
 };
 
 Module2300::Module2300(NeverhoodEngine *vm, Module *parentModule, int which)
-	: Module(vm, parentModule), _soundVolume(0) {
+	: Module(vm, parentModule), _waterfallSoundVolume(0) {
 
 	_vm->_soundMan->addSoundList(0x1A214010, kModule2300SoundList);
 	_vm->_soundMan->setSoundListParams(kModule2300SoundList, true, 50, 600, 10, 150);
 
-	_isWallBroken = getGlobalVar(V_WALL_BROKEN) != 0;
+	_isWaterfallRunning = getGlobalVar(V_WALL_BROKEN) != 1;
 
-	if (_isWallBroken) {
+	if (_isWaterfallRunning) {
 		_vm->_soundMan->setSoundVolume(0x90F0D1C3, 0);
 		_vm->_soundMan->playSoundLooping(0x90F0D1C3);
 	} else {
@@ -78,8 +78,8 @@ void Module2300::createScene(int sceneNum, int which) {
 	case 1:
 		_vm->gameState().sceneNum = 1;
 		createNavigationScene(0x004B67E8, which);
-		if (_isWallBroken) {
-			_soundVolume = 15;
+		if (_isWaterfallRunning) {
+			_waterfallSoundVolume = 15;
 			_vm->_soundMan->setSoundVolume(0x90F0D1C3, 15);
 		}
 		break;
@@ -92,10 +92,10 @@ void Module2300::createScene(int sceneNum, int which) {
 		if (getGlobalVar(V_WALL_BROKEN))
 			createNavigationScene(0x004B68F0, which);
 		else {
-			_vm->_soundMan->setSoundVolume(0x90F0D1C3, _soundVolume);
+			_vm->_soundMan->setSoundVolume(0x90F0D1C3, _waterfallSoundVolume);
 			createNavigationScene(0x004B68A8, which);
-			if (_isWallBroken) {
-				_soundVolume = 87;
+			if (_isWaterfallRunning) {
+				_waterfallSoundVolume = 87;
 				_vm->_soundMan->setSoundVolume(0x90F0D1C3, 87);
 			}
 		}
@@ -161,10 +161,10 @@ void Module2300::updateScene() {
 	} else {
 		switch (_sceneNum) {
 		case 1:
-			if (_isWallBroken && navigationScene()->isWalkingForward() && navigationScene()->getNavigationIndex() == 4 &&
+			if (_isWaterfallRunning && navigationScene()->isWalkingForward() && navigationScene()->getNavigationIndex() == 4 &&
 				navigationScene()->getFrameNumber() % 2) {
-				_soundVolume++;
-				_vm->_soundMan->setSoundVolume(0x90F0D1C3, _soundVolume);
+				_waterfallSoundVolume++;
+				_vm->_soundMan->setSoundVolume(0x90F0D1C3, _waterfallSoundVolume);
 			}
 			if (navigationScene()->isWalkingForward() && navigationScene()->getNavigationIndex() == 0 &&
 				navigationScene()->getFrameNumber() == 50) {
@@ -174,9 +174,9 @@ void Module2300::updateScene() {
 			}
 			break;
 		case 3:
-			if (_isWallBroken && navigationScene()->isWalkingForward() && navigationScene()->getFrameNumber() % 2) {
-				_soundVolume--;
-				_vm->_soundMan->setSoundVolume(0x90F0D1C3, _soundVolume);
+			if (_isWaterfallRunning && navigationScene()->isWalkingForward() && navigationScene()->getFrameNumber() % 2) {
+				_waterfallSoundVolume--;
+				_vm->_soundMan->setSoundVolume(0x90F0D1C3, _waterfallSoundVolume);
 			}
 			break;
 		}
diff --git a/engines/neverhood/modules/module2300.h b/engines/neverhood/modules/module2300.h
index 5723598..b5758b0 100644
--- a/engines/neverhood/modules/module2300.h
+++ b/engines/neverhood/modules/module2300.h
@@ -37,8 +37,8 @@ public:
 	virtual ~Module2300();
 protected:
 	int _sceneNum;
-	bool _isWallBroken;
 	int _soundVolume;
+	bool _isWaterfallRunning;
 	void createScene(int sceneNum, int which);
 	void updateScene();
 };
diff --git a/engines/neverhood/modules/module3000.cpp b/engines/neverhood/modules/module3000.cpp
index 59b2df2..d480961 100644
--- a/engines/neverhood/modules/module3000.cpp
+++ b/engines/neverhood/modules/module3000.cpp
@@ -39,7 +39,7 @@ static const uint32 kModule3000SoundList[] = {
 };
 
 Module3000::Module3000(NeverhoodEngine *vm, Module *parentModule, int which)
-	: Module(vm, parentModule), _soundVolume(0) {
+	: Module(vm, parentModule), _waterfallSoundVolume(0) {
 
 	_vm->_soundMan->addSoundList(0x81293110, kModule3000SoundList);
 	_vm->_soundMan->setSoundListParams(kModule3000SoundList, true, 50, 600, 5, 150);
@@ -48,9 +48,9 @@ Module3000::Module3000(NeverhoodEngine *vm, Module *parentModule, int which)
 	_vm->_soundMan->playTwoSounds(0x81293110, 0x40030A51, 0xC862CA15, 0);
 	_vm->_soundMan->playTwoSounds(0x81293110, 0x41861371, 0x43A2507F, 0);
 
-	_isWallBroken = getGlobalVar(V_WALL_BROKEN) != 0;
+	_isWaterfallRunning = getGlobalVar(V_WALL_BROKEN) != 1;
 
-	if (!_isWallBroken) {
+	if (_isWaterfallRunning) {
 		_vm->_soundMan->setSoundVolume(0x90F0D1C3, 0);
 		_vm->_soundMan->playSoundLooping(0x90F0D1C3);
 	}
@@ -78,12 +78,11 @@ void Module3000::createScene(int sceneNum, int which) {
 	static const byte kNavigationTypes06[] = {5};
 	debug(1, "Module3000::createScene(%d, %d)", sceneNum, which);
 	_vm->gameState().sceneNum = sceneNum;
-	_isWallBroken = getGlobalVar(V_WALL_BROKEN) != 0;
 	switch (_vm->gameState().sceneNum) {
 	case 1:
 		if (!getGlobalVar(V_BOLT_DOOR_OPEN)) {
 			createNavigationScene(0x004B7C80, which);
-		} else if (_isWallBroken) {
+		} else if (getGlobalVar(V_WALL_BROKEN)) {
 			createNavigationScene(0x004B7CE0, which);
 		} else {
 			createNavigationScene(0x004B7CB0, which);
@@ -91,11 +90,11 @@ void Module3000::createScene(int sceneNum, int which) {
 		break;
 	case 2:
 		_vm->_soundMan->playTwoSounds(0x81293110, 0x40030A51, 0xC862CA15, 0);
-		if (!_isWallBroken) {
-			_soundVolume = 90;
+		if (_isWaterfallRunning) {
+			_waterfallSoundVolume = 90;
 			_vm->_soundMan->setSoundVolume(0x90F0D1C3, 90);
 		}
-		if (_isWallBroken) {
+		if (getGlobalVar(V_WALL_BROKEN)) {
 			createNavigationScene(0x004B7D58, which);
 		} else {
 			createNavigationScene(0x004B7D10, which);
@@ -104,7 +103,7 @@ void Module3000::createScene(int sceneNum, int which) {
 	case 3:
 		if (getGlobalVar(V_STAIRS_DOWN))
 			createNavigationScene(0x004B7E60, which);
-		else if (_isWallBroken)
+		else if (getGlobalVar(V_WALL_BROKEN))
 			createNavigationScene(0x004B7DA0, which);
 		else
 			createNavigationScene(0x004B7E00, which);
@@ -152,12 +151,12 @@ void Module3000::createScene(int sceneNum, int which) {
 	// NOTE: Newly introduced sceneNums
 	case 1001:
 		if (!getGlobalVar(V_BOLT_DOOR_OPEN))
-			if (_isWallBroken)
+			if (getGlobalVar(V_WALL_BROKEN))
 				createSmackerScene(0x00940021, true, true, false);
 			else
 				createSmackerScene(0x01140021, true, true, false);
 		else
-			if (_isWallBroken)
+			if (getGlobalVar(V_WALL_BROKEN))
 				createSmackerScene(0x001011B1, true, true, false);
 			else
 				createSmackerScene(0x001021B1, true, true, false);
@@ -195,8 +194,8 @@ void Module3000::updateScene() {
 			break;
 		case 2:
 			_vm->_soundMan->playTwoSounds(0x81293110, 0x41861371, 0x43A2507F, 0);
-			if (_isWallBroken) {
-				_soundVolume = 0;
+			if (_isWaterfallRunning) {
+				_waterfallSoundVolume = 0;
 				_vm->_soundMan->setSoundVolume(0x90F0D1C3, 0);
 			}
 			if (_moduleResult == 0) {
@@ -240,7 +239,7 @@ void Module3000::updateScene() {
 			createScene(8, -1);
 			break;
 		case 8:
-			_isWallBroken = getGlobalVar(V_WALL_BROKEN) != 0;
+			_isWaterfallRunning = getGlobalVar(V_WALL_BROKEN) != 1;
 			if (_moduleResult != 1) {
 				_vm->_soundMan->setSoundListParams(kModule3000SoundList, true, 0, 0, 0, 0);
 				createScene(4, 1);
@@ -301,12 +300,12 @@ void Module3000::updateScene() {
 					} else if (frameNumber == 10) {
 						_vm->_soundMan->playTwoSounds(0x81293110, 0x40030A51, 0xC862CA15, 0);
 					}
-					if (!_isWallBroken && _soundVolume < 90 && frameNumber % 2) {
+					if (_isWaterfallRunning && _waterfallSoundVolume < 90 && frameNumber % 2) {
 						if (frameNumber == 0)
-							_soundVolume = 40;
+							_waterfallSoundVolume = 40;
 						else
-							_soundVolume++;
-						_vm->_soundMan->setSoundVolume(0x90F0D1C3, _soundVolume);
+							_waterfallSoundVolume++;
+						_vm->_soundMan->setSoundVolume(0x90F0D1C3, _waterfallSoundVolume);
 					}
 				}
 			}
@@ -315,9 +314,9 @@ void Module3000::updateScene() {
 			if (navigationScene()->isWalkingForward()) {
 				uint32 frameNumber = navigationScene()->getFrameNumber();
 				int navigationIndex = navigationScene()->getNavigationIndex();
-				if (!_isWallBroken && _soundVolume > 1 && frameNumber % 2) {
-					_soundVolume--;
-					_vm->_soundMan->setSoundVolume(0x90F0D1C3, _soundVolume);
+				if (_isWaterfallRunning && _waterfallSoundVolume > 1 && frameNumber % 2) {
+					_waterfallSoundVolume--;
+					_vm->_soundMan->setSoundVolume(0x90F0D1C3, _waterfallSoundVolume);
 				}
 				if (navigationIndex == 0) {
 					if (frameNumber == 35) {
@@ -340,12 +339,12 @@ void Module3000::updateScene() {
 					if (frameNumber == 40) {
 						_vm->_soundMan->playTwoSounds(0x81293110, 0x40030A51, 0xC862CA15, 0);
 					}
-					if (!_isWallBroken && _soundVolume < 90 && frameNumber % 2) {
+					if (_isWaterfallRunning && _waterfallSoundVolume < 90 && frameNumber % 2) {
 						if (frameNumber == 0)
-							_soundVolume = 40;
+							_waterfallSoundVolume = 40;
 						else
-							_soundVolume++;
-						_vm->_soundMan->setSoundVolume(0x90F0D1C3, _soundVolume);
+							_waterfallSoundVolume++;
+						_vm->_soundMan->setSoundVolume(0x90F0D1C3, _waterfallSoundVolume);
 					}
 				}
 			}
diff --git a/engines/neverhood/modules/module3000.h b/engines/neverhood/modules/module3000.h
index e5c251f..3d895b8 100644
--- a/engines/neverhood/modules/module3000.h
+++ b/engines/neverhood/modules/module3000.h
@@ -34,8 +34,8 @@ public:
 	Module3000(NeverhoodEngine *vm, Module *parentModule, int which);
 	virtual ~Module3000();
 protected:
-	int _soundVolume;
-	bool _isWallBroken;
+	int _waterfallSoundVolume;
+	bool _isWaterfallRunning;
 	void createScene(int sceneNum, int which);
 	void updateScene();
 };


Commit: 88be409dc3cbab96ade83898a5269364799864bc
    https://github.com/scummvm/scummvm/commit/88be409dc3cbab96ade83898a5269364799864bc
Author: johndoe123 (john_doe at techie.com)
Date: 2014-04-17T23:03:05+02:00

Commit Message:
Merge branch 'master' of github.com:scummvm/scummvm

Changed paths:
    engines/fullpipe/modal.cpp









More information about the Scummvm-git-logs mailing list