[Scummvm-cvs-logs] CVS: scummvm/scumm charset.cpp,2.61,2.62 nut_renderer.cpp,1.31,1.32 object.cpp,1.137,1.138 script_v6.cpp,1.184,1.185 script_v8.cpp,2.191,2.192 scummvm.cpp,2.381,2.382 string.cpp,1.157,1.158

Max Horn fingolfin at users.sourceforge.net
Tue Sep 9 16:14:45 CEST 2003


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

Modified Files:
	charset.cpp nut_renderer.cpp object.cpp script_v6.cpp 
	script_v8.cpp scummvm.cpp string.cpp 
Log Message:
cleanup; fix for bug #795942 (COMI: text display off screen) and #785760 (COMI: Lockup/crash on Skull Island)

Index: charset.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/charset.cpp,v
retrieving revision 2.61
retrieving revision 2.62
diff -u -d -r2.61 -r2.62
--- charset.cpp	1 Sep 2003 15:40:16 -0000	2.61
+++ charset.cpp	9 Sep 2003 20:54:18 -0000	2.62
@@ -1288,7 +1288,7 @@
 	shadow_bottom = _top + height + 2;
 
 	_hasMask = true;
-	_current->drawShadowChar(chr, _left, _top, _color, !_ignoreCharsetMask);
+	_current->drawShadowChar(chr, _left, _top - _vm->_screenTop, _color, !_ignoreCharsetMask);
 	_vm->updateDirtyRect(0, shadow_left, shadow_right, shadow_top, shadow_bottom, 0);
 
 	_left += width;

Index: nut_renderer.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/nut_renderer.cpp,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- nut_renderer.cpp	6 Sep 2003 16:42:28 -0000	1.31
+++ nut_renderer.cpp	9 Sep 2003 20:54:18 -0000	1.32
@@ -238,9 +238,9 @@
 		y += offsetY[i];
 		color = cTable[i];
 		
-		dst = _vm->virtscr[0].screenPtr + y * _vm->_screenWidth + x + _vm->virtscr[0].xstart;
+		dst = _vm->virtscr[0].screenPtr + (y + _vm->_screenTop) * _vm->_screenWidth + x + _vm->virtscr[0].xstart;
 		if (useMask)
-			mask = _vm->getMaskBuffer(x, y, 0);
+			mask = _vm->getMaskBuffer(x, y + _vm->_screenTop, 0);
 		
 		if (c >= 256 && _vm->_CJKMode)
 			draw2byte(dst, mask, c, x, y, color);

Index: object.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/object.cpp,v
retrieving revision 1.137
retrieving revision 1.138
diff -u -d -r1.137 -r1.138
--- object.cpp	28 Jul 2003 01:09:54 -0000	1.137
+++ object.cpp	9 Sep 2003 20:54:18 -0000	1.138
@@ -1407,7 +1407,7 @@
 	eo = &_blastObjectQueue[_blastObjectQueuePos++];
 	eo->number = objectNumber;
 	eo->posX = objectX + (camera._cur.x & 7);
-	eo->posY = objectY + (camera._cur.y - (_screenHeight / 2));
+	eo->posY = objectY + _screenTop;
 	if (objectWidth == 0) {
 		od = &_objs[idx];
 		eo->width = od->width;

Index: script_v6.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v6.cpp,v
retrieving revision 1.184
retrieving revision 1.185
diff -u -d -r1.184 -r1.185
--- script_v6.cpp	9 Sep 2003 19:30:25 -0000	1.184
+++ script_v6.cpp	9 Sep 2003 20:54:18 -0000	1.185
@@ -2510,7 +2510,7 @@
 				}
 				message = buf_output;
 			}
-			enqueueText(message, args[3], args[4] + camera._cur.y - (_screenHeight / 2), args[2], args[1], true);
+			enqueueText(message, args[3], args[4], args[2], args[1], true);
 			break;}
 		case 20:
 			// Occurs in The Dig, at the alien pyramid. See bug #742979.

