[Scummvm-cvs-logs] CVS: residual blocky16.cpp,1.14,1.15
Pawel Kolodziejski
aquadran at users.sourceforge.net
Sun May 2 02:21:04 CEST 2004
Update of /cvsroot/scummvm/residual
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20317
Modified Files:
blocky16.cpp
Log Message:
workaround for some delta buffer offsets
Index: blocky16.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/blocky16.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- blocky16.cpp 28 Apr 2004 22:20:30 -0000 1.14
+++ blocky16.cpp 2 May 2004 09:20:26 -0000 1.15
@@ -381,7 +381,6 @@
}
tmp2 += _offset1;
for (i = 0; i < 4; i++) {
- assert(d_dst + tmp2 < _deltaBufs[1] + _frameSize && d_dst + tmp2 >= _deltaBufs[1]);
*(uint32 *)(d_dst + 0) = *(uint32 *)(d_dst + tmp2 + 0);
*(uint32 *)(d_dst + 4) = *(uint32 *)(d_dst + tmp2 + 4);
d_dst += _d_pitch;
@@ -561,8 +560,13 @@
makeTablesInterpolation(8);
_frameSize = _width * _height * 2;
- _deltaSize = _frameSize * 3;
+ // workaround for read over buffer by increasing buffer
+ // 200 bytes is enough for smush anims:
+ // lol, byeruba, crushed, eldepot, heltrain, hostage
+ // but for tb_kitty.snm 5700 bytes is needed
+ _deltaSize = _frameSize * 3 + 5700;
_deltaBuf = (byte *)malloc(_deltaSize);
+ memset(_deltaBuf, 0, _deltaSize);
_deltaBufs[0] = _deltaBuf;
_deltaBufs[1] = _deltaBuf + _frameSize;
_curBuf = _deltaBuf + _frameSize * 2;
More information about the Scummvm-git-logs
mailing list