[Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.83,1.84 akos.cpp,1.50,1.51 akos.h,1.12,1.13 costume.cpp,1.36,1.37

Max Horn fingolfin at users.sourceforge.net
Mon May 12 10:51:05 CEST 2003


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv30515

Modified Files:
	actor.cpp akos.cpp akos.h costume.cpp 
Log Message:
modified akos / 'old' costume (charset) masking code to a) match each other; also, the costume.cpp code looks again checks _zbuf != 0 even for non-SMALL_HEADER games, as it used to 1 year ago ;-)  (note: this change is kinda experimental; might fix some bugs, might introduce some regressions)

Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/actor.cpp,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -d -r1.83 -r1.84
--- actor.cpp	8 May 2003 15:48:45 -0000	1.83
+++ actor.cpp	12 May 2003 17:50:09 -0000	1.84
@@ -1001,7 +1001,6 @@
 		bottom = cr._draw_bottom;
 	} else {
 		AkosRenderer ar(_vm);
-		ar.charsetmask = true;
 		ar._actorX = x - _vm->virtscr[0].xstart;
 		ar._actorY = y - elevation;
 		ar._scaleX = scalex;

Index: akos.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/akos.cpp,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -d -r1.50 -r1.51
--- akos.cpp	10 May 2003 21:48:14 -0000	1.50
+++ akos.cpp	12 May 2003 17:50:09 -0000	1.51
@@ -636,7 +636,7 @@
 	int cur_x, x_right, x_left, skip = 0, tmp_x, tmp_y;
 	int cur_y, y_top, y_bottom;
 	bool y_clipping;
-	bool masking;
+	bool charsetmask, masking;
 	int step;
 
 	/* implement custom scale table */
@@ -835,15 +835,17 @@
 
 	v1.destptr = outptr + cur_x + cur_y * outwidth;
 
+	charsetmask =
+		_vm->hasCharsetMask(x_left, y_top + _vm->virtscr[0].topline, x_right,
+												_vm->virtscr[0].topline + y_bottom);
 	masking = false;
-	if (_zbuf) {
+	if (_zbuf != 0) {
 		masking = _vm->isMaskActiveAt(x_left, y_top, x_right, y_bottom,
 										_vm->getResourceAddress(rtBuffer, 9) +
 										_vm->gdi._imgBufOffs[_zbuf] + _vm->_screenStartStrip) != 0;
 	}
 
 	v1.mask_ptr = NULL;
-
 	if (masking || charsetmask || _shadow_mode) {
 		v1.mask_ptr = _vm->getResourceAddress(rtBuffer, 9) + cur_y * _numStrips + _vm->_screenStartStrip;
 		v1.imgbufoffs = _vm->gdi._imgBufOffs[_zbuf];

Index: akos.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/akos.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- akos.h	6 Mar 2003 21:45:51 -0000	1.12
+++ akos.h	12 May 2003 17:50:09 -0000	1.13
@@ -31,8 +31,6 @@
 
 class AkosRenderer : public BaseCostumeRenderer {
 public:
-	bool charsetmask;	// FIXME - it seems charsetmask is only set once, in actor.cpp, to true. So can we get rid of it?!?
-
 	byte *outptr;
 	uint outwidth, outheight;
 

Index: costume.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/costume.cpp,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- costume.cpp	10 May 2003 21:49:56 -0000	1.36
+++ costume.cpp	12 May 2003 17:50:09 -0000	1.37
@@ -80,8 +80,8 @@
 byte CostumeRenderer::mainRoutine(int slot, int frame) {
 	int xmove, ymove, i, b, s;
 	uint scal;
-	byte scaling;
-	byte charsetmask, masking;
+	bool scaling;
+	bool charsetmask, masking;
 	byte startScaleIndexX;
 	byte newAmiCost;
 	int ex1, ex2;
@@ -284,17 +284,18 @@
 	charsetmask =
 		_vm->hasCharsetMask(_left, _top + _vm->virtscr[0].topline, _right,
 												_vm->virtscr[0].topline + _bottom);
-	masking = 0;
-
+	masking = false;
 	if (_vm->_features & GF_SMALL_HEADER)
 		masking = (_zbuf != 0);
-	else
+	else if (_zbuf != 0) {
 		masking =
 			_vm->isMaskActiveAt(_left, _top, _right, _bottom,
 													_vm->getResourceAddress(rtBuffer, 9) +
 													_vm->gdi._imgBufOffs[_zbuf] +
 													_vm->_screenStartStrip);
+	}
 
+	_mask_ptr = NULL;
 	if (masking || charsetmask) {
 		_mask_ptr = _vm->getResourceAddress(rtBuffer, 9) + _ypos * _numStrips + _vm->_screenStartStrip;
 		_imgbufoffs = _vm->gdi._imgBufOffs[_zbuf];





More information about the Scummvm-git-logs mailing list