diff options
Diffstat (limited to 'engines')
| -rw-r--r-- | engines/drascula/drascula.cpp | 10 | ||||
| -rw-r--r-- | engines/drascula/drascula.h | 2 | ||||
| -rw-r--r-- | engines/drascula/sound.cpp | 1 | ||||
| -rw-r--r-- | engines/drascula/talk.cpp | 44 | 
4 files changed, 31 insertions, 26 deletions
diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 9b4acd9594..fce4fa73c6 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -220,7 +220,7 @@ int DrasculaEngine::go() {  		allocMemory(); -		withVoices = 0; +		_subtitlesDisabled = !ConfMan.getBool("subtitles");  		selectionMade = 0;  		if (currentChapter != 3) @@ -560,12 +560,16 @@ bool DrasculaEngine::runCurrentChapter() {  		} else if (key == Common::KEYCODE_F8) {  			selectVerb(0);  		} else if (key == Common::KEYCODE_v) { -			withVoices = 1; +			_subtitlesDisabled = true; +			ConfMan.setBool("subtitles", !_subtitlesDisabled); +  			print_abc(_textsys[2], 96, 86);  			updateScreen();  			delay(1410);  		} else if (key == Common::KEYCODE_t) { -			withVoices = 0; +			_subtitlesDisabled = false; +			ConfMan.setBool("subtitles", !_subtitlesDisabled); +  			print_abc(_textsys[3], 94, 86);  			updateScreen();  			delay(1460); diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 3b499f27a0..4a00d35d10 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -380,7 +380,7 @@ public:  	int _destX[40], _destY[40], trackCharacter_alkeva[40], roomExits[40];  	int x1[40], y1[40], x2[40], y2[40];  	int takeObject, pickedObject; -	int withVoices; +	bool _subtitlesDisabled;  	int menuBar, menuScreen, hasName;  	char textName[20];  	int curExcuseLook; diff --git a/engines/drascula/sound.cpp b/engines/drascula/sound.cpp index 5b223056f3..9b45412a1d 100644 --- a/engines/drascula/sound.cpp +++ b/engines/drascula/sound.cpp @@ -174,6 +174,7 @@ void DrasculaEngine::playFile(const char *fname) {  		_arj.read(soundData, soundSize);  		_arj.close(); +		_subtitlesDisabled = !ConfMan.getBool("subtitles");  		if (ConfMan.getBool("speech_mute"))  			memset(soundData, 0, soundSize); // Mute speech but keep the pause diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index 7bf55b7c40..4ecc3e20f2 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -82,7 +82,7 @@ void DrasculaEngine::talk_igor(int index, int talkerType) {  			copyBackground(igorX + 17, igorY, igorX + 17, igorY, 37, 24, bgSurface, screenSurface);  			copyRect(x_talk0[face], 148, igorX + 17, igorY, 25, 24, frontSurface, screenSurface);  			updateRefresh(); -			if (withVoices == 0) +			if (!_subtitlesDisabled)  				centerText(said, igorX + 26, igorY);  			updateScreen();  			pause(3); @@ -95,13 +95,13 @@ void DrasculaEngine::talk_igor(int index, int talkerType) {  				copyBackground(igorX, igorY, igorX, igorY, 29, 25, bgSurface, screenSurface);  			copyRect(x_talk1[face], 173, igorX, igorY, 29, 25, frontSurface, screenSurface);  			updateRefresh(); -			if (withVoices == 0) +			if (!_subtitlesDisabled)  				centerText(said, igorX + 26, igorY);  			updateScreen();  			pause(3);  		} else if (talkerType == kIgorDoor) {  			updateRoom(); -			if (withVoices == 0) +			if (!_subtitlesDisabled)  				centerText(said, 87, 66);  			updateScreen();  		} else if (talkerType == kIgorSeated || talkerType == kIgorWig) { @@ -111,7 +111,7 @@ void DrasculaEngine::talk_igor(int index, int talkerType) {  				copyBackground(x_talk4[face], 78, 199, 94, 38, 27, drawSurface3, screenSurface);  			moveCharacters();  			updateRefresh(); -			if (withVoices == 0) +			if (!_subtitlesDisabled)  				centerText(said, 221, 102);  			updateScreen(); @@ -166,7 +166,7 @@ void DrasculaEngine::talk_drascula(int index, int talkerType) {  		updateRefresh(); -		if (withVoices == 0) +		if (!_subtitlesDisabled)  			centerText(said, drasculaX + 19, drasculaY);  		updateScreen(); @@ -211,7 +211,7 @@ void DrasculaEngine::talk_drascula_big(int index) {  		if (l == 7)  			l = 0; -		if (withVoices == 0) +		if (!_subtitlesDisabled)  			centerText(said, 191, 69);  		updateScreen(); @@ -237,7 +237,7 @@ void DrasculaEngine::talk_solo(const char *said, const char *filename) {  		copyBackground();  	do { -		if (withVoices == 0) { +		if (!_subtitlesDisabled) {  			if (currentChapter == 1)  				centerText(said, 156, 90);  			else if (currentChapter == 6) @@ -300,7 +300,7 @@ void DrasculaEngine::talk_bartender(int index, int talkerType) {  		moveCharacters();  		updateRefresh(); -		if (withVoices == 0) +		if (!_subtitlesDisabled)  			centerText(said, 132, 45);  		updateScreen(); @@ -339,7 +339,7 @@ void DrasculaEngine::talk_bj(int index) {  			moveCharacters();  			updateRefresh(); -			if (withVoices == 0) +			if (!_subtitlesDisabled)  				centerText(said, bjX + 7, bjY);  			updateScreen(); @@ -348,7 +348,7 @@ void DrasculaEngine::talk_bj(int index) {  		} else {  			updateRoom(); -			if (withVoices == 0) +			if (!_subtitlesDisabled)  				centerText(said, 93, 80);  			updateScreen(); @@ -463,7 +463,7 @@ void DrasculaEngine::talk(const char *said, const char *filename) {  			updateRefresh();  		} -		if (withVoices == 0) +		if (!_subtitlesDisabled)  			centerText(said, curX, curY);  		updateScreen(); @@ -555,7 +555,7 @@ void DrasculaEngine::talk_vonBraun(int index, int talkerType) {  				updateRefresh();  			} -			if (withVoices == 0) +			if (!_subtitlesDisabled)  				centerText(said, vonBraunX, 66);  			updateScreen(); @@ -563,7 +563,7 @@ void DrasculaEngine::talk_vonBraun(int index, int talkerType) {  		} else {  			updateRoom(); -			if (withVoices == 0) +			if (!_subtitlesDisabled)  				centerText(said, 150, 80);  			updateScreen(); @@ -617,7 +617,7 @@ void DrasculaEngine::talk_blind(int index) {  			copyRect(bX, 2, 73, 1, 126, h, frontSurface, screenSurface);  		} -		if (withVoices == 0) +		if (!_subtitlesDisabled)  			centerText(said, 260, 71);  		updateScreen(); @@ -639,7 +639,7 @@ void DrasculaEngine::talk_hacker(int index) {  	talkInit(filename);  	do { -		if (withVoices == 0) +		if (!_subtitlesDisabled)  			centerText(said, 156, 170);  		updateScreen();  	} while (!isTalkFinished()); @@ -700,7 +700,7 @@ void DrasculaEngine::talk_pen(const char *said, const char *filename, int talker  		updateRefresh(); -		if (withVoices == 0) { +		if (!_subtitlesDisabled) {  			if (talkerType == 0)  				centerText(said, 160, 105);  			else @@ -741,7 +741,7 @@ void DrasculaEngine::talk_bj_bed(int index) {  		moveCharacters();  		updateRefresh(); -		if (withVoices == 0) +		if (!_subtitlesDisabled)  			centerText(said, 104, 102);  		updateScreen(); @@ -777,7 +777,7 @@ void DrasculaEngine::talk_htel(int index) {  		else  			copyBackground(x_talk[face], 1, 45, 24, 92, 108, backSurface, screenSurface); -		if (withVoices == 0) +		if (!_subtitlesDisabled)  			centerText(said, 90, 50);  		updateScreen(); @@ -857,7 +857,7 @@ void DrasculaEngine::talk_sync(const char *said, const char *filename, const cha  			updateRefresh();  		} -		if (withVoices == 0) +		if (!_subtitlesDisabled)  			centerText(said, curX, curY);  		updateScreen(); @@ -890,7 +890,7 @@ void DrasculaEngine::talk_trunk(int index) {  		flags[19] = face;  		updateRoom(); -		if (withVoices == 0) +		if (!_subtitlesDisabled)  			centerText(said, 263, 69);  		updateScreen(); @@ -917,7 +917,7 @@ void DrasculaEngine::talk_generic(const char* said, const char* filename, int* f  		moveCharacters();  		updateRefresh(); -		if (withVoices == 0) +		if (!_subtitlesDisabled)  			centerText(said, coords[5], coords[6]);  		updateScreen(); @@ -938,7 +938,7 @@ void DrasculaEngine::grr() {  	updateRoom();  	copyBackground(253, 110, 150, 65, 20, 30, drawSurface3, screenSurface); -	if (withVoices == 0) +	if (!_subtitlesDisabled)  		centerText("groaaarrrrgghhhh!", 153, 65);  	updateScreen();  | 
