[Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.277,1.278 akos.cpp,1.155,1.156 intern.h,2.213,2.214 script_v6.cpp,1.394,1.395 script_v6he.cpp,2.107,2.108 script_v72he.cpp,2.42,2.43 script_v7he.cpp,2.61,2.62 scumm.cpp,1.164,1.165 scumm.h,1.465,1.466

Travis Howell kirben at users.sourceforge.net
Sat Sep 4 01:14:01 CEST 2004


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

Modified Files:
	actor.cpp akos.cpp intern.h script_v6.cpp script_v6he.cpp 
	script_v72he.cpp script_v7he.cpp scumm.cpp scumm.h 
Log Message:

Complete actor clipping override code for HE games.
Add akos speech queue for HE games
Minor cleanup


Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/actor.cpp,v
retrieving revision 1.277
retrieving revision 1.278
diff -u -d -r1.277 -r1.278
--- actor.cpp	4 Sep 2004 00:18:55 -0000	1.277
+++ actor.cpp	4 Sep 2004 08:13:47 -0000	1.278
@@ -65,11 +65,6 @@
 	memset(&walkdata, 0, sizeof(ActorWalkData));
 	walkdata.point3.x = 32000;
 
-	clipOverride.right = 0;
-	clipOverride.left = 0;
-	clipOverride.top = 0;
-	clipOverride.bottom = 0;
-	
 	walkScript = 0;
 
 	initActor(1);
@@ -138,6 +133,11 @@
 	walkScript = 0;
 	talkScript = 0;
 
+	clipOverride.right = _vm->_actorClipRight;
+	clipOverride.left = _vm->_actorClipLeft;
+	clipOverride.top = _vm->_actorClipTop;
+	clipOverride.bottom = _vm->_actorClipBottom;
+	
 	_vm->_classData[number] = (_vm->_version >= 7) ? _vm->_classData[0] : 0;
 }
 

Index: akos.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/akos.cpp,v
retrieving revision 1.155
retrieving revision 1.156
diff -u -d -r1.155 -r1.156
--- akos.cpp	4 Sep 2004 00:23:06 -0000	1.155
+++ akos.cpp	4 Sep 2004 08:13:47 -0000	1.156
@@ -739,8 +739,16 @@
 	v1.skip_width = _width;
 	v1.scaleXstep = _mirror ? 1 : -1;
 
