[Scummvm-cvs-logs] CVS: scummvm gfx.cpp,1.111,1.112

Max Horn fingolfin at users.sourceforge.net
Mon Aug 19 10:53:03 CEST 2002


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

Modified Files:
	gfx.cpp 
Log Message:
more o5_lights work; the only thing missing should be the flashlight now

Index: gfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gfx.cpp,v
retrieving revision 1.111
retrieving revision 1.112
diff -u -d -r1.111 -r1.112
--- gfx.cpp	19 Aug 2002 17:20:54 -0000	1.111
+++ gfx.cpp	19 Aug 2002 17:52:26 -0000	1.112
@@ -739,7 +739,10 @@
 	byte twobufs;
 	int numzbuf;
 	int sx;
+	bool lightsOn;
 
+	// Check whether lights are turned on or not
+	lightsOn = (_vm->_features & GF_AFTER_V6) || (_vm->_vars[_vm->VAR_CURRENT_LIGHTS] & LIGHTMODE_screen);
 
 	CHECK_HEAP;
 	if (_vm->_features & GF_SMALL_HEADER)
@@ -824,12 +827,12 @@
 			_bgbak_ptr = where_draw_ptr;
 
 			if (_vm->hasCharsetMask(sx << 3, y, (sx + 1) << 3, bottom)) {
-				if (flag & dbClear)
+				if (flag & dbClear || (!lightsOn && vs->number == 0))
 					clear8ColWithMasking();
 				else
 					draw8ColWithMasking();
 			} else {
-				if (flag & dbClear)
+				if (flag & dbClear || (!lightsOn && vs->number == 0))
 					clear8Col();
 				else
 					blit(_backbuff_ptr, _bgbak_ptr, 8, h);
@@ -2256,7 +2259,6 @@
 	_numLinesToProcess = bottom - top;
 	if (_numLinesToProcess) {
 		if ((_vm->_features & GF_AFTER_V6) || (_vm->_vars[_vm->VAR_CURRENT_LIGHTS] & LIGHTMODE_screen)) {
-//		if (1 /*_vm->_vars[VAR_V5_DRAWFLAGS]&2*/ ) {
 			if (_vm->hasCharsetMask(strip << 3, top, (strip + 1) << 3, bottom))
 				draw8ColWithMasking();
 			else





More information about the Scummvm-git-logs mailing list