[Scummvm-cvs-logs] CVS: scummvm/bs2/driver render.cpp,1.27,1.28
Nicolas Bacca
arisme at users.sourceforge.net
Sun Sep 28 07:09:04 CEST 2003
Update of /cvsroot/scummvm/scummvm/bs2/driver
In directory sc8-pr-cvs1:/tmp/cvs-serv16178
Modified Files:
render.cpp
Log Message:
Alignment fix
Index: render.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/driver/render.cpp,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- render.cpp 27 Sep 2003 15:44:26 -0000 1.27
+++ render.cpp 28 Sep 2003 14:08:20 -0000 1.28
@@ -907,7 +907,8 @@
uint16 x;
uint8 *data;
uint8 *dst;
- _parallaxLine *line;
+ _parallaxLine line;
+ uint8 *pLine;
debug(2, "InitialiseBackgroundLayer");
@@ -946,19 +947,21 @@
if (p->offset[i] == 0)
continue;
- line = (_parallaxLine *) ((uint8 *) p + FROM_LE_32(p->offset[i]));
- data = (uint8 *) line + sizeof(_parallaxLine);
- x = FROM_LE_16(line->offset);
+ pLine = (uint8 *) p + FROM_LE_32(p->offset[i]);
+ line.packets = READ_LE_UINT16(pLine);
+ line.offset = READ_LE_UINT16(pLine + 2);
+ data = pLine + sizeof(_parallaxLine);
+ x = line.offset;
dst = memchunk + i * p->w + x;
zeros = 0;
- if (line->packets == 0) {
+ if (line.packets == 0) {
memcpy(dst, data, p->w);
continue;
}
- for (j = 0; j < FROM_LE_16(line->packets); j++) {
+ for (j = 0; j < line.packets; j++) {
if (zeros) {
dst += *data;
x += *data;
More information about the Scummvm-git-logs
mailing list