-	if (_clipOverride.bottom)
-		rect.bottom = _clipOverride.bottom;
+	if (_vm->_heversion >= 71) {
+		if (rect.top < _clipOverride.top)
+			rect.top = _clipOverride.top;
+		if (rect.bottom > _clipOverride.bottom)
+			rect.bottom = _clipOverride.bottom;
+		if (rect.left < _clipOverride.left)
+			rect.left = _clipOverride.left;
+		if (rect.right > _clipOverride.right)
+			rect.right = _clipOverride.right;
+	}
 
 	if (_actorHitMode) {
 		if (_actorHitX < rect.left || _actorHitX >= rect.right || _actorHitY < rect.top || _actorHitY >= rect.bottom)
@@ -1012,8 +1020,16 @@
 	maxw = _outwidth;
 	maxh = _outheight;
 
-	if (_clipOverride.bottom)
-		clip.bottom = _clipOverride.bottom;
+	if (_vm->_heversion >= 71) {
+		if (clip.top < _clipOverride.top)
+			clip.top = _clipOverride.top;
+		if (clip.bottom > _clipOverride.bottom)
+			clip.bottom = _clipOverride.bottom;
+		if (clip.left < _clipOverride.left)
+			clip.left = _clipOverride.left;
+		if (clip.right > _clipOverride.right)
+			clip.right = _clipOverride.right;
+	}
 
 	_vm->markRectAsDirty(kMainVirtScreen, clip, _actorID);
 
@@ -1363,7 +1379,7 @@
 				flag_value = true;
 			continue;
 		case AKC_C0A0:
-			//akos_queCommand(8, a, GB(2), 0);
+			akos_queCommand(8, a, GB(2), 0);
 			continue;
 		case AKC_C0A1:
 			if (a->talking) {
@@ -1378,7 +1394,7 @@
 			}
 			continue;
 		case AKC_C0A3:
-			//akos_queCommand(8, a, a->getAnimVar(GB(2), 0);
+			akos_queCommand(8, a, a->getAnimVar(GB(2)), 0);
 			continue;
 		case AKC_C016:
 			if (_sound->isSoundRunning( a->sound[a->getAnimVar(GB(4))]))  {
@@ -1481,7 +1497,17 @@
 			}
 			break;
 		case 8:
-			if (param_1 != 0) {
+			if (_heversion >= 71) {
+				_actorToPrintStrFor = a->number;
+
+				a->talkPosX = _queueTalkPosX[param_1];
+				a->talkPosY = _queueTalkPosY[param_1];
+				a->talkColor = _queueTalkColor[param_1];
+
+				_string[0].loadDefault();
+				actorTalk(_queueTalkString[param_1]);
+
+			} else if (param_1 != 0) {
 				if (_imuseDigital) {
 					_imuseDigital->setPan(param_1, param_2);
 				}

Index: intern.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/intern.h,v
retrieving revision 2.213
retrieving revision 2.214
diff -u -d -r2.213 -r2.214
--- intern.h	3 Sep 2004 17:27:40 -0000	2.213
+++ intern.h	4 Sep 2004 08:13:47 -0000	2.214
@@ -746,6 +746,7 @@
 	void o72_readINI();
 	void o72_writeINI();
 	void o72_unknownF4();
+	void o72_unknownF5();
 	void o72_unknownF6();
 	void o72_unknownF8();
 	void o72_unknownF9();

Index: script_v6.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v6.cpp,v
retrieving revision 1.394
retrieving revision 1.395
diff -u -d -r1.394 -r1.395
--- script_v6.cpp	1 Sep 2004 10:39:43 -0000	1.394
+++ script_v6.cpp	4 Sep 2004 08:13:47 -0000	1.395
@@ -2945,11 +2945,11 @@
 }
 
 void ScummEngine_v6::o6_findAllObjects() {
-	int a = pop();
+	int room = pop();
 	int i = 1;
 
-	if (a != _currentRoom)
-		warning("o6_findAllObjects: current room is not %d", a);
+	if (room != _currentRoom)
+		warning("o6_findAllObjects: current room is not %d", room);
 	writeVar(0, 0);
 	defineArray(0, kIntArray, 0, _numLocalObjects + 1);
 	writeArray(0, 0, 0, _numLocalObjects);

Index: script_v6he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v6he.cpp,v
retrieving revision 2.107
retrieving revision 2.108
diff -u -d -r2.107 -r2.108
--- script_v6he.cpp	4 Sep 2004 00:31:38 -0000	2.107
+++ script_v6he.cpp	4 Sep 2004 08:13:47 -0000	2.108
@@ -549,7 +549,7 @@
 
 void ScummEngine_v6he::o6_actorOps() {
 	Actor *a;
-	int i, j, k, l;
+	int i, j, k;
 	int args[8];
 	byte b;
 	byte name[256];
@@ -571,18 +571,18 @@
 		break;
 	case 30:
 		// _heversion >= 70
-		l = pop();
-		k = pop();
-		j = pop();
-		i = pop();
+		_actorClipBottom = pop();
+		_actorClipRight = pop();
+		_actorClipTop = pop();
+		_actorClipLeft = pop();
 		warning("o6_actorOps: stub case %d", b);
 		break;
 	case 64:
 		// _heversion >= 72
-		l = pop();
-		k = pop();
-		j = pop();
-		i = pop();
+		_actorClipBottom = pop();
+		_actorClipRight = pop();
+		_actorClipTop = pop();
+		_actorClipLeft = pop();
 		warning("o6_actorOps: stub case %d", b);
 		break;
 	case 76:		// SO_COSTUME
@@ -720,12 +720,16 @@
 		break;
 	case 225:
 		{
-		byte string[256];
+		byte string[128];
 		copyScriptString(string);
-		_actorToPrintStrFor = pop();
-		_string[0].loadDefault();
-		actorTalk(string);
-		warning("o6_actorOps: stub case %d", b);
+		int slot = pop();
+
+		int len = resStrLen(string) + 1;
+		addMessageToStack(string, _queueTalkString[slot], len);
+
+		_queueTalkPosX[slot] = a->talkPosX;
+		_queueTalkPosY[slot] = a->talkPosY;
+		_queueTalkColor[slot] = a->talkColor;
 		break;
 		}
 	default:
@@ -790,7 +794,7 @@
 		//Used before mini games in 3DO versions, seems safe to ignore.
 		break;
 	default:
-		warning("o6_kernelSetFunctions: default case %d (param count %d)", args[0], num);
+		error("o6_kernelSetFunctions: default case %d (param count %d)", args[0], num);
 		break;
 	}
 }
@@ -860,7 +864,6 @@
 	case 1:
 		// Used to store images when decorating cake in
 		// Fatty Bear's Birthday Surprise
-		// XXX gdi_virtScreen = 0;
 		writeVar(0, 0);
 		defineArray(0, kByteArray, 0, virtScreenSave(0, args[1], args[2], args[3], args[4]));
 		retval = readVar(0);
@@ -869,7 +872,7 @@
 		push(retval);
 		break;
 	default:
-		warning("o6_kernelGetFunctions: default case %d", args[0]);
+		error("o6_kernelGetFunctions: default case %d", args[0]);
 	}
 }
 
