[Scummvm-cvs-logs] CVS: scummvm/queen cutaway.h,1.15,1.16 cutaway.cpp,1.36,1.37

David Eriksson twogood at users.sourceforge.net
Sun Oct 19 04:05:24 CEST 2003


Update of /cvsroot/scummvm/scummvm/queen
In directory sc8-pr-cvs1:/tmp/cvs-serv22255

Modified Files:
	cutaway.h cutaway.cpp 
Log Message:
- currentImage stuff
- create correct voice file prefix


Index: cutaway.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/cutaway.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- cutaway.h	18 Oct 2003 12:48:05 -0000	1.15
+++ cutaway.h	19 Oct 2003 11:01:22 -0000	1.16
@@ -202,6 +202,8 @@
 		//! Song played before running comic.cut
 		int16 _songBeforeComic;
 
+		int16 _currentImage;
+
 
 		Cutaway(
 				const char *filename, 

Index: cutaway.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/cutaway.cpp,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- cutaway.cpp	18 Oct 2003 16:19:36 -0000	1.36
+++ cutaway.cpp	19 Oct 2003 11:01:23 -0000	1.37
@@ -592,7 +592,7 @@
 
 	_logic->roomDisplay(_logic->roomName(_logic->currentRoom()), mode, 0, _comPanel, true);
 
-	// XXX CI=FRAMES;
+	_currentImage = _logic->numFrames();
 
 	_temporaryRoom = _logic->currentRoom();
 
@@ -670,6 +670,14 @@
 byte *Cutaway::getCutawayAnim(byte *ptr, int header, CutawayAnim &anim) {
 	// lines 1531-1607 in cutaway.c
 
+	debug(0, "[Cutaway::getCutawayAnim] header=%i", header);
+
+	// XXX why is Joe flying???
+	if (_logic->currentRoom() == 112 && header == 0) {
+		warning("Hack to show airplane instead of Joe at last credit scene");
+		header = 763;
+	}
+
 	anim.currentFrame = 0;
 	anim.originalFrame = 0;
 
@@ -796,6 +804,7 @@
 			error("Header too large");
 
 		ptr = getCutawayAnim(ptr, header, objAnim[frameCount]);
+		//dumpCutawayAnim(objAnim[frameCount]);
 
 		frameCount++;
 
@@ -813,8 +822,7 @@
 			warning("The oracle is not yet handled");
 		}
 		else {
-			int currentImage = 0;
-			currentImage = makeComplexAnimation(currentImage, objAnim, frameCount);
+			_currentImage = makeComplexAnimation(_currentImage, objAnim, frameCount);
 		}
 
 		if (object.bobStartX || object.bobStartY) {
@@ -879,10 +887,10 @@
 					// Unpack animation, but do not unpack moving people
 
 					if (!((objAnim[i].mx || objAnim[i].my) && InRange(objAnim[i].object, 0, 3))) {
-						/*debug(0, "Animation - bankUnpack(%i, %i, %i);",
+						debug(0, "Animation - bankUnpack(%i, %i, %i);",
 								objAnim[i].unpackFrame, 
 								objAnim[i].originalFrame,
-								objAnim[i].bank);*/
+								objAnim[i].bank);
 						_graphics->bankUnpack(
 								objAnim[i].unpackFrame, 
 								objAnim[i].originalFrame,
@@ -956,7 +964,8 @@
 	strcpy(result, basename);
 	for (int i = strlen(basename); i < 5; i++)
 		result[i] = '_';
-	snprintf(result + 5, 2, "%02i", index);
+	snprintf(result + 5, 3, "%02i", index);
+	//debug(0, "findCdCut(\"%s\", %i, \"%s\")", basename, index, result);
 }
 
 void Cutaway::handlePersonRecord(
@@ -990,7 +999,7 @@
 			_walk->personMove(
 					&p, 
 					object.moveToX, object.moveToY,
-					_logic->numFrames() + 1, 		// XXX CI+1
+					_currentImage + 1, 		// XXX CI+1
 					_logic->objectData(object.objectNumber)->image
 					);
 	}
@@ -1045,7 +1054,7 @@
 	for (int i = 0; i < _cutawayObjectCount; i++) {
 		CutawayObject object;
 		ptr = getCutawayObject(ptr, object);
-//		dumpCutawayObject(i, object);
+		//dumpCutawayObject(i, object);
 
 		if (!object.moveToX && 
 				!object.moveToY && 
@@ -1096,7 +1105,7 @@
 				break;
 
 			case OBJECT_TYPE_PERSON:
-				handlePersonRecord(i, object, sentence);
+				handlePersonRecord(i + 1, object, sentence);
 				break;
 
 			case OBJECT_TYPE_NO_ANIMATION:





More information about the Scummvm-git-logs mailing list