[Scummvm-cvs-logs] CVS: scummvm/saga sfuncs.cpp,1.50,1.51 actor.cpp,1.50,1.51

Andrew Kurushin h00ligan at users.sourceforge.net
Fri Dec 24 06:22:04 CET 2004


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

Modified Files:
	sfuncs.cpp actor.cpp 
Log Message:
- resolved protagonist swapping problem

Index: sfuncs.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/sfuncs.cpp,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -d -r1.50 -r1.51
--- sfuncs.cpp	24 Dec 2004 11:09:00 -0000	1.50
+++ sfuncs.cpp	24 Dec 2004 14:21:47 -0000	1.51
@@ -759,7 +759,7 @@
 	if (frameRange->frameCount <= frameOffset) {
 	//	frameRange = _vm->_actor->getActorFrameRange(actorId, frameType);
 
-		warning("Wrong frameOffset 0x%X", frameOffset);
+		error("Wrong frameOffset 0x%X", frameOffset);
 	}
 	actor->frameNumber = frameRange->frameIndex + frameOffset;
 

Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/actor.cpp,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -d -r1.50 -r1.51
--- actor.cpp	24 Dec 2004 13:42:05 -0000	1.50
+++ actor.cpp	24 Dec 2004 14:21:47 -0000	1.51
@@ -197,6 +197,13 @@
 	if (!IS_VALID_ACTOR_ID(actorId))
 		error("Actor::getActor Wrong actorId 0x%X", actorId);
 
+	if (actorId == ID_PROTAG) {
+		if (_protagonist == NULL) {
+			error("_protagonist == NULL");
+		}
+		return _protagonist;
+	}
+
 	actor = &_actors[ACTOR_ID_TO_INDEX(actorId)];
 
 	if (actor->disabled)
@@ -316,6 +323,7 @@
 		} else {
 			removeFirst = true;
 		}		
+		_activeSpeech.playing = false;
 	}
 
 	if (removeFirst) {
@@ -323,7 +331,6 @@
 			_activeSpeech.strings[i - 1] = _activeSpeech.strings[i];
 		}
 		_activeSpeech.stringsCount--;
-		_activeSpeech.playing = false;
 	}
 
 	if (!isSpeaking())





More information about the Scummvm-git-logs mailing list