[Scummvm-cvs-logs] CVS: scummvm/scumm gfx.cpp,2.81,2.82
Max Horn
fingolfin at users.sourceforge.net
Sat May 10 09:58:02 CEST 2003
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv28807
Modified Files:
gfx.cpp
Log Message:
implemented v2 masking (at least I get no negative effects, but anybody feel free to valgrind this :-)
Index: gfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/gfx.cpp,v
retrieving revision 2.81
retrieving revision 2.82
diff -u -d -r2.81 -r2.82
--- gfx.cpp 10 May 2003 14:30:58 -0000 2.81
+++ gfx.cpp 10 May 2003 16:57:04 -0000 2.82
@@ -952,15 +952,6 @@
_mask_ptr = _vm->getResourceAddress(rtBuffer, 9) + (y * _numStrips + x);
-//if (numstrip > 5) return;
-//if (width != 320 || height != 128) return;
-//if (width != 40 || height != 48) return;
-//if (height == 128) return;
-
-
-//printf("x %d, y %d, width %d, height %d, stripnr %d, numstrip %d, vs->alloctwobuffers %d\n",
-// x, y, width, height, stripnr, numstrip, vs->alloctwobuffers);
-
const int left = stripnr << 3;
const int right = left + numstrip << 3;
byte *dst = bgbak_ptr;
@@ -1007,7 +998,6 @@
}
}
-/*
// Draw mask (zplane) data
// TODO - this code is right now completely bogus, will implement it correctly later
theY = 0;
@@ -1025,12 +1015,14 @@
}
theY++;
if (theY >= height) {
- theX++;
- if (theX >= (width >> 3))
- goto finish_v2;
+ if (left <= theX && theX < right) {
+ _mask_ptr -= _numStrips * height;
+ _mask_ptr++;
+ }
theY = 0;
- if (left <= theX && theX < right)
- _mask_ptr -= _numStrips * height - 1;
+ theX += 8;
+ if (theX >= width)
+ goto finish_v2;
}
} while (--run);
} else {
@@ -1043,19 +1035,20 @@
}
theY++;
if (theY >= height) {
- theX++;
+ if (left <= theX && theX < right) {
+ _mask_ptr -= _numStrips * height;
+ _mask_ptr++;
+ }
+ theY = 0;
+ theX += 8;
if (theX >= width)
goto finish_v2;
- theY = 0;
- if (left <= theX && theX < right)
- _mask_ptr -= _numStrips * height - 1;
}
} while (--run);
}
}
finish_v2:
-*/
// Update tdirty / bdirty
while (numstrip--) {
if (sx < 0)
More information about the Scummvm-git-logs
mailing list