@@ -1215,7 +1218,7 @@
 		redimArray(fetchScriptWord(), newX, newY, kByteArray);
 		break;
 	default:
-		break;
+		error("o6_redimArray: default type %d", subcode);
 	}
 }
 

Index: script_v72he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v72he.cpp,v
retrieving revision 2.42
retrieving revision 2.43
diff -u -d -r2.42 -r2.43
--- script_v72he.cpp	3 Sep 2004 17:27:40 -0000	2.42
+++ script_v72he.cpp	4 Sep 2004 08:13:47 -0000	2.43
@@ -352,7 +352,7 @@
 		OPCODE(o72_readINI),
 		/* F4 */
 		OPCODE(o72_writeINI),
-		OPCODE(o6_invalid),
+		OPCODE(o72_unknownF5),
 		OPCODE(o72_unknownF6),
 		OPCODE(o6_invalid),
 		/* F8 */
@@ -752,7 +752,7 @@
 		x = pop();
 		break;
 	default:
-		warning("o72_drawObject: default case %d", subOp);
+		error("o72_drawObject: default case %d", subOp);
 	}
 
 	int object = pop();
@@ -782,19 +782,21 @@
 	ArrayHeader *ah;
 
 	switch (subOp) {
-		case 1:
-		case 3:
-			ah = (ArrayHeader *)getResourceAddress(rtString, readVar(fetchScriptWord()));
-			val1 = FROM_LE_32(ah->dim1end);
-			val2 = FROM_LE_32(ah->dim1start);
-			push(val1 - val2 + 1);
-			break;
-		case 2:
-			ah = (ArrayHeader *)getResourceAddress(rtString, readVar(fetchScriptWord()));
-			val1 = FROM_LE_32(ah->dim2end);
-			val2 = FROM_LE_32(ah->dim2start);
-			push(val1 - val2 + 1);
-			break;
+	case 1:
+	case 3:
+		ah = (ArrayHeader *)getResourceAddress(rtString, readVar(fetchScriptWord()));
+		val1 = FROM_LE_32(ah->dim1end);
+		val2 = FROM_LE_32(ah->dim1start);
+		push(val1 - val2 + 1);
+		break;
+	case 2:
+		ah = (ArrayHeader *)getResourceAddress(rtString, readVar(fetchScriptWord()));
+		val1 = FROM_LE_32(ah->dim2end);
+		val2 = FROM_LE_32(ah->dim2start);
+		push(val1 - val2 + 1);
+		break;
+	default:
+		error("o72_getArrayDimSize: default case %d", subOp);
 	}
 }
 
