[Scummvm-cvs-logs] CVS: scummvm/simon items.cpp,1.20,1.21 simon.cpp,1.87,1.88

Travis Howell kirben at users.sourceforge.net
Wed Nov 20 00:07:02 CET 2002


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

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

Revert earlier change for optional text support in simon1talkie/win since the data files don't have complete text.
I have left TEXT_HACK removed for the same reason.


Index: items.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/items.cpp,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- items.cpp	20 Nov 2002 06:33:11 -0000	1.20
+++ items.cpp	20 Nov 2002 08:05:55 -0000	1.21
@@ -1009,34 +1009,11 @@
 		case 179:{
 				if (_game == GAME_SIMON1TALKIE || _game == GAME_SIMON1WIN) {
 					uint b = getVarOrByte();
-					uint c = getVarOrByte();
+					/*uint c = */ getVarOrByte();
 					uint a = getVarOrByte();
 					uint d = _array_4[a];
-						const char *s = (const char *)getStringPtrByID(_stringid_array_3[a]);
-						ThreeValues *tv;
-
-						switch (b) {
-						case 1:
-							tv = &_threevalues_1;
-							break;
-						case 2:
-							tv = &_threevalues_2;
-							break;
-						case 101:
-							tv = &_threevalues_3;
-							break;
-						case 102:
-							tv = &_threevalues_4;
-							break;
-						default:
-							error("setup text, invalid value %d", b);
-						}
-
-					if (_vk_t_toggle) {
-						talk_with_text(b, c, s, tv->a, tv->b, tv->c);
-					} else if (d != 0) {
-							talk_with_speech(d, b);
-					}
+					if (d != 0)
+						talk_with_speech(d, b);
 				} else if (_game == GAME_SIMON1DEMO || _game == GAME_SIMON1DOS) {
 					uint b = getVarOrByte();
 					uint c = getVarOrByte();
@@ -1325,49 +1302,15 @@
 {
 	if (_game == GAME_SIMON1TALKIE || _game == GAME_SIMON1WIN) {
 		uint a = getVarOrByte();
-		uint b = getVarOrByte();
+		/*uint b = */ getVarOrByte();
 		uint offs;
 		Child2 *child = (Child2 *)findChildOfType(getNextItemPtr(), 2);
-		const char *s = NULL;
-		ThreeValues *tv = NULL;
-		char buf[256];
-
-		if (child != NULL && child->avail_props & 1) {
-			s = (const char *)getStringPtrByID(child->array[0]);
-			switch (a) {
-			case 1:
-				tv = &_threevalues_1;
-				break;
-			case 2:
-				tv = &_threevalues_2;
-				break;
-			case 101:
-				tv = &_threevalues_3;
-				break;
-			case 102:
-				tv = &_threevalues_4;
-				break;
-			default:
-				error("setup text, invalid value %d", a);
-			}
-		}
-
-		if (_vk_t_toggle) {
-				if (child->avail_props & 0x100) {
-					uint x = getOffsetOfChild2Param(child, 0x100);
-					sprintf(buf, "%d%s", child->array[x], s);
-					s = buf;
-				}	
-
-				talk_with_text(a, b, s, tv->a, tv->b, tv->c);
-		} else {
-			if (child != NULL && child->avail_props & 0x200) {
-				offs = getOffsetOfChild2Param(child, 0x200);
-				talk_with_speech(child->array[offs], a);
-			} else if (child != NULL && child->avail_props & 0x100) {
-				offs = getOffsetOfChild2Param(child, 0x100);
-				talk_with_speech(child->array[offs] + 3550, a);
-		}
+		if (child != NULL && child->avail_props & 0x200) {
+			offs = getOffsetOfChild2Param(child, 0x200);
+			talk_with_speech(child->array[offs], a);
+		} else if (child != NULL && child->avail_props & 0x100) {
+			offs = getOffsetOfChild2Param(child, 0x100);
+			talk_with_speech(child->array[offs] + 3550, a);
 		}
 	} else if ((_game == GAME_SIMON1DEMO) || (_game == GAME_SIMON1DOS)) {
 		uint a = getVarOrByte();

Index: simon.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.cpp,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -d -r1.87 -r1.88
--- simon.cpp	20 Nov 2002 06:33:11 -0000	1.87
+++ simon.cpp	20 Nov 2002 08:05:56 -0000	1.88
@@ -1772,11 +1772,11 @@
 	switch (_game) {
 	case GAME_SIMON1TALKIE:
 	case GAME_SIMON1WIN:
-		if (speech_id != 0 && !_vk_t_toggle) {
-			talk_with_speech(speech_id, num_1);
-		} else if (string_ptr != NULL) {
-			talk_with_text(num_1, num_2, (char *)string_ptr, tv->a, tv->b, tv->c);
-		}
+ 		if (speech_id != 0) {
+  			talk_with_speech(speech_id, num_1);
+  		} else if (string_ptr != NULL) {
+  			talk_with_text(num_1, num_2, (char *)string_ptr, tv->a, tv->b, tv->c);
+  		}
 		break;
 
 	case GAME_SIMON1DEMO:
@@ -3422,9 +3422,10 @@
 
 bool SimonState::vc_59_helper()
 {
-	if (_vk_t_toggle)
+	if (_voice_file == NULL)
 		return true;
 	return _voice_sound == 0;
+#endif
 }
 
 void SimonState::video_copy_if_flag_0x8_c(FillOrCopyStruct *fcs)
@@ -3792,7 +3793,6 @@
 			_skip_vga_wait = true;
 			return;
 		}
-
 		if (num_1 < 100) {
 			o_unk_99_simon1(num_1 + 201);
 		}
@@ -4555,12 +4555,7 @@
 	
 	_mainscript_toggle = false;
 	_vgascript_toggle = false;
-
-	if (_voice_type != FORMAT_NONE) {
 	_vk_t_toggle = false;
-	} else {
-	_vk_t_toggle = true;
-	}
 
 	while (1) {
 		hitarea_stuff();





More information about the Scummvm-git-logs mailing list