[Scummvm-cvs-logs] scummvm master -> a97f9d0ec6f0006add3d0a47f33074f1ee731b36

criezy criezy at scummvm.org
Mon Apr 11 02:38:30 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:
1c0362d22f DRASCULA: Improve loading savegames in Pendulum scene
5716b288ac DRASCULA: Fix color for Drascula at the end of chapter 5
a97f9d0ec6 DRASCULA: Rename variable to clarify its meaning


Commit: 1c0362d22f2d16fa87ff4789001e6a4f549eb3ec
    https://github.com/scummvm/scummvm/commit/1c0362d22f2d16fa87ff4789001e6a4f549eb3ec
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2016-04-11T01:36:54+01:00

Commit Message:
DRASCULA: Improve loading savegames in Pendulum scene

The previous fix only fixed the incomplete state when loading from
the launcher. Now this is fixed when loading from the game as well.
It also fixes loading a savegame from the first stage of the pendulum
scene (when the protagonist is not visible) to any other scene in
chapter 6. The protagonist was not made visible again when loading
the savegame.

Changed paths:
    engines/drascula/drascula.cpp
    engines/drascula/saveload.cpp



diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp
index 358aecc..9ac9031 100644
--- a/engines/drascula/drascula.cpp
+++ b/engines/drascula/drascula.cpp
@@ -534,10 +534,6 @@ bool DrasculaEngine::runCurrentChapter() {
 			if (!loadGame(_currentSaveSlot)) {
 				return true;
 			}
-			// When loading room 102 while being attached below the pendulum we
-			// need to call activatePendulum() to properly initialized the scene.
-			if (_roomNumber == 102 && flags[1] == 2)
-				activatePendulum();
 			loadPic("auxdr.alg", drawSurface2);
 		}
 	}
diff --git a/engines/drascula/saveload.cpp b/engines/drascula/saveload.cpp
index d0f16aa..e67ada5 100644
--- a/engines/drascula/saveload.cpp
+++ b/engines/drascula/saveload.cpp
@@ -255,6 +255,19 @@ bool DrasculaEngine::loadGame(int slot) {
 	if (!(in = _saveFileMan->openForLoading(saveFileName))) {
 		error("missing savegame file %s", saveFileName.c_str());
 	}
+	
+	// If we currently are in room 102 while being attached below the pendulum
+	// the character is invisible and some surface are temporarily used for other
+	// things. Reset those before loading the savegame otherwise we may have some
+	// issues such as the protagonist being invisible after reloading a savegame.
+	if (_roomNumber == 102 && flags[1] == 2) {
+		hare_se_ve = 1;
+		loadPic(96, frontSurface);
+		loadPic(97, frontSurface);
+		loadPic(97, extraSurface);
+		loadPic(99, backSurface);
+	}
+	
 
 	loadMetaData(in, slot, true);
 	Graphics::skipThumbnail(*in);
@@ -289,6 +302,11 @@ bool DrasculaEngine::loadGame(int slot) {
 	}
 	enterRoom(roomNum);
 	selectVerb(kVerbNone);
+	
+	// When loading room 102 while being attached below the pendulum we
+	// need to call activatePendulum() to properly initialized the scene.
+	if (_roomNumber == 102 && flags[1] == 2)
+		activatePendulum();
 
 	return true;
 }


Commit: 5716b288ac8388aa971486fa7ff5539b2f4219f8
    https://github.com/scummvm/scummvm/commit/5716b288ac8388aa971486fa7ff5539b2f4219f8
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2016-04-11T01:36:59+01:00

Commit Message:
DRASCULA: Fix color for Drascula at the end of chapter 5

I checked the original and the code in ScummVM and there is no
call to talk_solo in chapter 4, while we indeed need to use the red
color for all calls to talk_solo in chapter 5.

Changed paths:
    engines/drascula/talk.cpp



diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp
index e9fec86..cc329b2 100644
--- a/engines/drascula/talk.cpp
+++ b/engines/drascula/talk.cpp
@@ -232,7 +232,7 @@ void DrasculaEngine::talk_solo(const char *said, const char *filename) {
 
 	if (currentChapter == 1)
 		color_abc(color_solo);
-	else if (currentChapter == 4)
+	else if (currentChapter == 5)
 		color_abc(kColorRed);
 
 	talkInit(filename);


Commit: a97f9d0ec6f0006add3d0a47f33074f1ee731b36
    https://github.com/scummvm/scummvm/commit/a97f9d0ec6f0006add3d0a47f33074f1ee731b36
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2016-04-11T01:37:08+01:00

Commit Message:
DRASCULA: Rename variable to clarify its meaning

Changed paths:
    engines/drascula/actors.cpp
    engines/drascula/animation.cpp
    engines/drascula/drascula.cpp
    engines/drascula/drascula.h
    engines/drascula/objects.cpp
    engines/drascula/rooms.cpp
    engines/drascula/saveload.cpp



diff --git a/engines/drascula/actors.cpp b/engines/drascula/actors.cpp
index b41647d..9a12d27 100644
--- a/engines/drascula/actors.cpp
+++ b/engines/drascula/actors.cpp
@@ -191,7 +191,7 @@ void DrasculaEngine::moveCharacters() {
 	}
 
 	if (currentChapter != 2 && currentChapter != 3) {
-		if (hare_se_ve == 0) {
+		if (characterVivible == 0) {
 			increaseFrameNum();
 			return;
 		}
diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp
index 5009a62..925a53f 100644
--- a/engines/drascula/animation.cpp
+++ b/engines/drascula/animation.cpp
@@ -360,7 +360,7 @@ void DrasculaEngine::animation_2_1() {
 	int l;
 
 	gotoObject(231, 91);
-	hare_se_ve = 0;
+	characterVivible = 0;
 
 	term_int = 0;
 
@@ -433,7 +433,7 @@ void DrasculaEngine::animation_2_1() {
 		curX = 91;
 		curY = 95;
 		trackProtagonist = 1;
-		hare_se_ve = 1;
+		characterVivible = 1;
 
 		loadPic("97g.alg", extraSurface);
 		if (animate("lev.bin", 15))
@@ -1434,7 +1434,7 @@ void DrasculaEngine::animation_12_5() {
 
 	doBreak = 1;
 	previousMusic = roomMusic;
-	hare_se_ve = 1;
+	characterVivible = 1;
 	clearRoom();
 	trackProtagonist = 1;
 	characterMoved = 0;
@@ -1543,7 +1543,7 @@ void DrasculaEngine::animation_1_6() {
 	updateEvents();
 	clearRoom();
 	black();
-	hare_se_ve = 0;
+	characterVivible = 0;
 	flags[0] = 0;
 	updateRoom();
 	updateScreen();
@@ -1618,7 +1618,7 @@ void DrasculaEngine::animation_6_6() {
 	curX = -1;
 	selectVerb(kVerbNone);
 	enterRoom(58);
-	hare_se_ve = 1;
+	characterVivible = 1;
 	trackProtagonist = 1;
 	animate("hbp.bin", 14);
 
@@ -2138,7 +2138,7 @@ void DrasculaEngine::animation_5_4(){
 	loadPic("anh_dr.alg", backSurface);
 	gotoObject(99, 160);
 	gotoObject(38, 177);
-	hare_se_ve = 0;
+	characterVivible = 0;
 	updateRoom();
 	updateScreen();
 	delay(800);
@@ -2156,7 +2156,7 @@ void DrasculaEngine::animation_5_4(){
 	talk_igor(30, kIgorFront);
 	loadPic(96, frontSurface);
 	loadPic(99, backSurface);
-	hare_se_ve = 1;
+	characterVivible = 1;
 	fadeToBlack(0);
 	exitRoom(0);
 }
@@ -2211,7 +2211,7 @@ void DrasculaEngine::activatePendulum() {
 	debug(4, "activatePendulum()");
 
 	flags[1] = 2;
-	hare_se_ve = 0;
+	characterVivible = 0;
 	_roomNumber = 102;
 	loadPic(102, bgSurface, HALF_PAL);
 	loadPic("an_p1.alg", drawSurface3);
diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp
index 9ac9031..a105e8a 100644
--- a/engines/drascula/drascula.cpp
+++ b/engines/drascula/drascula.cpp
@@ -144,7 +144,7 @@ DrasculaEngine::DrasculaEngine(OSystem *syst, const DrasculaGameDescription *gam
 	curDirection = 0;
 	trackProtagonist = 0;
 	_characterFrame = 0;
-	hare_se_ve = 0;
+	characterVivible = 0;
 	roomX = 0;
 	roomY = 0;
 	checkFlags = 0;
@@ -299,7 +299,7 @@ Common::Error DrasculaEngine::run() {
 		characterMoved = 0;
 		trackProtagonist = 3;
 		_characterFrame = 0;
-		hare_se_ve = 1;
+		characterVivible = 1;
 		checkFlags = 1;
 		doBreak = 0;
 		walkToObject = 0;
diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h
index 762add5..f7a745f 100644
--- a/engines/drascula/drascula.h
+++ b/engines/drascula/drascula.h
@@ -429,7 +429,7 @@ public:
 
 	int frame_y;
 	int curX, curY, characterMoved, curDirection, trackProtagonist, _characterFrame;
-	int hare_se_ve;		// TODO: what is this for?
+	int characterVivible;
 	int roomX, roomY, checkFlags;
 	int doBreak;
 	int stepX, stepY;
diff --git a/engines/drascula/objects.cpp b/engines/drascula/objects.cpp
index cd7d502..43f9919 100644
--- a/engines/drascula/objects.cpp
+++ b/engines/drascula/objects.cpp
@@ -62,7 +62,7 @@ void DrasculaEngine::gotoObject(int pointX, int pointY) {
 	hideCursor();
 
 	if (currentChapter == 5 || currentChapter == 6) {
-		if (hare_se_ve == 0) {
+		if (characterVivible == 0) {
 			curX = roomX;
 			curY = roomY;
 			updateRoom();
diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp
index 8691bd2..9901a0a 100644
--- a/engines/drascula/rooms.cpp
+++ b/engines/drascula/rooms.cpp
@@ -980,12 +980,12 @@ bool DrasculaEngine::room_59(int fl) {
 			playSound(12);
 			pause(19);
 			stopSound();
-			hare_se_ve = 0;
+			characterVivible = 0;
 			updateRoom();
 			copyRect(101, 34, curX - 4, curY - 1, 37, 70, drawSurface3, screenSurface);
 			copyBackground(0, 0, 0, 0, 320, 200, screenSurface, bgSurface);
 			updateScreen();
-			hare_se_ve = 1;
+			characterVivible = 1;
 			clearRoom();
 			loadPic("tlef0.alg", bgSurface, COMPLETE_PAL);
 			loadPic("tlef1.alg", drawSurface3);
@@ -1399,7 +1399,7 @@ void DrasculaEngine::update_58_pre() {
 }
 
 void DrasculaEngine::update_58() {
-	if (hare_se_ve == 1)
+	if (characterVivible == 1)
 		copyRect(67, 139, 140, 147, 12, 16, drawSurface3, screenSurface);
 }
 
@@ -1845,7 +1845,7 @@ void DrasculaEngine::enterRoom(int roomIndex) {
 	}
 
 	if (currentChapter == 5)
-		hare_se_ve = 1;
+		characterVivible = 1;
 
 	updateVisible();
 
@@ -1885,7 +1885,7 @@ void DrasculaEngine::enterRoom(int roomIndex) {
 
 	if (currentChapter == 5) {
 		if (_roomNumber == 45)
-			hare_se_ve = 0;
+			characterVivible = 0;
 		if (_roomNumber == 49 && flags[7] == 0) {
 			playTalkSequence(4);	// sequence 4, chapter 5
 		}
@@ -1961,7 +1961,7 @@ bool DrasculaEngine::exitRoom(int doorNumber) {
 		}
 
 		if (currentChapter == 5)
-			hare_se_ve = 1;
+			characterVivible = 1;
 
 		clearRoom();
 		if (!sscanf(_targetSurface[doorNumber], "%d", &roomNum)) {
diff --git a/engines/drascula/saveload.cpp b/engines/drascula/saveload.cpp
index e67ada5..9063fbc 100644
--- a/engines/drascula/saveload.cpp
+++ b/engines/drascula/saveload.cpp
@@ -261,7 +261,7 @@ bool DrasculaEngine::loadGame(int slot) {
 	// things. Reset those before loading the savegame otherwise we may have some
 	// issues such as the protagonist being invisible after reloading a savegame.
 	if (_roomNumber == 102 && flags[1] == 2) {
-		hare_se_ve = 1;
+		characterVivible = 1;
 		loadPic(96, frontSurface);
 		loadPic(97, frontSurface);
 		loadPic(97, extraSurface);






More information about the Scummvm-git-logs mailing list