[Scummvm-cvs-logs] CVS: scummvm/scumm gfx.cpp,2.414,2.415 script_v2.cpp,2.265,2.266 scumm.cpp,1.380,1.381 verbs.cpp,1.120,1.121

Eugene Sandulenko sev at users.sourceforge.net
Thu Mar 24 13:35:08 CET 2005


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

Modified Files:
	gfx.cpp script_v2.cpp scumm.cpp verbs.cpp 
Log Message:
Correct positioning of inventory and verbs in MM NES.
Started to tackle inventory.


Index: gfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/gfx.cpp,v
retrieving revision 2.414
retrieving revision 2.415
diff -u -d -r2.414 -r2.415
--- gfx.cpp	24 Mar 2005 04:53:27 -0000	2.414
+++ gfx.cpp	24 Mar 2005 21:34:32 -0000	2.415
@@ -555,8 +555,8 @@
 		// NES can address negative number sprites and that poses problem for
 		// our code. So instead adding zillions of fixes and potentially break
 		// other games we shift it right on rendering stage
-		if (_vm->_features & GF_NES && _vm->_NESStartStrip > 0) {
-			x += _vm->_NESStartStrip * 8;
+		if (_vm->_features & GF_NES && ((_vm->_NESStartStrip > 0) || (vs->number != kMainVirtScreen))) {
+			x += 16;
 		}
 
 		_vm->_system->copyRectToScreen(_compositeBuf + x1 + y * _vm->_screenWidth, _vm->_screenWidth, x, y, width, height);

Index: script_v2.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v2.cpp,v
retrieving revision 2.265
retrieving revision 2.266
diff -u -d -r2.265 -r2.266
--- script_v2.cpp	24 Mar 2005 04:53:28 -0000	2.265
+++ script_v2.cpp	24 Mar 2005 21:34:34 -0000	2.266
@@ -818,10 +818,8 @@
 		slot = getVarOrDirectByte(PARAM_1) + 1;
 		int prep = fetchScriptByte(); // Only used in V1?
 		// V1 Maniac verbs are relative to the 'verb area' - under the sentence
-		if (_features & GF_NES) {
-			y -= 16;
-			x += 8;
-		}
+		if (_features & GF_NES)
+			x -= 8;
 		else if ((_gameId == GID_MANIAC) && (_version == 1))
 			y += 8;
 
@@ -976,7 +974,7 @@
 	const byte *temp;
 	int slot = getVerbSlot(VAR(VAR_SENTENCE_VERB), 0);
 
-	if (!(_userState & 32))
+	if (!((_userState & 32) || (_features & GF_NES && _userState & 0xe0)))
 		return;
 
 	if (getResourceAddress(rtVerb, slot))

Index: scumm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.cpp,v
retrieving revision 1.380
retrieving revision 1.381
diff -u -d -r1.380 -r1.381
--- scumm.cpp	24 Mar 2005 12:33:52 -0000	1.380
+++ scumm.cpp	24 Mar 2005 21:34:35 -0000	1.381
@@ -1112,7 +1112,7 @@
 		_screenWidth = 640;
 		_screenHeight = 480;
 	} else if (_features & GF_NES) {
-		_screenWidth = 256; // 224
+		_screenWidth = 256;
 		_screenHeight = 240;
 	} else if (_renderMode == Common::kRenderHercA || _renderMode == Common::kRenderHercG) {
 		_features |= GF_DEFAULT_TO_1X_SCALER;
@@ -1790,8 +1790,8 @@
 		VAR(VAR_VIRT_MOUSE_Y) = _virtualMouse.y / 2;
 
 		// Adjust mouse coordinates as narrow rooms in NES are centered
-		if (_features & GF_NES && _virtualMouse.y >= 16 && _virtualMouse.y < 144) {
-			VAR(VAR_VIRT_MOUSE_X) -= _NESStartStrip;
+		if (_features & GF_NES && _NESStartStrip > 0) {
+			VAR(VAR_VIRT_MOUSE_X) -= 2;
 			if (VAR(VAR_VIRT_MOUSE_X) < 0)
 				VAR(VAR_VIRT_MOUSE_X) = 0;
 		}

Index: verbs.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/verbs.cpp,v
retrieving revision 1.120
retrieving revision 1.121
diff -u -d -r1.120 -r1.121
--- verbs.cpp	22 Mar 2005 21:07:00 -0000	1.120
+++ verbs.cpp	24 Mar 2005 21:34:35 -0000	1.121
@@ -233,6 +233,10 @@
 	if ((y < inventoryArea) || !(_mouseButStat & MBS_LEFT_CLICK)) 
 		return;
 
+	// Inventory is shifted right
+	if (_features & GF_NES)
+		x -= 16;
+
 	if (v2_mouseover_boxes[kInventoryUpArrow].rect.contains(x, y)) {
 		if (_inventoryOffset >= 2) {
 			_inventoryOffset -= 2;
@@ -255,6 +259,7 @@
 		return;
 
 	object = findInventory(_scummVars[VAR_EGO], object + 1 + _inventoryOffset);
+
 	if (object > 0) {
 		runInputScript(3, object, 0);
 	}
@@ -436,6 +441,10 @@
 	VerbSlot *vs;
 	int i = _numVerbs - 1;
 
+	// Verbs are shifted right
+	if (_features & GF_NES)
+		x -= 16;
+
 	vs = &_verbs[i];
 	do {
 		if (vs->curmode != 1 || !vs->verbid || vs->saveid || y < vs->curRect.top || y >= vs->curRect.bottom)





More information about the Scummvm-git-logs mailing list