[Scummvm-cvs-logs] scummvm branch-1-8 -> 8dae7bffb5dd33ca5d30fe226d42746ff8ce6108

criezy criezy at scummvm.org
Tue Apr 12 23:21:08 CEST 2016


This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
a9f86859b8 DRASCULA: Fix wrong background for inventory in chapter 6
e713da20c5 NEWS: Add fix for inventory background in Drascula
8dae7bffb5 DRASCULA: Fix cursor visibility during animation at start of chapter 6


Commit: a9f86859b89ce43d6eedc1ef4bdd5c086f22707d
    https://github.com/scummvm/scummvm/commit/a9f86859b89ce43d6eedc1ef4bdd5c086f22707d
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2016-04-12T22:20:07+01:00

Commit Message:
DRASCULA: Fix wrong background for inventory in chapter 6

This was a regression from commit fa3d3e3 and this fixes part of
bug #7113 DRASCULA: Serious sprite glitches.

The original uses extraSurface to draw text in draw_abc() in the
Spanish version while other languages use tableSurface. But in
ScummVM this was changed to use tableSurface for all languages.
However this caused an issue in chapter 6 when displaying the
inventory has it is also using tableSurface, as it was for all languages
in the original. While using the same surface works for other
languages, in the Spanish version we get the wrong background in
the inventory.

Rather than revert to using extraSurface for drawing text which is
a big change and impact all the chapters, I have opted to simply
swap the usage of the tableSurface and extraSurface in chapter 6
for the Spanish version compared to the original engine. The
changes therefore only impact chapter 6 and only the Spanish
version. I played the chapter in full to check that it indeed works
without causing adverse effects.

Changed paths:
    engines/drascula/actors.cpp
    engines/drascula/animation.cpp
    engines/drascula/drascula.cpp
    engines/drascula/interface.cpp
    engines/drascula/rooms.cpp
    engines/drascula/sound.cpp
    engines/drascula/talk.cpp



diff --git a/engines/drascula/actors.cpp b/engines/drascula/actors.cpp
index b459c45..a1f2c53 100644
--- a/engines/drascula/actors.cpp
+++ b/engines/drascula/actors.cpp
@@ -196,6 +196,10 @@ void DrasculaEngine::moveCharacters() {
 			return;
 		}
 	}
