[Scummvm-cvs-logs] CVS: scummvm/scumm akos.cpp,1.107.2.1,1.107.2.2 intern.h,2.138,2.138.2.1 script_v6.cpp,1.293.2.1,1.293.2.2 script_v6he.cpp,2.15,2.15.2.1

Travis Howell kirben at users.sourceforge.net
Thu Feb 19 02:12:17 CET 2004


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

Modified Files:
      Tag: branch-0-6-0
	akos.cpp intern.h script_v6.cpp script_v6he.cpp 
Log Message:

Add recent fbear fixes.


Index: akos.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/akos.cpp,v
retrieving revision 1.107.2.1
retrieving revision 1.107.2.2
diff -u -d -r1.107.2.1 -r1.107.2.2
--- akos.cpp	15 Feb 2004 04:04:39 -0000	1.107.2.1
+++ akos.cpp	19 Feb 2004 10:01:02 -0000	1.107.2.2
@@ -1263,7 +1263,7 @@
 			if (akfo == NULL)
 				error("akos_increaseAnim: no AKFO table");
 			tmp = a->getAnimVar(GB(2)) - 1;
-			if (tmp < 0 || tmp >= numakfo - 1)
+			if (tmp < 0 || tmp > numakfo - 1)
 				error("akos_increaseAnim: invalid jump value %d", tmp);
 			curpos = READ_LE_UINT16(&akfo[tmp]);
 			break;

Index: intern.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/intern.h,v
retrieving revision 2.138
retrieving revision 2.138.2.1
diff -u -d -r2.138 -r2.138.2.1
--- intern.h	11 Feb 2004 03:36:27 -0000	2.138
+++ intern.h	19 Feb 2004 10:01:02 -0000	2.138.2.1
@@ -521,7 +521,7 @@
 	void o6_pickVarRandom();
 	void o6_getDateTime();
 	void o6_unknownE1();
-	void o6_unknownE4();
+	void o6_setBoxSet();
 	void o6_shuffle();
 
 	byte VAR_VIDEONAME;

Index: script_v6.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v6.cpp,v
retrieving revision 1.293.2.1
retrieving revision 1.293.2.2
diff -u -d -r1.293.2.1 -r1.293.2.2
--- script_v6.cpp	15 Feb 2004 03:57:22 -0000	1.293.2.1
+++ script_v6.cpp	19 Feb 2004 10:01:02 -0000	1.293.2.2
@@ -334,7 +334,7 @@
 		OPCODE(o6_invalid),
 		OPCODE(o6_pickVarRandom),
 		/* E4 */
-		OPCODE(o6_unknownE4),
+		OPCODE(o6_setBoxSet),
 		OPCODE(o6_invalid),
 		OPCODE(o6_invalid),
 		OPCODE(o6_invalid),
@@ -3112,7 +3112,7 @@
 	push(area);
 }
 
-void ScummEngine_v6::o6_unknownE4() {
+void ScummEngine_v6::o6_setBoxSet() {
 	int arg = pop();
 	const byte *room = getResourceAddress(rtRoom, _roomResource);
 	const byte *boxd = NULL, *boxm = NULL;
@@ -3123,7 +3123,7 @@
 		boxd = boxds.findNext(MKID('BOXD'));
 
 	if (!boxd)
-		error("ScummEngine_v6::o6_unknownE4: Can't find dboxes for set %d", arg);
+		error("ScummEngine_v6::o6_setBoxSet: Can't find dboxes for set %d", arg);
 
 	dboxSize = READ_BE_UINT32(boxd + 4);
 	byte *matrix = createResource(rtMatrix, 2, dboxSize);
@@ -3136,9 +3136,9 @@
 		boxm = boxms.findNext(MKID('BOXM'));
 
 	if (!boxm)
-		error("ScummEngine_v6::o6_unknownE4: Can't find mboxes for set %d", arg);
+		error("ScummEngine_v6::o6_setBoxSet: Can't find mboxes for set %d", arg);
 
-	mboxSize = READ_BE_UINT32(boxd + 4);
+	mboxSize = READ_BE_UINT32(boxm + 4);
 	matrix = createResource(rtMatrix, 1, mboxSize);
 
 	assert(matrix);

Index: script_v6he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v6he.cpp,v
retrieving revision 2.15
retrieving revision 2.15.2.1
diff -u -d -r2.15 -r2.15.2.1
--- script_v6he.cpp	13 Feb 2004 11:00:34 -0000	2.15
+++ script_v6he.cpp	19 Feb 2004 10:01:02 -0000	2.15.2.1
@@ -332,7 +332,7 @@
 		OPCODE(o6_localizeArray),
 		OPCODE(o6_pickVarRandom),
 		/* E4 */
-		OPCODE(o6_unknownE4),
+		OPCODE(o6_setBoxSet),
 		OPCODE(o6_invalid),
 		OPCODE(o6_invalid),
 		OPCODE(o6_invalid),
@@ -1031,6 +1031,10 @@
 	int32 size = pop();
 	int slot = pop();
 
+	// Fatty Bear uses positive values
+	if (_gameId == GID_FBEAR)
+		size = -size;
+
 	if (size == -2) {
 		push(_hFileTable[slot].readUint16LE());
 	} else if (size == -1) {
@@ -1053,6 +1057,10 @@
 	int16 resID = pop();
 	int slot = pop();
 
+	// Fatty Bear uses positive values
+	if (_gameId == GID_FBEAR)
+		size = -size;
+
 	if (size == -2) {
 		_hFileTable[slot].writeUint16LE(resID);
 	} else if (size == -1) {





More information about the Scummvm-git-logs mailing list