[Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.145,1.146

Max Horn fingolfin at users.sourceforge.net
Sat Jul 26 00:30:03 CEST 2003


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

Modified Files:
	actor.cpp 
Log Message:
fixed setActorCostume for COMI; fixees bug #754421 and hopefully also the issue described in patch #696033

Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/actor.cpp,v
retrieving revision 1.145
retrieving revision 1.146
diff -u -d -r1.145 -r1.146
--- actor.cpp	24 Jul 2003 23:33:43 -0000	1.145
+++ actor.cpp	25 Jul 2003 18:07:42 -0000	1.146
@@ -1174,17 +1174,31 @@
 	int i;
 
 	costumeNeedsInit = true;
-
-	if (visible) {
-		hideActor();
+	
+	if (_vm->_version == 8) {
 		cost.reset();
+		memset(animVariable, 0, sizeof(animVariable));
 		costume = c;
-		showActor();
+		
+		if (visible) {
+			if (costume) {
+				_vm->ensureResourceLoaded(rtCostume, costume);
+			}
+			startAnimActor(initFrame);
+		}
 	} else {
-		costume = c;
-		cost.reset();
+		if (visible) {
+			hideActor();
+			cost.reset();
+			costume = c;
+			showActor();
+		} else {
+			costume = c;
+			cost.reset();
+		}
 	}
 
+
 	if (_vm->_features & GF_NEW_COSTUMES) {
 		for (i = 0; i < 256; i++)
 			palette[i] = 0xFF;
@@ -1195,7 +1209,6 @@
 		for (i = 0; i < 32; i++)
 			palette[i] = 0xFF;
 	}
-
 }
 
 void Actor::startWalkActor(int destX, int destY, int dir) {





More information about the Scummvm-git-logs mailing list