[Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.265,1.266 base-costume.cpp,2.13,2.14 base-costume.h,1.22,1.23

Travis Howell kirben at users.sourceforge.net
Tue Aug 10 21:47:03 CEST 2004


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

Modified Files:
	actor.cpp base-costume.cpp base-costume.h 
Log Message:

Add part of suggested cleanup to remove extra variable.
actorDrawVirScr might still be required in future HE games, see actorOps case 219.


Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/actor.cpp,v
retrieving revision 1.265
retrieving revision 1.266
diff -u -d -r1.265 -r1.266
--- actor.cpp	10 Aug 2004 23:54:15 -0000	1.265
+++ actor.cpp	11 Aug 2004 04:46:41 -0000	1.266
@@ -1054,15 +1054,9 @@
 	bcr->_draw_bottom = bottom = 0;
 	bcr->_skipLimb = (skipLimb != 0);
 	
-	// FIXME: Why do the _actorDrawVirScr and actorDrawVirScr variable exist, and even
-	// gets saved? I (Fingolfin) can't see any reason for this... looking how they are
-	//  used,it appears we could just get rid of _actorDrawVirScr and instead add params
-	// to drawActorCostume() and drawCostume() which do their job....
-	bcr->_actorDrawVirScr = (actorDrawVirScr != 0);
-
 	// If the actor is partially hidden, redraw it next frame.
 	// Only done for pre-AKOS, though.
-	if (bcr->drawCostume(_vm->virtscr[0], cost) & 1) {
+	if (bcr->drawCostume(_vm->virtscr[0], cost, actorDrawVirScr) & 1) {
 		needRedraw = (_vm->_version <= 6);
 	}
 

Index: base-costume.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/base-costume.cpp,v
retrieving revision 2.13
retrieving revision 2.14
diff -u -d -r2.13 -r2.14
--- base-costume.cpp	29 Jun 2004 11:02:15 -0000	2.13
+++ base-costume.cpp	11 Aug 2004 04:46:41 -0000	2.14
@@ -25,11 +25,11 @@
 
 namespace Scumm {
 
-byte BaseCostumeRenderer::drawCostume(const VirtScreen &vs, const CostumeData &cost) {
+byte BaseCostumeRenderer::drawCostume(const VirtScreen &vs, const CostumeData &cost, bool drawVirScr) {
 	int i;
 	byte result = 0;
 
-	if (_actorDrawVirScr)
+	if (drawVirScr)
 		_outptr = _vm->getResourceAddress(rtBuffer, 5) + vs.xstart;
 	else
 		_outptr = vs.screenPtr + vs.xstart;

Index: base-costume.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/base-costume.h,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- base-costume.h	8 Aug 2004 22:09:49 -0000	1.22
+++ base-costume.h	11 Aug 2004 04:46:41 -0000	1.23
@@ -116,8 +116,6 @@
 		_mirror = false;
 		_width = _height = 0;
 		_skipLimb = 0;
-		_actorDrawVirScr = 0;
-
 		
 		_outptr = 0;
 		_outwidth = _outheight = 0;
@@ -128,7 +126,7 @@
 	virtual void setCostume(int costume) = 0;
 
 
-	byte drawCostume(const VirtScreen &vs, const CostumeData &cost);
+	byte drawCostume(const VirtScreen &vs, const CostumeData &cost, bool actorDrawVirScr);
 
 protected:
 





More information about the Scummvm-git-logs mailing list