[Scummvm-cvs-logs] CVS: scummvm/kyra kyra.cpp,1.61,1.62 screen.cpp,1.16,1.17

Johannes Schickel lordhoto at users.sourceforge.net
Sat Oct 22 14:05:55 CEST 2005


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

Modified Files:
	kyra.cpp screen.cpp 
Log Message:
Fixed a double loading of shape 10,
and corrected mouse cursor region backup.


Index: kyra.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/kyra/kyra.cpp,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -d -r1.61 -r1.62
--- kyra.cpp	22 Oct 2005 12:59:16 -0000	1.61
+++ kyra.cpp	22 Oct 2005 21:04:07 -0000	1.62
@@ -463,6 +463,7 @@
 		if (_needMouseUpdate) {
 			_screen->hideMouse();
 			_screen->showMouse();
+			_needMouseUpdate = false;
 		}
 		_screen->updateScreen();
 
@@ -964,7 +965,6 @@
 	_itemShapes[8] = _screen->encodeShape(0x70, 0x12, 0x10, 9, 0);
 	_itemShapes[9] = _screen->encodeShape(0x80, 0x12, 0x10, 11, 0);
 	_itemShapes[10] = _screen->encodeShape(0x90, 0x12, 0x10, 10, 0);
-	_itemShapes[10] = _screen->encodeShape(0x90, 0x12, 0x10, 10, 0);
 	_itemShapes[364] = _screen->encodeShape(0x28, 0, 0x10, 13, 0);
 	_screen->setMouseCursor(1, 1, 0);
 	_screen->setMouseCursor(1, 1, _itemShapes[4]);

Index: screen.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/kyra/screen.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- screen.cpp	22 Oct 2005 12:59:16 -0000	1.16
+++ screen.cpp	22 Oct 2005 21:04:07 -0000	1.17
@@ -1404,7 +1404,11 @@
 	x <<= 3; w <<= 3;
 	uint8 *src = ptr;
 	uint8 *dst = &_pagePtrs[0][y * SCREEN_W + x];	
-	memcpy(dst, src, w);
+	for (int i = 0; i < h; ++i) {
+		memcpy(dst, src, w);
+		src += w;
+		dst += SCREEN_W;
+	}
 }
 
 void Screen::copyScreenToRect(int x, int y, int w, int h, uint8 *ptr) {
@@ -1412,7 +1416,11 @@
 	x <<= 3; w <<= 3;
 	uint8 *src = &_pagePtrs[0][y * SCREEN_W + x];
 	uint8 *dst = ptr;	
-	memcpy(dst, src, w);
+	for (int i = 0; i < h; ++i) {
+		memcpy(dst, src, w);
+		dst += w;
+		src += SCREEN_W;
+	}
 }
 
 } // End of namespace Kyra





More information about the Scummvm-git-logs mailing list