[Scummvm-cvs-logs] SF.net SVN: scummvm: [32613] scummvm/trunk/engines/drascula

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Sun Jun 8 13:10:00 CEST 2008


Revision: 32613
          http://scummvm.svn.sourceforge.net/scummvm/?rev=32613&view=rev
Author:   thebluegr
Date:     2008-06-08 04:10:00 -0700 (Sun, 08 Jun 2008)

Log Message:
-----------
Removed the useless pcxBuffer buffer and auxPun pointer and fixed an off-by-one error in the PCX decoding routine

Modified Paths:
--------------
    scummvm/trunk/engines/drascula/drascula.h
    scummvm/trunk/engines/drascula/graphics.cpp

Modified: scummvm/trunk/engines/drascula/drascula.h
===================================================================
--- scummvm/trunk/engines/drascula/drascula.h	2008-06-08 10:56:44 UTC (rev 32612)
+++ scummvm/trunk/engines/drascula/drascula.h	2008-06-08 11:10:00 UTC (rev 32613)
@@ -287,7 +287,6 @@
 	byte *frontSurface;
 	byte *textSurface;
 	byte *pendulumSurface;
-	byte *pcxBuffer;
 	byte *AuxBuffOrg;
 	byte *AuxBuffDes;
 	byte *pointer;

Modified: scummvm/trunk/engines/drascula/graphics.cpp
===================================================================
--- scummvm/trunk/engines/drascula/graphics.cpp	2008-06-08 10:56:44 UTC (rev 32612)
+++ scummvm/trunk/engines/drascula/graphics.cpp	2008-06-08 11:10:00 UTC (rev 32613)
@@ -89,14 +89,11 @@
 	unsigned int con, x = 0;
 	unsigned int fExit = 0;
 	byte ch, rep;
-	byte *auxPun;
 
 	_arj.open(NamePcc);
 	if (!_arj.isOpen())
 		error("missing game data %s %c", NamePcc, 7);
 
-	pcxBuffer = (byte *)malloc(65000);
-	auxPun = pcxBuffer;
 	_arj.seek(128);
 	while (!fExit) {
 		ch = _arj.readByte();
@@ -106,18 +103,18 @@
 			ch = _arj.readByte();
 		}
 		for (con = 0; con < rep; con++) {
-			*auxPun++ = ch;
 			x++;
-			if (x > 64000)
+			if (x > 64000) {
 				fExit = 1;
+				break;
+			}
+			*targetSurface++ = ch;
 		}
 	}
 
 	_arj.read(cPal, 768);
 	_arj.close();
 
-	memcpy(targetSurface, pcxBuffer, 64000);
-	free(pcxBuffer);
 	setRGB((byte *)cPal, colorCount);
 }
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list