[Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.388,1.389

Gregory Montoir cyx at users.sourceforge.net
Mon Oct 31 11:49:34 CET 2005


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9706/scumm

Modified Files:
	actor.cpp 
Log Message:
- VAR_CHARCOUNT isn't set in v7/v8, removed reference to it from v7::actorTalk()
- simplified some versions related checks


Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/actor.cpp,v
retrieving revision 1.388
retrieving revision 1.389
diff -u -d -r1.388 -r1.389
--- actor.cpp	29 Oct 2005 04:48:47 -0000	1.388
+++ actor.cpp	31 Oct 2005 19:48:48 -0000	1.389
@@ -1338,15 +1338,13 @@
 	// Play associated speech, if any
 	playSpeech((byte *)_lastStringTag);
 
+	if ((_version == 7 && !_keepText) || (_version == 8 && VAR(VAR_HAVE_MSG))) {
+		stopTalk();
+	}
 	if (_actorToPrintStrFor == 0xFF) {
-		if ((_version <= 7 && !_keepText) || (_version == 8 && VAR(VAR_HAVE_MSG))) {
-			stopTalk();
-		}
 		setTalkingActor(0xFF);
 	} else {
 		a = derefActor(_actorToPrintStrFor, "actorTalk");
-		if ((_version <= 7 && !_keepText) || (_version == 8 && VAR(VAR_HAVE_MSG)))
-			stopTalk();
 		setTalkingActor(a->_number);
 		if (!_string[0].no_talk_anim) {
 			a->runActorTalkScript(a->_talkStartFrame);
@@ -1363,10 +1361,8 @@
 	_charsetBufPos = 0;
 	_talkDelay = 0;
 	_haveMsg = 0xFF;
-	if (_version <= 7)
+	if (_version == 7)
 		VAR(VAR_HAVE_MSG) = 0xFF;
-	if (VAR_CHARCOUNT != 0xFF)
-		VAR(VAR_CHARCOUNT) = 0;
 	CHARSET_1();
 }
 #endif
@@ -1383,7 +1379,7 @@
 	}
 
 	if (_actorToPrintStrFor == 0xFF) {
-		if ((_version <= 7 && !_keepText) || (_version == 8 && VAR(VAR_HAVE_MSG))) {
+		if (!_keepText) {
 			stopTalk();
 		}
 		setTalkingActor(0xFF);
@@ -1397,11 +1393,12 @@
 		}
 
 		a = derefActor(_actorToPrintStrFor, "actorTalk");
-		if (!a->isInCurrentRoom() && (_version <= 6)) {
+		if (!a->isInCurrentRoom()) {
 			oldact = 0xFF;
 		} else {
-			if ((_version <= 7 && !_keepText) || (_version == 8 && VAR(VAR_HAVE_MSG)))
+			if (!_keepText) {
 				stopTalk();
+			}
 			setTalkingActor(a->_number);
 			a->_heTalking = true;
 			if (!_string[0].no_talk_anim) {
@@ -1428,8 +1425,7 @@
 	_charsetBufPos = 0;
 	_talkDelay = 0;
 	_haveMsg = 0xFF;
-	if (_version <= 7)
-		VAR(VAR_HAVE_MSG) = 0xFF;
+	VAR(VAR_HAVE_MSG) = 0xFF;
 	if (VAR_CHARCOUNT != 0xFF)
 		VAR(VAR_CHARCOUNT) = 0;
 	CHARSET_1();





More information about the Scummvm-git-logs mailing list