[Scummvm-cvs-logs] CVS: scummvm/sword1 screen.cpp,1.19,1.20 sworddefs.h,1.10,1.11

Robert G?ffringmann lavosspawn at users.sourceforge.net
Sun Dec 21 16:35:00 CET 2003


Update of /cvsroot/scummvm/scummvm/sword1
In directory sc8-pr-cvs1:/tmp/cvs-serv16136/sword1

Modified Files:
	screen.cpp sworddefs.h 
Log Message:
work around a GCC bug.

Index: screen.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword1/screen.cpp,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- screen.cpp	21 Dec 2003 17:55:40 -0000	1.19
+++ screen.cpp	22 Dec 2003 00:34:02 -0000	1.20
@@ -440,6 +440,7 @@
 
 void SwordScreen::renderParallax(uint8 *data) {
 	ParallaxHeader *header = (ParallaxHeader*)data;
+	uint32 *lineIndexes = (uint32*)(data + sizeof(ParallaxHeader));
 	assert((FROM_LE_16(header->sizeX) >= SCREEN_WIDTH) && (FROM_LE_16(header->sizeY) >= SCREEN_DEPTH));
 
 	double scrlfx, scrlfy;
@@ -458,7 +459,7 @@
 		scrlY = 0;
 
 	for (uint16 cnty = 0; cnty < SCREEN_DEPTH; cnty++) {
-		uint8 *src = data + READ_LE_UINT32(header->lineIndexes + cnty + scrlY);
+		uint8 *src = data + READ_LE_UINT32(lineIndexes + cnty + scrlY);
 		uint8 *dest = _screenBuf + SwordLogic::_scriptVars[SCROLL_OFFSET_X] + (cnty + SwordLogic::_scriptVars[SCROLL_OFFSET_Y]) * _scrnSizeX;
 		uint16 remain = scrlX;
 		uint16 xPos = 0;

Index: sworddefs.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword1/sworddefs.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- sworddefs.h	21 Dec 2003 21:58:36 -0000	1.10
+++ sworddefs.h	22 Dec 2003 00:34:02 -0000	1.11
@@ -85,7 +85,6 @@
 	char type[16];
 	uint16 sizeX;
 	uint16 sizeY;
-	uint32 lineIndexes[2];			//2 is arbitrary number
 } GCC_PACK;
 
 struct AnimUnit {





More information about the Scummvm-git-logs mailing list