[Scummvm-cvs-logs] SF.net SVN: scummvm: [25663] scummvm/trunk/engines/parallaction/graphics. cpp
peres001 at users.sourceforge.net
peres001 at users.sourceforge.net
Sat Feb 17 21:50:51 CET 2007
Revision: 25663
http://scummvm.svn.sourceforge.net/scummvm/?rev=25663&view=rev
Author: peres001
Date: 2007-02-17 12:50:50 -0800 (Sat, 17 Feb 2007)
Log Message:
-----------
changed CNV loading code to be endian-safe
Modified Paths:
--------------
scummvm/trunk/engines/parallaction/graphics.cpp
Modified: scummvm/trunk/engines/parallaction/graphics.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/graphics.cpp 2007-02-17 20:38:27 UTC (rev 25662)
+++ scummvm/trunk/engines/parallaction/graphics.cpp 2007-02-17 20:50:50 UTC (rev 25663)
@@ -961,12 +961,10 @@
if (!stream.open(path))
errorFileNotFound(path);
- cnv->_count = cnv->_width = cnv->_height = 0;
+ cnv->_count = stream.readByte();
+ cnv->_width = stream.readByte();
+ cnv->_height = stream.readByte();
- stream.read(&cnv->_count, 1);
- stream.read(&cnv->_width, 1);
- stream.read(&cnv->_height, 1);
-
cnv->_array = (byte**)memAlloc(cnv->_count * sizeof(byte*));
uint16 size = cnv->_width*cnv->_height;
@@ -1000,8 +998,8 @@
cnv->_width = cnv->_height = 0;
stream.skip(1);
- stream.read(&cnv->_width, 1);
- stream.read(&cnv->_height, 1);
+ cnv->_width = stream.readByte();
+ cnv->_height = stream.readByte();
uint16 size = cnv->_width*cnv->_height;
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