diff options
| -rw-r--r-- | engines/drascula/animation.cpp | 8 | ||||
| -rw-r--r-- | engines/drascula/drascula.cpp | 34 | ||||
| -rw-r--r-- | engines/drascula/drascula.h | 2 | 
3 files changed, 24 insertions, 20 deletions
| diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index 88bcc1d24d..07cc2fd6c9 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -1785,7 +1785,7 @@ void DrasculaEngine::animation_12_5() {  	curX = -1;  	objExit = 104;  	withoutVerb(); -	enterNewRoom(57); +	enterRoom(57);  }  void DrasculaEngine::animation_13_5() { @@ -1940,7 +1940,7 @@ void DrasculaEngine::animation_1_6() {  		textSurface = extraSurface;  	clearRoom(); -	enterNewRoom(102); +	enterRoom(102);  	activatePendulum();  } @@ -1996,7 +1996,7 @@ void DrasculaEngine::animation_6_6() {  	objExit = 104;  	curX = -1;  	withoutVerb(); -	enterNewRoom(58); +	enterRoom(58);  	hare_se_ve = 1;  	trackProtagonist = 1;  	animate("hbp.bin", 14); @@ -2023,7 +2023,7 @@ void DrasculaEngine::animation_9_6() {  	clearRoom();  	curX = -1;  	objExit = 108; -	enterNewRoom(59); +	enterRoom(59);  	// The room number was originally changed here to "nada.alg",  	// which is a non-existant file. In reality, this was just a  	// hack to set the room number to a non-existant one, so that diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index b6db1bf74f..dff32725f3 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -453,7 +453,7 @@ bool DrasculaEngine::escoba() {  				return true;  			}  		} else { -			enterNewRoom(62); +			enterRoom(62);  			curX = -20;  			curY = 56;  			gotoObject(65, 145); @@ -463,7 +463,7 @@ bool DrasculaEngine::escoba() {  		trackProtagonist = 3;  		objExit = 162;  		if (hay_que_load == 0) -			enterNewRoom(14); +			enterRoom(14);  		else {  			if (!loadGame(saveName)) {  				return true; @@ -481,7 +481,7 @@ bool DrasculaEngine::escoba() {  		trackProtagonist = 1;  		objExit = 99;  		if (hay_que_load == 0) -			enterNewRoom(20); +			enterRoom(20);  		else {  			if (!loadGame(saveName)) {  				return true; @@ -494,7 +494,7 @@ bool DrasculaEngine::escoba() {  		addObject(22);  		objExit = 100;  		if (hay_que_load == 0) { -			enterNewRoom(21); +			enterRoom(21);  			trackProtagonist = 0;  			curX = 235;  			curY = 164; @@ -516,7 +516,7 @@ bool DrasculaEngine::escoba() {  		trackProtagonist = 1;  		objExit = 100;  		if (hay_que_load == 0) { -			enterNewRoom(45); +			enterRoom(45);  		} else {  			if (!loadGame(saveName)) {  				return true; @@ -529,7 +529,7 @@ bool DrasculaEngine::escoba() {  		trackProtagonist = 1;  		objExit = 104;  		if (hay_que_load == 0) { -			enterNewRoom(58); +			enterRoom(58);  			animation_1_6();  		} else {  			if (!loadGame(saveName)) { @@ -787,9 +787,11 @@ void DrasculaEngine::getStringFromLine(char *buf, int len, char* result) {  	sscanf(buf, "%s", result);  } -void DrasculaEngine::enterNewRoom(int index) { +void DrasculaEngine::enterRoom(int roomIndex) { +	debug(2, "Entering room %d", roomIndex); +  	char fileName[20]; -	sprintf(fileName, "%d.ald", index); +	sprintf(fileName, "%d.ald", roomIndex);  	int soc, l, martin = 0, objIsExit = 0;  	float chiquez = 0, pequegnez = 0;  	char pant1[20], pant2[20], pant3[20], pant4[20]; @@ -2050,7 +2052,7 @@ bool DrasculaEngine::loadGame(const char *gameName) {  	pickedObject = sav->readSint32LE();  	hay_que_load = 0;  	sscanf(currentData, "%d.ald", &roomNum); -	enterNewRoom(roomNum); +	enterRoom(roomNum);  	withoutVerb();  	return true; @@ -2411,6 +2413,8 @@ void DrasculaEngine::removeObject() {  }  bool DrasculaEngine::exitRoom(int l) { +	debug(2, "Exiting room from door %d", l); +  	int roomNum = 0;  	if (currentChapter == 1) { @@ -2436,7 +2440,7 @@ bool DrasculaEngine::exitRoom(int l) {  				clearRoom();  				sscanf(_targetSurface[l], "%d", &roomNum);  				curX = -1; -				enterNewRoom(roomNum); +				enterRoom(roomNum);  			}  		}  	} else if (currentChapter == 2) { @@ -2467,7 +2471,7 @@ bool DrasculaEngine::exitRoom(int l) {  			clearRoom();  			sscanf(_targetSurface[l], "%d", &roomNum);  			curX =- 1; -			enterNewRoom(roomNum); +			enterRoom(roomNum);  		}  	} else if (currentChapter == 3) {  		updateDoor(l); @@ -2484,7 +2488,7 @@ bool DrasculaEngine::exitRoom(int l) {  			clearRoom();  			sscanf(_targetSurface[l], "%d", &roomNum);  			curX =- 1; -			enterNewRoom(roomNum); +			enterRoom(roomNum);  		}  	} else if (currentChapter == 4) {  		updateDoor(l); @@ -2504,7 +2508,7 @@ bool DrasculaEngine::exitRoom(int l) {  			clearRoom();  			sscanf(_targetSurface[l], "%d", &roomNum);  			curX = -1; -			enterNewRoom(roomNum); +			enterRoom(roomNum);  		}  	} else if (currentChapter == 5) {  		updateDoor(l); @@ -2522,7 +2526,7 @@ bool DrasculaEngine::exitRoom(int l) {  			clearRoom();  			sscanf(_targetSurface[l], "%d", &roomNum);  			curX = -1; -			enterNewRoom(roomNum); +			enterRoom(roomNum);  		}  	} else if (currentChapter == 6) {  		updateDoor(l); @@ -2539,7 +2543,7 @@ bool DrasculaEngine::exitRoom(int l) {  			clearRoom();  			sscanf(_targetSurface[l], "%d", &roomNum);  			curX = -1; -			enterNewRoom(roomNum); +			enterRoom(roomNum);  			if (objExit == 105)  				animation_19_6(); diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index a28e095bdd..7034fad43b 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -314,7 +314,7 @@ public:  	void setDarkPalette();  	void withoutVerb(); -	void enterNewRoom(int); +	void enterRoom(int);  	void clearRoom();  	void gotoObject(int, int);  	void moveCursor(); | 