@@ -825,24 +827,21 @@
 
 void ScummEngine_v72he::o72_arrayOps() {
 	byte subOp = fetchScriptByte();
-	int array = 0;
+	int array = fetchScriptWord();
 	int b, c, d, len;
 	ArrayHeader *ah;
 	int list[128];
 
 	switch (subOp) {
 	case 7:			// SO_ASSIGN_STRING
-		array = fetchScriptWord();
 		ah = defineArray(array, kStringArray, 0, 0, 0, 1024);
 		copyScriptString(ah->data);
 		break;
 	case 194:			// SO_ASSIGN_STRING
-		array = fetchScriptWord();
 		ah = defineArray(array, kStringArray, 0, 0, 0, 4096);
 		decodeScriptString(ah->data);
 		break;
 	case 208:		// SO_ASSIGN_INT_LIST
-		array = fetchScriptWord();
 		b = pop();
 		c = pop();
 		d = readVar(array);
@@ -854,7 +853,6 @@
 		}
 		break;
 	case 212:		// SO_ASSIGN_2DIM_LIST
-		array = fetchScriptWord();
 		len = getStackList(list, ARRAYSIZE(list));
 		d = readVar(array);
 		if (d == 0)
@@ -969,7 +967,7 @@
 		}
 		Common::Rect rScreen(0, 0, pvs->w, pvs->h);
 		if (flags & 2) {			
-//			warning("unhandled Wiz image w/ rmap");
+			warning("unhandled Wiz image w/ rmap");
 		} else {
 			copyWizImage(dst, wizd, pvs->w, pvs->h, x1, y1, width, height, &rScreen);
 		}
@@ -1099,7 +1097,7 @@
 	byte filename[100];
 
 	mode = pop();
-	copyScriptString(filename, true);
+	copyScriptString(filename);
 	debug(1,"File %s", filename);
 	
 	for (r = strlen((char*)filename); r != 0; r--) {
@@ -1172,10 +1170,9 @@
 		push(val);
 		break;
 	default:
-		error("default case %d", subOp);
+		error("o72_readFile: default case %d", subOp);
 	}
 	debug(1, "o72_readFile: slot %d, subOp %d val %d", slot, subOp, val);
-
 }
 
 void ScummEngine_v72he::writeFileFromArray(int slot, int resID) {
@@ -1205,8 +1202,9 @@
 		writeFileFromArray(slot, resID);
 		break;
 	default:
-		error("default case %d", subOp);
+		error("o72_writeFile: default case %d", subOp);
 	}
+	debug(1, "o72_writeFile: slot %d, subOp %d", slot, subOp);
 }
 
 void ScummEngine_v72he::o72_findAllObjects() {
@@ -1228,17 +1226,11 @@
 }
 
 void ScummEngine_v72he::o72_deleteFile() {
-	int r;
 	byte filename[100];
 
 	copyScriptString(filename);
 
-	for (r = strlen((char*)filename); r != 0; r--) {
-		if (filename[r - 1] == '\\')
-			break;
-	}
-
-	debug(1, "stub o72_deleteFile(\"%s\")", filename + r);
+	debug(1, "stub o72_deleteFile(%s)", filename);
 }
 
 void ScummEngine_v72he::o72_getPixel() {
@@ -1326,7 +1318,7 @@
 		redimArray(fetchScriptWord(), 0, newX, 0, newY, kDwordArray);
 		break;
 	default:
-		break;
+		error("o72_redimArray: default type %d", subcode);
 	}
 }
 
@@ -1377,7 +1369,7 @@
 	}
 
 	writeVar(0, array);
