[Scummvm-git-logs] scummvm master -> 92dc9737c5a730153370a48060ce8848516f6cae

dreammaster dreammaster at scummvm.org
Sun Dec 17 23:19:02 CET 2017


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:
d413344c8a XEEN: Allow Dwarf Mines cutscene to be interrupted
92dc9737c5 XEEN: Fix placement checks for indoors wall items


Commit: d413344c8a0728e023ea76da2c970bd180177bae
    https://github.com/scummvm/scummvm/commit/d413344c8a0728e023ea76da2c970bd180177bae
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-12-17T16:55:25-05:00

Commit Message:
XEEN: Allow Dwarf Mines cutscene to be interrupted

Because I'm already sick of letting it play all the way through

Changed paths:
    engines/xeen/locations.cpp


diff --git a/engines/xeen/locations.cpp b/engines/xeen/locations.cpp
index 6aa8fbf..e4b1ae2 100644
--- a/engines/xeen/locations.cpp
+++ b/engines/xeen/locations.cpp
@@ -1829,8 +1829,6 @@ int DwarfCutscene::show() {
 
 	// Zoom in on the mine entrance
 	for (int idx = (_isDarkCc ? 10 : 12); idx >= 0; --idx) {
-		if (g_vm->shouldQuit())
-			return 0;
 		events.updateGameCounter();
 
 		screen.blitFrom(savedBg);
@@ -1843,7 +1841,11 @@ int DwarfCutscene::show() {
 				Common::Point(DWARF_X2[idx], DWARF_Y[_isDarkCc][idx]), 0, idx);
 
 		windows[0].update();
+
 		events.wait(1);
+		checkEvents(g_vm);
+		if (g_vm->shouldQuit() || _buttonValue)
+			goto exit;
 	}
 
 	// Have character rise up from the bottom of the screen
@@ -1856,7 +1858,11 @@ int DwarfCutscene::show() {
 		screen.blitFrom(savedBg);
 		sprites2.draw(0, 0, Common::Point(DWARF2_X[_isDarkCc][idx], DWARF2_Y[_isDarkCc][idx]), 0, idx);
 		windows[0].update();
+
 		events.wait(1);
+		checkEvents(g_vm);
+		if (g_vm->shouldQuit() || _buttonValue)
+			goto exit;
 	}
 
 	sound.setMusicVolume(48);
@@ -1864,7 +1870,7 @@ int DwarfCutscene::show() {
 	sprites2.draw(0, 0);
 	windows[0].update();
 
-	for (int idx = 0; !g_vm->shouldQuit() && idx < (_isDarkCc ? 2 : 3); ++idx) {
+	for (int idx = 0; idx < (_isDarkCc ? 2 : 3); ++idx) {
 		switch (idx) {
 		case 0:
 			sound.playSound(_isDarkCc ? "pass2.voc" : "dwarf10.voc");
@@ -1898,14 +1904,19 @@ int DwarfCutscene::show() {
 			updateSubtitles();
 
 			events.timeMark5();
-			while (!g_vm->shouldQuit() && events.timeElapsed5() < 2)
+			while (events.timeElapsed5() < 2) {
 				events.pollEventsAndWait();
-		} while (!g_vm->shouldQuit() && (sound.isPlaying() || _subtitleCtr));
+				checkEvents(g_vm);
+				if (g_vm->shouldQuit() || _buttonValue)
+					goto exit;
+			}
+		} while (sound.isPlaying() || _subtitleCtr);
 
 		while (!g_vm->shouldQuit() && events.timeElapsed() < 3)
 			events.pollEventsAndWait();
 	}
 
+exit:
 	sprites2.draw(0, 0);
 	if (!_isDarkCc)
 		sprites3.draw(0, 1);


Commit: 92dc9737c5a730153370a48060ce8848516f6cae
    https://github.com/scummvm/scummvm/commit/92dc9737c5a730153370a48060ce8848516f6cae
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-12-17T17:18:51-05:00

Commit Message:
XEEN: Fix placement checks for indoors wall items

Changed paths:
    engines/xeen/interface_scene.cpp
    engines/xeen/locations.cpp


diff --git a/engines/xeen/interface_scene.cpp b/engines/xeen/interface_scene.cpp
index 3ce50ed..710b34d 100644
--- a/engines/xeen/interface_scene.cpp
+++ b/engines/xeen/interface_scene.cpp
@@ -2879,16 +2879,16 @@ void InterfaceScene::setIndoorsWallPics() {
 		if (wallItem._direction != dir)
 			continue;
 
-		if (mazePos.x == (wallItem._position.x + Res.SCREEN_POSITIONING_X[dir][2]) &&
-				mazePos.y == (wallItem._position.y + Res.SCREEN_POSITIONING_Y[dir][2])) {
+		if (wallItem._position.x == (mazePos.x + Res.SCREEN_POSITIONING_X[dir][2]) &&
+				wallItem._position.y == (mazePos.y + Res.SCREEN_POSITIONING_Y[dir][2])) {
 			if (_wp[1] == -1) {
 				_indoorList[148]._frame = wallItem._frame;
 				_indoorList[148]._sprites = wallItem._sprites;
 			}
 		}
 
-		if (mazePos.x == (wallItem._position.x + Res.SCREEN_POSITIONING_X[dir][7]) &&
-				mazePos.y == (wallItem._position.y + Res.SCREEN_POSITIONING_Y[dir][7])) {
+		if (wallItem._position.x == (mazePos.x + Res.SCREEN_POSITIONING_X[dir][7]) &&
+				wallItem._position.y == (mazePos.y + Res.SCREEN_POSITIONING_Y[dir][7])) {
 			if (!_wo[27] && _wp[1] == -1) {
 				_indoorList[123]._frame = wallItem._frame;
 				_indoorList[123]._sprites = wallItem._sprites;
@@ -2896,8 +2896,8 @@ void InterfaceScene::setIndoorsWallPics() {
 			}
 		}
 
-		if (mazePos.x == (wallItem._position.x + Res.SCREEN_POSITIONING_X[dir][5]) &&
-				mazePos.y == (wallItem._position.y + Res.SCREEN_POSITIONING_Y[dir][5])) {
+		if (wallItem._position.x == (mazePos.x + Res.SCREEN_POSITIONING_X[dir][5]) &&
+				wallItem._position.y == (mazePos.y + Res.SCREEN_POSITIONING_Y[dir][5])) {
 			if (_wo[27] && _wo[25]) {
 			} else if (_wo[27] && _wo[28]) {
 			} else if (_wo[23] && _wo[25]) {
@@ -2909,8 +2909,8 @@ void InterfaceScene::setIndoorsWallPics() {
 			}
 		}
 
-		if (mazePos.x == (wallItem._position.x + Res.SCREEN_POSITIONING_X[dir][9]) &&
-				mazePos.y == (wallItem._position.y + Res.SCREEN_POSITIONING_Y[dir][9])) {
+		if (wallItem._position.x == (mazePos.x + Res.SCREEN_POSITIONING_X[dir][9]) &&
+				wallItem._position.y == (mazePos.y + Res.SCREEN_POSITIONING_Y[dir][9])) {
 			if (_wo[27] && _wo[26]) {
 			} else if (_wo[27] && _wo[29]) {
 			} else if (_wo[24] && _wo[26]) {
@@ -2922,17 +2922,17 @@ void InterfaceScene::setIndoorsWallPics() {
 			}
 		}
 
-		if (mazePos.x == (wallItem._position.x + Res.SCREEN_POSITIONING_X[dir][14]) &&
-				mazePos.y == (wallItem._position.y + Res.SCREEN_POSITIONING_Y[dir][14])) {
-			if (!_wo[22] && !_wo[27] && !_wp[8]) {
+		if (wallItem._position.x == (mazePos.x + Res.SCREEN_POSITIONING_X[dir][14]) &&
+				wallItem._position.y == (mazePos.y + Res.SCREEN_POSITIONING_Y[dir][14])) {
+			if (!_wo[22] && !_wo[27] && _wp[8] == -1) {
 				_indoorList[94]._frame = wallItem._frame;
 				_indoorList[94]._sprites = wallItem._sprites;
 				_wp[8] = idx;
 			}
 		}
 
-		if (mazePos.x == (wallItem._position.x + Res.SCREEN_POSITIONING_X[dir][12]) &&
-				mazePos.y == (wallItem._position.y + Res.SCREEN_POSITIONING_Y[dir][12])) {
+		if (wallItem._position.x == (mazePos.x + Res.SCREEN_POSITIONING_X[dir][12]) &&
+				wallItem._position.y == (mazePos.y + Res.SCREEN_POSITIONING_Y[dir][12])) {
 			if (_wo[27]) {
 			} else if (_wo[22] && _wo[23]) {
 			} else if (_wo[22] && _wo[20]) {
@@ -2945,8 +2945,8 @@ void InterfaceScene::setIndoorsWallPics() {
 			}
 		}
 
-		if (mazePos.x == (wallItem._position.x + Res.SCREEN_POSITIONING_X[dir][16]) &&
-				mazePos.y == (wallItem._position.y + Res.SCREEN_POSITIONING_Y[dir][16])) {
+		if (wallItem._position.x == (mazePos.x + Res.SCREEN_POSITIONING_X[dir][16]) &&
+				wallItem._position.y == (mazePos.y + Res.SCREEN_POSITIONING_Y[dir][16])) {
 			if (_wo[27]) {
 			} else if (_wo[22] && _wo[24]) {
 			} else if (_wo[22] && _wo[21]) {
@@ -2959,8 +2959,8 @@ void InterfaceScene::setIndoorsWallPics() {
 			}
 		}
 
-		if (mazePos.x == (wallItem._position.x + Res.SCREEN_POSITIONING_X[dir][12]) &&
-				mazePos.y == (wallItem._position.y + Res.SCREEN_POSITIONING_Y[dir][12])) {
+		if (wallItem._position.x == (mazePos.x + Res.SCREEN_POSITIONING_X[dir][12]) &&
+				wallItem._position.y == (mazePos.y + Res.SCREEN_POSITIONING_Y[dir][12])) {
 			if (_wo[27]) {
 			} else if (_wo[25] && _wo[28]) {
 			} else if (_wo[20] && _wo[16]) {
@@ -2971,8 +2971,8 @@ void InterfaceScene::setIndoorsWallPics() {
 			}
 		}
 
-		if (mazePos.x == (wallItem._position.x + Res.SCREEN_POSITIONING_X[dir][16]) &&
-				mazePos.y == (wallItem._position.y + Res.SCREEN_POSITIONING_Y[dir][16])) {
+		if (wallItem._position.x == (mazePos.x + Res.SCREEN_POSITIONING_X[dir][16]) &&
+				wallItem._position.y == (mazePos.y + Res.SCREEN_POSITIONING_Y[dir][16])) {
 			if (!_wo[26] && !_wo[29] && !_wo[21] && !_wo[18] && _wp[10] == -1) {
 				_indoorList[96]._frame = wallItem._frame;
 				_indoorList[96]._sprites = wallItem._sprites;
@@ -2980,8 +2980,8 @@ void InterfaceScene::setIndoorsWallPics() {
 			}
 		}
 
-		if (mazePos.x == (wallItem._position.x + Res.SCREEN_POSITIONING_X[dir][27]) &&
-				mazePos.y == (wallItem._position.y + Res.SCREEN_POSITIONING_Y[dir][27])) {
+		if (wallItem._position.x == (mazePos.x + Res.SCREEN_POSITIONING_X[dir][27]) &&
+				wallItem._position.y == (mazePos.y + Res.SCREEN_POSITIONING_Y[dir][27])) {
 			if (!_wo[27] && !_wo[22] && !_wo[15] && _wp[15] == -1) {
 				_indoorList[50]._frame = wallItem._frame;
 				_indoorList[50]._sprites = wallItem._sprites;
@@ -2989,8 +2989,8 @@ void InterfaceScene::setIndoorsWallPics() {
 			}
 		}
 
-		if (mazePos.x == (wallItem._position.x + Res.SCREEN_POSITIONING_X[dir][25]) &&
-				mazePos.y == (wallItem._position.y + Res.SCREEN_POSITIONING_Y[dir][25])) {
+		if (wallItem._position.x == (mazePos.x + Res.SCREEN_POSITIONING_X[dir][25]) &&
+				wallItem._position.y == (mazePos.y + Res.SCREEN_POSITIONING_Y[dir][25])) {
 			if (_wo[27]) {
 			} else if (_wo[27] && _wo[22]) {
 			} else if (_wo[15] && _wo[17]) {
@@ -3004,8 +3004,8 @@ void InterfaceScene::setIndoorsWallPics() {
 			}
 		}
 
-		if (mazePos.x == (wallItem._position.x + Res.SCREEN_POSITIONING_X[dir][23]) &&
-				mazePos.y == (wallItem._position.y + Res.SCREEN_POSITIONING_Y[dir][23])) {
+		if (wallItem._position.x == (mazePos.x + Res.SCREEN_POSITIONING_X[dir][23]) &&
+				wallItem._position.y == (mazePos.y + Res.SCREEN_POSITIONING_Y[dir][23])) {
 			if (_wo[27]) {
 			} else if (_wo[22] && _wo[20]) {
 			} else if (_wo[22] && _wo[23]) {
@@ -3019,8 +3019,8 @@ void InterfaceScene::setIndoorsWallPics() {
 			}
 		}
 
-		if (mazePos.x == (wallItem._position.x + Res.SCREEN_POSITIONING_X[dir][29]) &&
-				mazePos.y == (wallItem._position.y + Res.SCREEN_POSITIONING_Y[dir][29])) {
+		if (wallItem._position.x == (mazePos.x + Res.SCREEN_POSITIONING_X[dir][29]) &&
+				wallItem._position.y == (mazePos.y + Res.SCREEN_POSITIONING_Y[dir][29])) {
 			if (_wo[27] || _wo[22]) {
 			} else if (_wo[15] && _wo[19]) {
 			} else if (_wo[15] && _wo[14]) {
@@ -3033,8 +3033,8 @@ void InterfaceScene::setIndoorsWallPics() {
 			}
 		}
 
-		if (mazePos.x == (wallItem._position.x + Res.SCREEN_POSITIONING_X[dir][31]) &&
-				mazePos.y == (wallItem._position.y + Res.SCREEN_POSITIONING_Y[dir][31])) {
+		if (wallItem._position.x == (mazePos.x + Res.SCREEN_POSITIONING_X[dir][31]) &&
+				wallItem._position.y == (mazePos.y + Res.SCREEN_POSITIONING_Y[dir][31])) {
 			if (_wo[27]) {
 			} else if (_wo[22] && _wo[21]) {
 			} else if (_wo[22] && _wo[24]) {
@@ -3047,8 +3047,8 @@ void InterfaceScene::setIndoorsWallPics() {
 			}
 		}
 
-		if (mazePos.x == (wallItem._position.x + Res.SCREEN_POSITIONING_X[dir][23]) &&
-				mazePos.y == (wallItem._position.y + Res.SCREEN_POSITIONING_Y[dir][23])) {
+		if (wallItem._position.x == (mazePos.x + Res.SCREEN_POSITIONING_X[dir][23]) &&
+				wallItem._position.y == (mazePos.y + Res.SCREEN_POSITIONING_Y[dir][23])) {
 			if (!_wo[27] && !_wo[20] && !_wo[12] && !_wo[23] && !_wo[8] && !_wo[30]) {
 				if (_wp[12] == -1) {
 					_indoorList[47]._frame = wallItem._frame;
@@ -3058,8 +3058,8 @@ void InterfaceScene::setIndoorsWallPics() {
 			}
 		}
 
-		if (mazePos.x == (wallItem._position.x + Res.SCREEN_POSITIONING_X[dir][31]) &&
-				mazePos.y == (wallItem._position.y + Res.SCREEN_POSITIONING_Y[dir][31])) {
+		if (wallItem._position.x == (mazePos.x + Res.SCREEN_POSITIONING_X[dir][31]) &&
+				wallItem._position.y == (mazePos.y + Res.SCREEN_POSITIONING_Y[dir][31])) {
 			if (!_wo[27] && !_wo[21] && !_wo[14] && !_wo[24] && !_wo[10] && !_wo[31]) {
 				if (_wp[18] == -1) {
 					_indoorList[53]._frame = wallItem._frame;
@@ -3069,8 +3069,8 @@ void InterfaceScene::setIndoorsWallPics() {
 			}
 		}
 
-		if (mazePos.x == (wallItem._position.x + Res.SCREEN_POSITIONING_X[dir][23]) &&
-				mazePos.y == (wallItem._position.y + Res.SCREEN_POSITIONING_Y[dir][23])) {
+		if (wallItem._position.x == (mazePos.x + Res.SCREEN_POSITIONING_X[dir][23]) &&
+				wallItem._position.y == (mazePos.y + Res.SCREEN_POSITIONING_Y[dir][23])) {
 			if (!_wo[25] && !_wo[28] && !_wo[20] && !_wo[11] && !_wo[16] && !_wo[30] && !_wo[32]) {
 				if (_wp[11] == -1) {
 					_indoorList[46]._frame = wallItem._frame;
@@ -3080,8 +3080,8 @@ void InterfaceScene::setIndoorsWallPics() {
 			}
 		}
 
-		if (mazePos.x == (wallItem._position.x + Res.SCREEN_POSITIONING_X[dir][31]) &&
-				mazePos.y == (wallItem._position.y + Res.SCREEN_POSITIONING_Y[dir][31])) {
+		if (wallItem._position.x == (mazePos.x + Res.SCREEN_POSITIONING_X[dir][31]) &&
+				wallItem._position.y == (mazePos.y + Res.SCREEN_POSITIONING_Y[dir][31])) {
 			if (!_wo[26] && !_wo[20] && !_wo[21] && !_wo[13] && !_wo[18] && !_wo[31] && !_wo[33]) {
 				if (_wp[19] == -1) {
 					_indoorList[54]._frame = wallItem._frame;
diff --git a/engines/xeen/locations.cpp b/engines/xeen/locations.cpp
index e4b1ae2..a6992ef 100644
--- a/engines/xeen/locations.cpp
+++ b/engines/xeen/locations.cpp
@@ -1926,6 +1926,8 @@ exit:
 
 	// Restore game screen
 	sound.setMusicVolume(95);
+	sound.stopSound();
+
 	screen.loadBackground("back.raw");
 	intf.drawParty(false);
 	intf.draw3d(false, false);





More information about the Scummvm-git-logs mailing list