[Scummvm-cvs-logs] CVS: scummvm/kyra kyra.cpp,1.37,1.38 screen.cpp,1.5,1.6

Gregory Montoir cyx at users.sourceforge.net
Fri Sep 2 11:36:20 CEST 2005


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

Modified Files:
	kyra.cpp screen.cpp 
Log Message:
fix shape loading for cdrom version

Index: kyra.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/kyra/kyra.cpp,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- kyra.cpp	2 Sep 2005 11:12:09 -0000	1.37
+++ kyra.cpp	2 Sep 2005 18:35:01 -0000	1.38
@@ -433,7 +433,12 @@
 	const uint8 *data = _screen->getPagePtr(pageNum);
 	uint16 numShapes = READ_LE_UINT16(data);
 	if (shape < numShapes) {
-		uint16 offs = READ_LE_UINT16(data + 2 + shape * 2);
+		uint32 offs = 0;
+		if (_game == KYRA1CD) {
+			offs = READ_LE_UINT32(data + 2 + shape * 4);
+		} else {
+			offs = READ_LE_UINT16(data + 2 + shape * 2);
+		}
 		if (offs != 0) {
 			data += offs;
 			uint16 sz = READ_LE_UINT16(data + 6);

Index: screen.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/kyra/screen.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- screen.cpp	2 Sep 2005 11:12:09 -0000	1.5
+++ screen.cpp	2 Sep 2005 18:35:01 -0000	1.6
@@ -323,6 +323,9 @@
 	DrawShapePlotPixelCallback plotPixel = _drawShapePlotPixelTable[ppc];
 	
 	const uint8 *src = shapeData;
+	if (_vm->game() == KYRA1CD) {
+		src += 2;
+	}
 	uint16 shapeFlags = READ_LE_UINT16(src); src += 2;
 	
 	int shapeHeight = *src++;





More information about the Scummvm-git-logs mailing list