[Scummvm-cvs-logs] CVS: scummvm/scumm akos.cpp,1.26,1.27 gfx.cpp,1.55,1.56 scumm.h,1.60,1.61

James Brown ender at users.sourceforge.net
Fri Nov 8 10:41:02 CET 2002


Update of /cvsroot/scummvm/scummvm/scumm
In directory usw-pr-cvs1:/tmp/cvs-serv29430/scumm

Modified Files:
	akos.cpp gfx.cpp scumm.h 
Log Message:
Masking patch


Index: akos.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/akos.cpp,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- akos.cpp	6 Nov 2002 15:29:48 -0000	1.26
+++ akos.cpp	8 Nov 2002 18:40:11 -0000	1.27
@@ -923,8 +923,7 @@
 	bdd.y = _y + move_y_cur;
 
 	if (clipping != 0) {
-		_vm->_bompMaskPtr = _vm->getResourceAddress(rtBuffer, 9) + _vm->_screenStartStrip + _vm->gdi._imgBufOffs[clipping];
-		_vm->_bompMaskPitch = _vm->_realWidth / 8;
+		_vm->_bompMaskPtr = _vm->getResourceAddress(rtBuffer, 9) + _vm->gdi._imgBufOffs[clipping];
 		_vm->drawBomp(&bdd, decode_mode, 1);
 	} else {
 		_vm->drawBomp(&bdd, decode_mode, 0);

Index: gfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/gfx.cpp,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -d -r1.55 -r1.56
--- gfx.cpp	6 Nov 2002 17:55:43 -0000	1.55
+++ gfx.cpp	8 Nov 2002 18:40:12 -0000	1.56
@@ -3260,8 +3260,9 @@
 	byte skip_y_new = 0;
 	byte bits = 0;
 	byte *mask_out = 0;
+	byte *charset_mask;
 	byte tmp;
-	int32 clip_left, clip_right, clip_top, clip_bottom, tmp_x, tmp_y;
+	int32 clip_left, clip_right, clip_top, clip_bottom, tmp_x, tmp_y, mask_offset, mask_pitch;
 
 	if (bd->x < 0) {
 		clip_left = -bd->x;
@@ -3290,9 +3291,14 @@
 	byte * src = bd->dataptr;
 	byte * dst = bd->out + bd->y * bd->outwidth + bd->x + clip_left;
 
+	mask_pitch = _realWidth / 8;
+	mask_offset = _screenStartStrip + (bd->y * mask_pitch) + ((bd->x + clip_left) >> 3);
+
+	charset_mask = getResourceAddress(rtBuffer, 9) + mask_offset;
+	bits = 128 >> ((bd->x + clip_left) & 7);
+
 	if (mask == 1) {
-		mask_out = _bompMaskPtr + (bd->y * _bompMaskPitch) + ((bd->x + clip_left) >> 3);
-		bits = 128 >> ((bd->x + clip_left) & 7);
+		mask_out = _bompMaskPtr + mask_offset;
 	}
 
 	if (mask == 3) {
@@ -3358,6 +3364,7 @@
 			bompApplyMask(line_ptr, mask_out, bits, clip_right);
 		}
 
+		bompApplyMask(line_ptr, charset_mask, bits, clip_right);
 		bompApplyActorPalette(line_ptr, clip_right);
 
 		switch(bd->shadowMode) {
@@ -3375,7 +3382,8 @@
 		}
 
 labelBompSkip:
-		mask_out += _bompMaskPitch;
+		mask_out += mask_pitch;
+		charset_mask += mask_pitch;
 		pos_y++;
 		dst += bd->outwidth;
 		if (pos_y >= clip_bottom)

Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -d -r1.60 -r1.61
--- scumm.h	6 Nov 2002 17:55:44 -0000	1.60
+++ scumm.h	8 Nov 2002 18:40:12 -0000	1.61
@@ -816,7 +816,6 @@
 	int32 _bompScaleRight, _bompScaleBottom;
 	byte *_bompScallingXPtr, *_bompScallingYPtr;
 	byte *_bompMaskPtr;
-	int32 _bompMaskPitch;
 	byte *_bompActorPalletePtr;
 
 





More information about the Scummvm-git-logs mailing list