[Scummvm-cvs-logs] CVS: scummvm/scumm intern.h,2.508,2.509 script_v90he.cpp,2.272,2.273

kirben kirben at users.sourceforge.net
Mon Jun 13 03:51:33 CEST 2005


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

Modified Files:
	intern.h script_v90he.cpp 
Log Message:

Add comments on smacker opcodes.


Index: intern.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/intern.h,v
retrieving revision 2.508
retrieving revision 2.509
diff -u -d -r2.508 -r2.509
--- intern.h	13 Jun 2005 07:08:58 -0000	2.508
+++ intern.h	13 Jun 2005 10:48:55 -0000	2.509
@@ -1089,6 +1089,16 @@
 
 	FloodStateParameters _floodStateParams;
 
+	struct VideoParameters {
+		byte filename[260];
+		int32 status;
+		int32 unk1;
+		int32 unk2;
+		int32 unk3;
+	};
+
+	VideoParameters _videoParams;
+
 	int32 _heObject, _heObjectNum;
 	int32 _hePaletteNum;
 

Index: script_v90he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v90he.cpp,v
retrieving revision 2.272
retrieving revision 2.273
diff -u -d -r2.272 -r2.273
--- script_v90he.cpp	13 Jun 2005 07:09:10 -0000	2.272
+++ script_v90he.cpp	13 Jun 2005 10:48:55 -0000	2.273
@@ -512,28 +512,45 @@
 }
 
 void ScummEngine_v90he::o90_smackerOps() {
-	byte smackerFilename[260];
-
-	int subOp = fetchScriptByte();
-	subOp -= 49;
+	int status = fetchScriptByte();
+	int subOp = status - 49;
 
 	switch (subOp) {
 	case 0:
-		copyScriptString(smackerFilename, sizeof(smackerFilename));
+		copyScriptString(_videoParams.filename, sizeof(_videoParams.filename));
+		_videoParams.status = status;
 		break;
 	case 5:
-		pop();
+		_videoParams.unk1 |= pop();
 		break;
 	case 8:
-		memset(smackerFilename, 0, sizeof(smackerFilename));
-		pop();
+		memset(_videoParams.filename, 0, sizeof(_videoParams.filename));
+		_videoParams.unk2 = pop();
 		break;
 	case 14:
-		pop();
+		_videoParams.unk3 = pop();
+		if (_videoParams.unk1)
+			_videoParams.unk1 |= 2;
 		break;
 	case 116:
+		_videoParams.status = status;
 		break;
 	case 206:
+		if (_videoParams.status == 49) {
+			// Start video
+			if (_videoParams.unk1 == 0)
+				_videoParams.unk1 = 4;
+
+			if (_videoParams.unk1 == 2) {
+				// result = startVideo(_videoParams.filename, _videoParams.unk1, _videoParams.unk3);
+				// VAR(119) = result;
+			} else {
+				// result = startVideo(_videoParams.filename, _videoParams.unk1);
+				// VAR(119) = result;
+			}
+		} else if (_videoParams.status == 165) {
+			// Stop video
+		}
 		break;
 	default:
 		error("o90_smackerOps: unhandled case %d", subOp);
@@ -547,22 +564,22 @@
 	subOp -= 32;
 
 	switch (subOp) {
-	case 0:
+	case 0:		// Get width
 		pop();
 		break;
-	case 1:
+	case 1:		// Get height
 		pop();
 		break;
-	case 4:
+	case 4:		// Get frame count
 		pop();
 		break;
-	case 20:
+	case 20:	// Get current frame
 		pop();
 		break;
-	case 31:
+	case 31:	// Get image number
 		pop();
 		break;
-	case 107:
+	case 107:	// Get genreal property
 		pop();
 		pop();
 		break;





More information about the Scummvm-git-logs mailing list