Index: script_v8.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v8.cpp,v
retrieving revision 2.191
retrieving revision 2.192
diff -u -d -r2.191 -r2.192
--- script_v8.cpp	3 Sep 2003 17:00:33 -0000	2.191
+++ script_v8.cpp	9 Sep 2003 20:54:18 -0000	2.192
@@ -1426,7 +1426,7 @@
 		break;
 	case 0xD8: {		// findBlastObject
 		int x = args[1] + (camera._cur.x & 7);
-		int y = args[2] + (camera._cur.y - (_screenHeight /2));;
+		int y = args[2] + _screenTop;
 		BlastObject *eo;
 
 		for (int i = _blastObjectQueuePos - 1; i >= 0; i--) {

Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scummvm.cpp,v
retrieving revision 2.381
retrieving revision 2.382
diff -u -d -r2.381 -r2.382
--- scummvm.cpp	9 Sep 2003 17:29:22 -0000	2.381
+++ scummvm.cpp	9 Sep 2003 20:54:18 -0000	2.382
@@ -1618,7 +1618,7 @@
 	_virtualMouse.x = _mouse.x + virtscr[0].xstart;
 	_virtualMouse.y = _mouse.y - virtscr[0].topline;
 	if (_features & GF_NEW_CAMERA)
-		_virtualMouse.y += camera._cur.y - (_screenHeight / 2);
+		_virtualMouse.y += _screenTop;
 
 	if (_virtualMouse.y < 0)
 		_virtualMouse.y = -1;

Index: string.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/string.cpp,v
retrieving revision 1.157
retrieving revision 1.158
diff -u -d -r1.157 -r1.158
--- string.cpp	9 Sep 2003 19:30:25 -0000	1.157
+++ string.cpp	9 Sep 2003 20:54:19 -0000	1.158
@@ -122,8 +122,8 @@
 			s = a->scaley * a->talkPosY / 0xFF;
 			_string[0].ypos = ((a->talkPosY - s) >> 1) + s - a->elevation + a->y;
 
-			if (_string[0].ypos < camera._cur.y - (_screenHeight / 2))
-				_string[0].ypos = camera._cur.y - (_screenHeight / 2);
+			if (_string[0].ypos < _screenTop)
+				_string[0].ypos = _screenTop;
 
 			s = a->scalex * a->talkPosX / 0xFF;
 			_string[0].xpos = ((a->talkPosX - s) >> 1) + s + a->x - camera._cur.x + (_screenWidth / 2);
@@ -138,7 +138,7 @@
 			_string[0].xpos = _screenWidth - 80;
 	}
 
-	_charset->_top = _string[0].ypos;
+	_charset->_top = _string[0].ypos + _screenTop;
 	_charset->_startLeft = _charset->_left = _string[0].xpos;
 
 	if (a && a->charset)
@@ -355,7 +355,7 @@
 	_msgPtrToAdd = buf;
 	_messagePtr = addMessageToStack(_messagePtr);
 
-	_charset->_top = _string[a].ypos;
+	_charset->_top = _string[a].ypos + _screenTop;
 	_charset->_startLeft = _charset->_left = _string[a].xpos;
 	_charset->_right = _string[a].right;
 	_charset->_center = _string[a].center;
@@ -699,7 +699,7 @@
 
 		buf = _blastTextQueue[i].text;
 
-		_charset->_top = _blastTextQueue[i].ypos;
+		_charset->_top = _blastTextQueue[i].ypos + _screenTop;
 		_charset->_startLeft = _charset->_left = _blastTextQueue[i].xpos;
 		_charset->_right = _screenWidth - 1;
 		_charset->_center = _blastTextQueue[i].center;
@@ -707,7 +707,7 @@
 		_charset->_disableOffsX = _charset->_firstChar = true;
 		_charset->setCurID(_blastTextQueue[i].charset);
 		_charset->_nextLeft = _blastTextQueue[i].xpos;
-		_charset->_nextTop = _blastTextQueue[i].ypos;
+		_charset->_nextTop = _charset->_top;
 
 		// Center text if necessary
 		if (_charset->_center) {





More information about the Scummvm-git-logs mailing list