-	while (len >= pos) {
+	while (len <= pos) {
 		letter = readArray(0, 0, pos);
 		if (letter)
 			result += getCharsetOffset(letter);
@@ -1398,6 +1390,7 @@
 
 	size = len - b + 2;
 
+	writeVar(0, 0);
 	defineArray(0, kStringArray, 0, 0, 0, size);
 	writeArray(0, 0, 0, 0);
 
@@ -1437,16 +1430,21 @@
 }
 
 void ScummEngine_v72he::o72_readINI() {
-	byte name[100];
-	int type;
-	int retval;
+	byte option[100];
+	int type, retval;
 
 	// we pretend that we don't have .ini file
-	copyScriptString(name);
+	copyScriptString(option);
 	type = fetchScriptByte();
+
 	switch (type) {
 	case 6: // number
-		push(0);
+		if (!strcmp((char *)option, "ReadPagesAutomatically"))
+			push(1);
+		else if (!strcmp((char *)option, "NoPrinting"))
+			push(1);
+		else
+			push(0);
 		break;
 	case 7: // string
 		defineArray(0, kStringArray, 0, 0, 0, 0);
@@ -1455,31 +1453,54 @@
 		push(retval); // var ID string
 		break;
 	default:
-		warning("o72_readINI( read-ini string not implemented", type);
+		error("o72_readINI: default type %d", type);
 	}
-	debug(1, "o72_readINI (%d) %s", type, name);
+	debug(1, "o72_readINI (%d) %s", type, option);
 }
 
 void ScummEngine_v72he::o72_writeINI() {
-	byte b;
-	byte name[256], name2[1024];
+	int type, value;
+	byte option[256], option2[1024];
 
-	b = fetchScriptByte();
+	type = fetchScriptByte();
+	copyScriptString(option);
 
-	switch (b) {
-	case 6:
-		pop();
-		copyScriptString(name);
+	switch (type) {
+	case 6: // number
+		value = pop();
 		break;
-		debug(1,"o72_writeINI stub (%s)", name);
-	case 7:
-		copyScriptString(name2);
-		copyScriptString(name);
-		debug(1,"o72_writeINI stub (%s, %s)", name, name2);
+		debug(1,"o72_writeINI: %s set to %d", option, value);
+	case 7: // string
+		copyScriptString(option2);
+		debug(1,"o72_writeINI: %s set to %s", option, option2);
 		break;
+	default:
+		error("o72_writeINI: default type %d", type);
 	}
 }
 
+void ScummEngine_v72he::o72_unknownF5() {
+	int letter, ebx;
+	int array, len, pos, result = 0;
+	ebx = pop();
+	pos = pop();
+	array = pop();
+
+	len = resStrLen(getStringAddress(array));
+	writeVar(0, array);
+
+	while (pos < len) {
+		letter = readArray(0, 0, pos);
+		result += getCharsetOffset(letter);
+		if (result >= ebx)
+			break;
+		pos++;
+	}
+
+	push(result);
+	debug(1,"stub o72_unknownF5 (%d)", result);
+}
+
 void ScummEngine_v72he::o72_unknownF6() {
 	int len, len2, pos, value, array;
 	value = pop();
@@ -1525,14 +1546,14 @@
 	int a = fetchScriptByte();
 	push(1);
 
-	warning("stub o72_unknownF8(%d)", a);
+	debug(1,"stub o72_unknownF8(%d)", a);
 }
 
 void ScummEngine_v72he::o72_unknownF9() {
 	// File related
-	//byte name[100];
-	//copyScriptString(name);
-	//debug(1,"o72_unknownF9: %s", name);
+	//byte filename[100];
+	//copyScriptString(filename);
+	//debug(1,"o72_unknownF9: %s", filename);
 }
 
 void ScummEngine_v72he::o72_unknownFA() {

Index: script_v7he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v7he.cpp,v
retrieving revision 2.61
retrieving revision 2.62
diff -u -d -r2.61 -r2.62
--- script_v7he.cpp	4 Sep 2004 00:18:55 -0000	2.61
+++ script_v7he.cpp	4 Sep 2004 08:13:47 -0000	2.62
@@ -383,11 +383,8 @@
 byte ScummEngine_v7he::stringLen(byte *ptr) {
 	byte len;
 	byte c;
-	if (!ptr) {
-		//ptr = _someGlobalPtr;
+	if (!ptr)
 		error("ScummEngine_v7he::stringLen(): zero ptr. Undimplemented behaviour");
-		return 1;
-	}
 
 	len = 0;
 	c = *ptr++;
@@ -409,13 +406,12 @@
 
 int ScummEngine_v7he::getCharsetOffset(int letter) {
 	int offset, result;
-	int id = _charset->getCurID();
 
-	byte *ptr = getResourceAddress(rtCharset, id);
+	byte *ptr = getResourceAddress(rtCharset, _string[0]._default.charset);
 	if (!ptr)
-		error("getCharsetOffset: charset %d not found!", id);
+		error("getCharsetOffset: charset %d not found!", _string[0]._default.charset);
 
-	offset = READ_LE_UINT32(ptr + 29 + letter + 4);
+	offset = READ_LE_UINT32(ptr + 29 + letter);
 	if (offset == 0)
 		return 0;
 
@@ -673,7 +669,6 @@
 	case 122:
 	case 123:
 	case 203:
-	case 239:
 		debug(5,"stub queueload (%d) resource %d", op, pop());
 		break;
 	case 159:
@@ -701,7 +696,7 @@
 		debug(5,"stub o7_resourceRoutines unlock object %d", resid);
 		break;
 	default:
-		error("o7_resourceRoutines: default case %d", op);
+		warning("o7_resourceRoutines: default case %d", op);
 	}
 }
 
@@ -750,9 +745,10 @@
 	}
 
 	writeVar(0, array);
-	while (len >= pos) {
+	while (pos <= len) {
 		letter = readArray(0, 0, pos);
-		result += getCharsetOffset(letter);
+		if (letter)
+			result += getCharsetOffset(letter);
 		pos++;
 	}
 
@@ -828,6 +824,7 @@
 
 	size = len - b + 2;
 
+	writeVar(0, 0);
 	defineArray(0, kStringArray, 0, size);
 	writeArray(0, 0, 0, 0);
 
@@ -863,14 +860,22 @@
 	int len;
 	int type;
 	int retval;
+	byte option[256];
 
 	// we pretend that we don't have .ini file
+	addMessageToStack(_scriptPointer, option, sizeof(option));
 	len = resStrLen(_scriptPointer);
 	_scriptPointer += len + 1;
+
 	type = pop();
 	switch (type) {
 	case 1: // number
-		push(0);
+		if (!strcmp((char *)option, "ReadPagesAutomatically"))
+			push(1);
+		else if (!strcmp((char *)option, "NoPrinting"))
+			push(1);
+		else
+			push(0);
 		break;
 	case 2: // string
 		defineArray(0, kStringArray, 0, 0);
@@ -879,38 +884,34 @@
 		push(retval); // var ID string
 		break;
 	default:
-		warning("o7_readINI(%d): read-ini string not implemented", type);
+		error("o7_readINI: default type %d", type);
 	}
 }
 
 void ScummEngine_v7he::o7_writeINI() {
-	int a, b;
-	byte filename1[256], filename2[256];
+	int type, value;
+	byte option[256], option2[256];
 	int len;
 	
-	b = pop();
-	a = pop();
+	type = pop();
+	value = pop();
 
-	switch (b) {
-	case 1:
-		addMessageToStack(_scriptPointer, filename1, sizeof(filename1));
+	addMessageToStack(_scriptPointer, option, sizeof(option));
+	len = resStrLen(_scriptPointer);
+	_scriptPointer += len + 1;
 
-		len = resStrLen(_scriptPointer);
-		_scriptPointer += len + 1;
-		debug(1, "o7_writeINI(%d, %d, \"%s\")", a, b, filename1);
+	switch (type) {
+	case 1: // number
+		debug(1, "o7_writeINI: %s set to %d", option, value);
 		break;
-	case 2:
-		addMessageToStack(_scriptPointer, filename1, sizeof(filename1));
-
-		len = resStrLen(_scriptPointer);
-		_scriptPointer += len + 1;
-
-		addMessageToStack(_scriptPointer, filename2, sizeof(filename2));
-
+	case 2: // string
+		addMessageToStack(_scriptPointer, option2, sizeof(option2));
 		len = resStrLen(_scriptPointer);
 		_scriptPointer += len + 1;
-		debug(1, "o7_writeINI(%d, %d, \"%s\", \"%s\")", a, b, filename1, filename2);
+		debug(1, "o7_writeINI: %s set to %s", option, option2);
 		break;
+	default:
+		error("o7_writeINI: default type %d", type);
 	}
 }
 
@@ -924,7 +925,7 @@
 	len = resStrLen(getStringAddress(array));
 	writeVar(0, array);
 
-	while (len < pos) {
+	while (pos < len) {
 		letter = readArray(0, 0, pos);
 		result += getCharsetOffset(letter);
 		if (result >= ebx)
@@ -1028,10 +1029,13 @@
 }
 
 void ScummEngine_v7he::o7_unknownFC() {
-	int a = pop();
-	int b = pop();
-	debug(1,"o7_unknownFC (%d, %d) stub", b, a);
-	push(1);
+	// Checks virtual mouse x/y co-ordinates when in verb/inventory area
+	// Maybe checks for polygons ?
+	int y = pop();
+	int x = pop();
+
+	push(0);
+	debug(1,"o7_unknownFC (x %d, y %d) stub", x, y);
 }
 
 } // End of namespace Scumm

Index: scumm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.cpp,v
retrieving revision 1.164
retrieving revision 1.165
diff -u -d -r1.164 -r1.165
--- scumm.cpp	3 Sep 2004 02:08:32 -0000	1.164
+++ scumm.cpp	4 Sep 2004 08:13:48 -0000	1.165
@@ -654,6 +654,11 @@
 	_2byteFontPtr = 0;
 	_V1_talkingActor = 0;
 
+	_actorClipTop = 0;
+	_actorClipBottom = 479;
+	_actorClipLeft = 0;
+	_actorClipRight = 639;
+
 	_skipDrawObject = 0;
 	_skipProcessActors = 0;
 	_heSndSoundId = 0;
@@ -669,6 +674,11 @@
 	memset(_queueParam2, 0, sizeof(_queueParam2));
 	_queuePos = 0;
 
+	memset(_queueTalkPosX, 0, sizeof(_queueTalkPosX));
+	memset(_queueTalkPosY, 0, sizeof(_queueTalkPosY));
+	memset(_queueTalkColor, 0, sizeof(_queueTalkColor));
+	memset(_queueTalkString, 0, sizeof(_queueTalkString));
+
 	//
 	// Init all VARS to 0xFF
 	//

Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v
retrieving revision 1.465
retrieving revision 1.466
diff -u -d -r1.465 -r1.466
--- scumm.h	3 Sep 2004 17:27:40 -0000	1.465
+++ scumm.h	4 Sep 2004 08:13:48 -0000	1.466
@@ -844,6 +844,16 @@
 	int16 _queueParam2[32];
 	int16 _queuePos;
 
+	int16 _queueTalkPosX[16];
+	int16 _queueTalkPosY[16];
+	int16 _queueTalkColor[16];
+	byte _queueTalkString[16][128];
+
+	int _actorClipTop;
+	int _actorClipBottom;
+	int _actorClipLeft;
+	int _actorClipRight;
+
 	bool akos_increaseAnims(const byte *akos, Actor *a);
 	bool akos_increaseAnim(Actor *a, int i, const byte *aksq, const uint16 *akfo, int numakfo);
 	void akos_queCommand(byte cmd, Actor *a, int param_1, int param_2);





More information about the Scummvm-git-logs mailing list