[Scummvm-cvs-logs] CVS: scummvm/scumm akos.cpp,1.119,1.120 costume.cpp,1.129,1.130
Max Horn
fingolfin at users.sourceforge.net
Mon Apr 5 18:20:02 CEST 2004
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24468
Modified Files:
akos.cpp costume.cpp
Log Message:
Fix for bug #929724 (MI2: Intro regression) -> since _outheight can be negative, negative y values aren't filtered out automatically anymore, so we have to explicitly check for them
Index: akos.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/akos.cpp,v
retrieving revision 1.119
retrieving revision 1.120
diff -u -d -r1.119 -r1.120
--- akos.cpp 4 Apr 2004 22:43:54 -0000 1.119
+++ akos.cpp 6 Apr 2004 01:06:54 -0000 1.120
@@ -382,9 +382,9 @@
return;
}
} else {
- masked = (y < _outheight) && v1.mask_ptr && ((mask[0] | mask[v1.imgbufoffs]) & maskbit);
+ masked = (y < 0 || y >= _outheight) || (v1.mask_ptr && ((mask[0] | mask[v1.imgbufoffs]) & maskbit));
- if (color && y < _outheight && !masked && !skip_column) {
+ if (color && !masked && !skip_column) {
pcolor = palette[color];
if (_shadow_mode == 1) {
if (pcolor == 13)
@@ -725,9 +725,15 @@
if (v1.skip_width <= 0 || _height <= 0)
return 0;
- if (rect.top > _outheight)
+ if (rect.left < 0)
+ rect.left = 0;
+
+ if (rect.top < 0)
rect.top = 0;
+ if (rect.top > _outheight)
+ rect.top = _outheight;
+
if (rect.bottom > _outheight)
rect.bottom = _outheight;
Index: costume.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/costume.cpp,v
retrieving revision 1.129
retrieving revision 1.130
diff -u -d -r1.129 -r1.130
--- costume.cpp 4 Apr 2004 22:43:54 -0000 1.129
+++ costume.cpp 6 Apr 2004 01:06:54 -0000 1.130
@@ -200,7 +200,7 @@
v1.scaleXstep = _mirror ? 1 : -1;
if (_vm->_version == 1)
- //HACK: it fix gfx glitches leaved by actor costume in V1 games, when actor moving to left
+ //HACK: it fix gfx glitches left by actor costume in V1 games, when actor moving to left
_vm->markRectAsDirty(kMainVirtScreen, rect.left, rect.right + 8, rect.top, rect.bottom, _actorID);
else
_vm->markRectAsDirty(kMainVirtScreen, rect.left, rect.right + 1, rect.top, rect.bottom, _actorID);
@@ -254,9 +254,12 @@
if (rect.left < 0)
rect.left = 0;
- if (rect.top > _outheight)
+ if (rect.top < 0)
rect.top = 0;
+ if (rect.top > _outheight)
+ rect.top = _outheight;
+
if (rect.bottom > _outheight)
rect.bottom = _outheight;
@@ -394,7 +397,7 @@
if (!rep)
color = *src++;
- if (y < _outheight) {
+ if (0 <= y && y < _outheight) {
if (!_mirror) {
LINE(0, 0); LINE(2, 2); LINE(4, 4); LINE(6, 6);
} else {
@@ -455,9 +458,9 @@
do {
if (_scaleY == 255 || *scaleytab++ < _scaleY) {
- masked = (y < _outheight) && v1.mask_ptr && ((mask[0] | mask[v1.imgbufoffs]) & maskbit);
+ masked = (y < 0 || y >= _outheight) || (v1.mask_ptr && ((mask[0] | mask[v1.imgbufoffs]) & maskbit));
- if (color && y < _outheight && !masked) {
+ if (color && !masked) {
// FIXME: Fully implement _shadow_mode.
// For now, it's enough for Sam & Max
// transparency.
@@ -525,7 +528,7 @@
len = *src++;
do {
if (_scaleY == 255 || cost_scaleTable[_scaleIndexY] < _scaleY) {
- masked = (y >= _outheight) || v1.mask_ptr && ((mask[0] | mask[v1.imgbufoffs]) & maskbit);
+ masked = (y < 0 || y >= _outheight) || (v1.mask_ptr && ((mask[0] | mask[v1.imgbufoffs]) & maskbit));
if (color && v1.x >= 0 && v1.x < _outwidth && !masked) {
*dst = _palette[color];
More information about the Scummvm-git-logs
mailing list