[Scummvm-cvs-logs] CVS: scummvm/scumm script_v6.cpp,1.144,1.145 script_v8.cpp,2.174,2.175

Max Horn fingolfin at users.sourceforge.net
Sat May 31 14:43:04 CEST 2003


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv22115

Modified Files:
	script_v6.cpp script_v8.cpp 
Log Message:
cleanup

Index: script_v6.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v6.cpp,v
retrieving revision 1.144
retrieving revision 1.145
diff -u -d -r1.144 -r1.145
--- script_v6.cpp	31 May 2003 21:25:13 -0000	1.144
+++ script_v6.cpp	31 May 2003 21:42:33 -0000	1.145
@@ -3072,62 +3072,44 @@
 	case 74:
 		_string[m].no_talk_anim = true;
 		break;
-	case 75:{
-			_messagePtr = _scriptPointer;
+	case 75:
+		_messagePtr = _scriptPointer;
+		_scriptPointer += resStrLen(_scriptPointer)+ 1;
 
-			if ((_messagePtr[0] == '/') && (_gameId == GID_DIG)) {
-				char pointer[20];
-				int i, j;
+		if ((_messagePtr[0] == '/') && (_gameId == GID_DIG)) {
+			char pointer[20];
+			int i, j;
 
-				_scriptPointer += resStrLen(_scriptPointer)+ 1;
-				translateText(_messagePtr, _transText);
-				for (i = 0, j = 0; (_messagePtr[i] != '/' || j == 0) && j < 19; i++) {
-					if (_messagePtr[i] != '/')
-						pointer[j++] = _messagePtr[i];
-				}
-				pointer[j] = 0;
+			translateText(_messagePtr, _transText);
+			for (i = 0, j = 0; (_messagePtr[i] != '/' || j == 0) && j < 19; i++) {
+				if (_messagePtr[i] != '/')
+					pointer[j++] = _messagePtr[i];
+			}
+			pointer[j] = 0;
 
-				// Stop any talking that's still going on
-				if (_sound->_talkChannel > -1)
-					_mixer->stop(_sound->_talkChannel);
+			// Stop any talking that's still going on
+			if (_sound->_talkChannel > -1)
+				_mixer->stop(_sound->_talkChannel);
 
-				_sound->_talkChannel = _sound->playBundleSound(pointer);
-				_messagePtr = _transText;
+			_sound->_talkChannel = _sound->playBundleSound(pointer);
+			_messagePtr = _transText;
+		}
 
-				switch (m) {
-				case 0:
-					actorTalk();
-					break;
-				case 1:
-					drawString(1);
-					break;
-				case 2:
-					unkMessage1();
-					break;
-				case 3:
-					unkMessage2();
-					break;
-				}
-				return;
-			} else {
-				switch (m) {
-				case 0:
-					actorTalk();
-					break;
-				case 1:
-					drawString(1);
-					break;
-				case 2:
-					unkMessage1();
-					break;
-				case 3:
-					unkMessage2();
-					break;
-				}
-				_scriptPointer = _messagePtr;
-				return;
-			}
+		switch (m) {
+		case 0:
+			actorTalk();
+			break;
+		case 1:
+			drawString(1);
+			break;
+		case 2:
+			unkMessage1();
+			break;
+		case 3:
+			unkMessage2();
+			break;
 		}
+		return;
 	case 0xFE:
 		setStringVars(m);
 		if (n)

Index: script_v8.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v8.cpp,v
retrieving revision 2.174
retrieving revision 2.175
diff -u -d -r2.174 -r2.175
--- script_v8.cpp	31 May 2003 21:25:14 -0000	2.174
+++ script_v8.cpp	31 May 2003 21:42:33 -0000	2.175
@@ -451,7 +451,6 @@
 
 void Scumm_v8::decodeParseString(int m, int n) {
 	byte b;
-	bool containsSpeech;
 
 	b = fetchScriptByte();
 
@@ -500,14 +499,12 @@
 		break;
 	case 0xD1:
 		_messagePtr = _scriptPointer;
-		
-		containsSpeech = (_messagePtr[0] == '/');
+		_scriptPointer += resStrLen(_scriptPointer)+ 1;
 
-		if (containsSpeech) {
+		if (_messagePtr[0] == '/') {
 			char pointer[20];
 			int i, j;
 
-			_scriptPointer += resStrLen(_scriptPointer) + 1;
 			translateText(_messagePtr, _transText);
 			for (i = 0, j = 0; (_messagePtr[i] != '/' || j == 0) && j < 19; i++) {
 				if (_messagePtr[i] != '/')
@@ -547,9 +544,6 @@
 			}
 			break;
 		}
-
-		if (!containsSpeech)
-			_scriptPointer = _messagePtr;
 		break;
 //	case 0xD2:		// SO_PRINT_WRAP Set print wordwrap
 //		error("decodeParseString: SO_PRINT_MUMBLE");





More information about the Scummvm-git-logs mailing list