+	
+	byte *srcSurface = extraSurface;
+	if (currentChapter == 6 && _lang == kSpanish)
+		srcSurface = tableSurface;
 
 	if (characterMoved == 0) {
 		curPos[0] = 0;
@@ -214,17 +218,17 @@ void DrasculaEngine::moveCharacters() {
 			curPos[1] = 0;
 			if (currentChapter == 2)
 				copyRect(curPos[0], curPos[1], curPos[2], curPos[3], curPos[4], curPos[5],
-						 extraSurface, screenSurface);
+						 srcSurface, screenSurface);
 			else
 				reduce_hare_chico(curPos[0], curPos[1], curPos[2], curPos[3], curPos[4], curPos[5],
-									factor_red[curY + curHeight], extraSurface, screenSurface);
+									factor_red[curY + curHeight], srcSurface, screenSurface);
 		} else if (trackProtagonist == 1) {
 			if (currentChapter == 2)
 				copyRect(curPos[0], curPos[1], curPos[2], curPos[3], curPos[4], curPos[5],
-						 extraSurface, screenSurface);
+						 srcSurface, screenSurface);
 			else
 				reduce_hare_chico(curPos[0], curPos[1], curPos[2], curPos[3], curPos[4], curPos[5],
-									factor_red[curY + curHeight], extraSurface, screenSurface);
+									factor_red[curY + curHeight], srcSurface, screenSurface);
 		} else if (trackProtagonist == 2) {
 			if (currentChapter == 2)
 				copyRect(curPos[0], curPos[1], curPos[2], curPos[3], curPos[4], curPos[5],
@@ -256,17 +260,17 @@ void DrasculaEngine::moveCharacters() {
 			curPos[1] = 0;
 			if (currentChapter == 2)
 				copyRect(curPos[0], curPos[1], curPos[2], curPos[3], curPos[4], curPos[5],
-						 extraSurface, screenSurface);
+						 srcSurface, screenSurface);
 			else
 				reduce_hare_chico(curPos[0], curPos[1], curPos[2], curPos[3], curPos[4], curPos[5],
-									factor_red[curY + curHeight], extraSurface, screenSurface);
+									factor_red[curY + curHeight], srcSurface, screenSurface);
 		} else if (trackProtagonist == 1) {
 			if (currentChapter == 2)
 				copyRect(curPos[0], curPos[1], curPos[2], curPos[3], curPos[4], curPos[5],
-						 extraSurface, screenSurface);
+						 srcSurface, screenSurface);
 			else
 				reduce_hare_chico(curPos[0], curPos[1], curPos[2], curPos[3], curPos[4], curPos[5],
-									factor_red[curY + curHeight], extraSurface, screenSurface);
+									factor_red[curY + curHeight], srcSurface, screenSurface);
 		} else if (trackProtagonist == 2) {
 			if (currentChapter == 2)
 				copyRect(curPos[0], curPos[1], curPos[2], curPos[3], curPos[4], curPos[5],
diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp
index 439253e..5901d57 100644
--- a/engines/drascula/animation.cpp
+++ b/engines/drascula/animation.cpp
@@ -1611,7 +1611,7 @@ void DrasculaEngine::animation_6_6() {
 	removeObject(20);
 	loadPic(96, frontSurface);
 	loadPic(97, frontSurface);
-	loadPic(97, extraSurface);
+	loadPic(97, _lang == kSpanish ? tableSurface : extraSurface);
 	loadPic(99, backSurface);
 	doBreak = 1;
 	objExit = 104;
@@ -2215,7 +2215,7 @@ void DrasculaEngine::activatePendulum() {
 	_roomNumber = 102;
 	loadPic(102, bgSurface, HALF_PAL);
 	loadPic("an_p1.alg", drawSurface3);
-	loadPic("an_p2.alg", extraSurface);
+	loadPic("an_p2.alg", _lang == kSpanish ? tableSurface : extraSurface);
 	loadPic("an_p3.alg", frontSurface);
 
 	copyBackground(0, 171, 0, 0, OBJWIDTH, OBJHEIGHT, backSurface, drawSurface3);
diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp
index 94f5a03..463f9f5 100644
--- a/engines/drascula/drascula.cpp
+++ b/engines/drascula/drascula.cpp
@@ -368,12 +368,15 @@ Common::Error DrasculaEngine::run() {
 			memcpy(crosshairCursor + i * 40, tableSurface + 225 + (56 + i) * 320, 40);
 
 		if (_lang == kSpanish)
-			loadPic(974, tableSurface);
+			loadPic(currentChapter == 6 ? 97 : 974, tableSurface);
 
 		if (currentChapter != 2) {
 			loadPic(99, cursorSurface);
 			loadPic(99, backSurface);
-			loadPic(97, extraSurface);
+			if (currentChapter == 6 && _lang == kSpanish)
+				loadPic(95, extraSurface);
+			else
+				loadPic(97, extraSurface);
 		}
 
 		memset(iconName, 0, sizeof(iconName));
diff --git a/engines/drascula/interface.cpp b/engines/drascula/interface.cpp
index 07f192c..a09b9da 100644
--- a/engines/drascula/interface.cpp
+++ b/engines/drascula/interface.cpp
@@ -123,6 +123,15 @@ void DrasculaEngine::showMenu() {
 	int h, n, x;
 	byte *srcSurface = (currentChapter == 6) ? tableSurface : frontSurface;
 	x = whichObject();
+	
+	// The original uses extraSurface to draw text in draw_abc() in the Spanish version
+	// while other languages use tableSurface. Here all language use tableSurface for
+	// chapter 6. However the code in ScummVM was changed to use tableSurface for all
+	// labguage in draw_abc(). So instead here for the Spanish version we use extraSurface.
+	// Compared to the original the use of the tableSurface and extraSurface has been swapped
+	// for the Spanish language all through chapter 6.
+	if (currentChapter == 6 && _lang == kSpanish)
+		srcSurface = extraSurface;
 
 	for (n = 1; n < ARRAYSIZE(inventoryObjects); n++) {
 		h = inventoryObjects[n];
diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp
index 57d4517..acfc528 100644
--- a/engines/drascula/rooms.cpp
+++ b/engines/drascula/rooms.cpp
@@ -1501,7 +1501,7 @@ void DrasculaEngine::update_102() {
 	if (actorFrames[kFramePendulum] <= 4)
 		pendulumSurface = drawSurface3;
 	else if (actorFrames[kFramePendulum] <= 11)
-		pendulumSurface = extraSurface;
+		pendulumSurface = _lang == kSpanish ? tableSurface : extraSurface;
 	else
 		pendulumSurface = frontSurface;
 
diff --git a/engines/drascula/sound.cpp b/engines/drascula/sound.cpp
index 148dae7..4d07ab3 100644
--- a/engines/drascula/sound.cpp
+++ b/engines/drascula/sound.cpp
@@ -44,10 +44,13 @@ void DrasculaEngine::updateVolume(Audio::Mixer::SoundType soundType, int prevVol
 }
 
 void DrasculaEngine::volumeControls() {
+	byte* srcSurface = tableSurface;
+	if (currentChapter == 6 && _lang == kSpanish)
+		srcSurface = extraSurface;
 	if (_lang == kSpanish)
-		loadPic(95, tableSurface);
+		loadPic(95, srcSurface);
 
-	copyRect(1, 56, 73, 63, 177, 97, tableSurface, screenSurface);
+	copyRect(1, 56, 73, 63, 177, 97, srcSurface, screenSurface);
 	updateScreen(73, 63, 73, 63, 177, 97, screenSurface);
 
 	setCursor(kCursorCrosshair);
@@ -64,11 +67,11 @@ void DrasculaEngine::volumeControls() {
 
 		updateRoom();
 
-		copyRect(1, 56, 73, 63, 177, 97, tableSurface, screenSurface);
+		copyRect(1, 56, 73, 63, 177, 97, srcSurface, screenSurface);
 
-		copyBackground(183, 56, 82, masterVolumeY, 39, 2 + masterVolume * 4, tableSurface, screenSurface);
-		copyBackground(183, 56, 138, voiceVolumeY, 39, 2 + voiceVolume * 4, tableSurface, screenSurface);
-		copyBackground(183, 56, 194, musicVolumeY, 39, 2 + musicVolume * 4, tableSurface, screenSurface);
+		copyBackground(183, 56, 82, masterVolumeY, 39, 2 + masterVolume * 4, srcSurface, screenSurface);
+		copyBackground(183, 56, 138, voiceVolumeY, 39, 2 + voiceVolume * 4, srcSurface, screenSurface);
+		copyBackground(183, 56, 194, musicVolumeY, 39, 2 + musicVolume * 4, srcSurface, screenSurface);
 
 		updateScreen();
 
@@ -102,7 +105,7 @@ void DrasculaEngine::volumeControls() {
 	}
 
 	if (_lang == kSpanish)
-		loadPic(974, tableSurface);
+		loadPic(currentChapter == 6 ? 95 : 974, srcSurface);
 
 	selectVerb(kVerbNone);
 
diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp
index cc329b2..3176c5e 100644
--- a/engines/drascula/talk.cpp
+++ b/engines/drascula/talk.cpp
@@ -440,9 +440,12 @@ void DrasculaEngine::talk(const char *said, const char *filename) {
 				copyRect(x_talk_izq[face], y_mask_talk, curX + 8, curY - 1, TALK_WIDTH, TALK_HEIGHT,
 						extraSurface, screenSurface);
 			else if (notTowers) {
+				byte *srcSurface = extraSurface;
+				if (currentChapter == 6 && _lang == kSpanish)
+					srcSurface = tableSurface;
 				reduce_hare_chico(x_talk_izq[face], y_mask_talk, curX + (int)((8.0f / 100) * factor_red[MIN(201, curY + curHeight)]),
 					curY, TALK_WIDTH, TALK_HEIGHT, factor_red[MIN(201, curY + curHeight)],
-					extraSurface, screenSurface);
+					srcSurface, screenSurface);
 			}
 			updateRefresh();
 		} else if (trackProtagonist == 1) {
@@ -450,8 +453,11 @@ void DrasculaEngine::talk(const char *said, const char *filename) {
 				copyRect(x_talk_dch[face], y_mask_talk, curX + 12, curY, TALK_WIDTH, TALK_HEIGHT,
 					extraSurface, screenSurface);
 			else if (notTowers) {
+				byte *srcSurface = extraSurface;
+				if (currentChapter == 6 && _lang == kSpanish)
+					srcSurface = tableSurface;
 				reduce_hare_chico(x_talk_dch[face], y_mask_talk, curX + (int)((12.0f / 100) * factor_red[MIN(201, curY + curHeight)]),
-					curY, TALK_WIDTH, TALK_HEIGHT, factor_red[MIN(201, curY + curHeight)], extraSurface, screenSurface);
+					curY, TALK_WIDTH, TALK_HEIGHT, factor_red[MIN(201, curY + curHeight)], srcSurface, screenSurface);
 			}
 			updateRefresh();
 		} else if (trackProtagonist == 2) {


Commit: e713da20c5bf4a1b9f3cef0ae185dade1a799e43
    https://github.com/scummvm/scummvm/commit/e713da20c5bf4a1b9f3cef0ae185dade1a799e43
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2016-04-12T22:20:18+01:00

Commit Message:
NEWS: Add fix for inventory background in Drascula

Changed paths:
    NEWS



diff --git a/NEWS b/NEWS
index 36b1ab4..c08108a 100644
--- a/NEWS
+++ b/NEWS
@@ -16,6 +16,8 @@ For a more comprehensive changelog of the latest experimental code, see:
    - Fixed text alignment to be faithful to the original.
    - Fixed character walking off screen.
    - Fixed loading savegames in the Pendulum scene.
+   - Fixed wrong background for inventory items during chapter 6 in the
+     Spanish version.
 
  Gob:
    - Fixed lock up for some games during sound initialization.


Commit: 8dae7bffb5dd33ca5d30fe226d42746ff8ce6108
    https://github.com/scummvm/scummvm/commit/8dae7bffb5dd33ca5d30fe226d42746ff8ce6108
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2016-04-12T22:20:26+01:00

Commit Message:
DRASCULA: Fix cursor visibility during animation at start of chapter 6

Here we transition from an animation at end of chapter 5 to another
animation at start of chapter 6. Usually the cursor is hidden when
performing the action that triggers the animation. But here there is
no action to trigger it and the cursor is made visible when starting
a new chapter or entering a room (so between the two animations).
So explicitly hide it at the start of this specific animation (and it gets
shown again when we enter room 102 at the end of the animation).

Changed paths:
    engines/drascula/animation.cpp



diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp
index 5901d57..0ed2c61 100644
--- a/engines/drascula/animation.cpp
+++ b/engines/drascula/animation.cpp
@@ -1504,6 +1504,7 @@ void DrasculaEngine::animation_14_5() {
 void DrasculaEngine::animation_1_6() {
 	debug(4, "animation_1_6()");
 
+	hideCursor();
 	trackProtagonist = 0;
 	curX = 103;
 	curY = 108;






More information about the Scummvm-git-logs mailing list