[Scummvm-cvs-logs] CVS: scummvm/scumm script_v2.cpp,2.191,2.192

Travis Howell kirben at users.sourceforge.net
Sat Sep 6 01:47:05 CEST 2003


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

Modified Files:
	script_v2.cpp 
Log Message:

Other v1/v2 resources are invalid, checked again v1 maniac and v1/v2 zak.


Index: script_v2.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v2.cpp,v
retrieving revision 2.191
retrieving revision 2.192
diff -u -d -r2.191 -r2.192
--- script_v2.cpp	5 Sep 2003 20:18:28 -0000	2.191
+++ script_v2.cpp	6 Sep 2003 08:46:36 -0000	2.192
@@ -767,11 +767,11 @@
 
 void Scumm_v2::o2_resourceRoutines() {
 	const ResTypes resTypes[] = {
-			rtNumTypes,	// Unknown / invalid
-			rtNumTypes,	// Unknown / invalid
+			rtNumTypes,	// Invalid
+			rtNumTypes,	// Invalid
 			rtCostume,
 			rtRoom,
-			rtNumTypes,	// Unknown / invalid
+			rtNumTypes,	// Invalid
 			rtScript,
 			rtSound
 		};
@@ -782,24 +782,16 @@
 	if (0 <= (opcode >> 4) && (opcode >> 4) < (int)ARRAYSIZE(resTypes))
 		type = resTypes[opcode >> 4];
 
-	if (type == rtNumTypes) {
-		warning("o2_resourceRoutines: unknown restype %d", (opcode >> 4));
+	if (type == rtNumTypes)
 		return;
-	}
 
-	if (((opcode & 0x0f) == 0) || ((opcode & 0x0f) == 1)) {
-		if (opcode & 1) {
-			ensureResourceLoaded(type, resid);
-		} else {
-			// Seems the nuke opcodes do nothing?
-			warning("o2_resourceRoutines: nuking resType %d, id %d does nothing", type, resid);
-		}
+	if ((opcode & 0x0f) == 1) {
+		ensureResourceLoaded(type, resid);
 	} else {
-		if (opcode & 1) {
+		if (opcode & 1)
 			lock(type, resid);
-		} else {
+		else
 			unlock(type, resid);
-		}
 	}
 }
 





More information about the Scummvm-git-logs mailing list