[Scummvm-cvs-logs] CVS: scummvm/saga scene.cpp,1.112,1.113

Torbjörn Andersson eriktorbjorn at users.sourceforge.net
Mon Jul 4 00:48:18 CEST 2005


Update of /cvsroot/scummvm/scummvm/saga
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12120

Modified Files:
	scene.cpp 
Log Message:
Apparently some masks are bigger than the image they are supposed to be
masking, and therefore need to be clipped. This fixes a slight glitch in the
ITE intro where an actor is drawn partly in the status text field.


Index: scene.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/scene.cpp,v
retrieving revision 1.112
retrieving revision 1.113
diff -u -d -r1.112 -r1.113
--- scene.cpp	20 Jun 2005 11:46:34 -0000	1.112
+++ scene.cpp	4 Jul 2005 07:46:48 -0000	1.113
@@ -772,6 +772,12 @@
 			_bgMask.loaded = 1;
 			_vm->decodeBGImage(_bgMask.res_buf, _bgMask.res_len, &_bgMask.buf,
 							&_bgMask.buf_len, &_bgMask.w, &_bgMask.h);
+
+			// At least in ITE the mask needs to be clipped.
+
+			_bgMask.w = MIN(_bgMask.w, _vm->getDisplayWidth());
+			_bgMask.h = MIN(_bgMask.h, _vm->getClippedSceneHeight());
+
 			debug(0, "BACKGROUND MASK width=%d height=%d length=%d", _bgMask.w, _bgMask.h, _bgMask.buf_len);
 			break;
 		case SAGA_STRINGS:





More information about the Scummvm-git-logs mailing list