[Scummvm-cvs-logs] CVS: scummvm/simon items.cpp,1.98,1.99 simon.cpp,1.328,1.329 vga.cpp,1.88,1.89

Travis Howell kirben at users.sourceforge.net
Sat Oct 25 22:39:01 CEST 2003


Update of /cvsroot/scummvm/scummvm/simon
In directory sc8-pr-cvs1:/tmp/cvs-serv28706/simon

Modified Files:
	items.cpp simon.cpp vga.cpp 
Log Message:

Add combined speech and subtitles support for simon2.


Index: items.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/items.cpp,v
retrieving revision 1.98
retrieving revision 1.99
diff -u -d -r1.98 -r1.99
--- items.cpp	21 Oct 2003 11:41:33 -0000	1.98
+++ items.cpp	26 Oct 2003 05:31:36 -0000	1.99
@@ -1001,17 +1001,10 @@
 				if (_game & GF_TALKIE) 
 					speech_id = _array_4[string_id];
 
-				if (_game & GF_SIMON2) {
-					if (speech_id != 0 && (_language == 20 || !_subtitles))
-						talk_with_speech(speech_id, vga_struct_id);
-					if (string_ptr != NULL && _subtitles)
-						talk_with_text(vga_struct_id, color, string_ptr, tv->a, tv->b, tv->c);
-				} else {
-					if (speech_id != 0)
-						talk_with_speech(speech_id, vga_struct_id);
-					if (string_ptr != NULL && _subtitles)
-						talk_with_text(vga_struct_id, color, string_ptr, tv->a, tv->b, tv->c);
-				}
+				if (speech_id != 0)
+					talk_with_speech(speech_id, vga_struct_id);
+				if (string_ptr != NULL && _subtitles)
+					talk_with_text(vga_struct_id, color, string_ptr, tv->a, tv->b, tv->c);
 			}
 			break;
 
@@ -1298,7 +1291,7 @@
 				}
 			}
 
-			if (_language == 20 || !_subtitles)
+			if (_subtitles)
 				talk_with_speech(var200, vga_struct_id);
 		}
 

Index: simon.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.cpp,v
retrieving revision 1.328
retrieving revision 1.329
diff -u -d -r1.328 -r1.329
--- simon.cpp	26 Oct 2003 04:07:44 -0000	1.328
+++ simon.cpp	26 Oct 2003 05:31:36 -0000	1.329
@@ -2116,38 +2116,19 @@
 	uint speech_id = 0;
 	ThreeValues *tv;
 
-	if (_game & GF_TALKIE) {
-		if (string_id != 0xFFFF)
-			string_ptr = getStringPtrByID(string_id);
+	if (string_id != 0xFFFF)
+		string_ptr = getStringPtrByID(string_id);
 
+	if (_game & GF_TALKIE)
 		speech_id = (uint16)getNextWord();
-	} else {
-		string_ptr = getStringPtrByID(string_id);
-	}
 
 	tv = getThreeValues(vga_sprite_id);
 
-	if ((_game & GF_SIMON2) && (_game & GF_TALKIE)) {
-		if (speech_id != 0 && vga_sprite_id == 1 && (_language == 20 || !_subtitles))
-			talk_with_speech(speech_id, vga_sprite_id);
-
-		if ((_game & GF_TALKIE) && (speech_id == 0))
-			o_kill_sprite_simon2(2, vga_sprite_id + 2);
-
-		if (string_ptr != NULL && (speech_id == 0 || _subtitles))
-			talk_with_text(vga_sprite_id, color, (const char *)string_ptr, tv->a, tv->b, tv->c);
-
-	} else if (_game & GF_TALKIE) {
-		if (speech_id != 0)
-			talk_with_speech(speech_id, vga_sprite_id);
-		if (string_ptr != NULL && (speech_id == 0 || _subtitles))
-			talk_with_text(vga_sprite_id, color, (const char *)string_ptr, tv->a, tv->b, tv->c);
-
-	} else {
+	if (speech_id != 0)
+		talk_with_speech(speech_id, vga_sprite_id);
+	if (string_ptr != NULL && (speech_id == 0 || _subtitles))
 		talk_with_text(vga_sprite_id, color, (const char *)string_ptr, tv->a, tv->b, tv->c);
 
-	}
-
 }
 
 void SimonEngine::ensureVgaResLoadedC(uint vga_res) {
@@ -3992,10 +3973,9 @@
 			}
 			_skip_vga_wait = true;
 		} else {
-			if (_subtitles && _scriptvar_2) {
-				start_vga_code(4, 2, 5, 0, 0, 0);
-				o_wait_for_vga(205);
-				o_kill_sprite_simon2(2, 5);
+			if (_subtitles) {
+				_sound->playVoice(speech_id);
+				return;	
 			}
 			o_kill_sprite_simon2(2, vga_sprite_id + 2);
 			_sound->playVoice(speech_id);
@@ -4715,23 +4695,12 @@
 		_start_mainscript = true;
 
 	if (_game & GF_TALKIE) {
-		if (_game & GF_SIMON2) {
-			// Allow choice in Hebrew version of Simon the Sorcerer 2
-			if (_language == 20) {
-				if (_noSubtitles)
-					_subtitles = false;
-			// Check for speech file in other versions of Simon the Sorcerer 2
-			} else {
-				if (_sound->hasVoice())
-					_subtitles = false;
-			}
-		// English and German versions of Simon the Sorcerer 1 don't have full subtitles
-		} else if (_language < 2) {
-			_subtitles = false;
-		// Allow choice in other versions of Simon the Sorcerer 1
-		} else {
+		if ((_game & GF_SIMON2) || _language >= 2) {
 			if (_noSubtitles)
 				_subtitles = false;
+		// English and German versions of Simon the Sorcerer 1 don't have full subtitles
+		} else {
+			_subtitles = false;
 		}
 	}
 

Index: vga.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/vga.cpp,v
retrieving revision 1.88
retrieving revision 1.89
diff -u -d -r1.88 -r1.89
--- vga.cpp	26 Oct 2003 04:37:11 -0000	1.88
+++ vga.cpp	26 Oct 2003 05:31:36 -0000	1.89
@@ -1780,7 +1780,7 @@
 
 void SimonEngine::vc_64_skip_if_no_speech() {
 	// Simon2
-	if (_sound->_voice_handle == 0)
+	if ((_sound->_voice_handle == 0) || _subtitles)
 		vc_skip_next_instruction();
 }
 





More information about the Scummvm-git-logs mailing list