[Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.120,1.121

Bertrand Augereau tramboi at users.sourceforge.net
Wed Jun 4 20:02:09 CEST 2003


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

Modified Files:
	actor.cpp 
Log Message:
use the global BaseCostumeRenderer instead of reinstancing it every time

Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/actor.cpp,v
retrieving revision 1.120
retrieving revision 1.121
diff -u -d -r1.120 -r1.121
--- actor.cpp	1 Jun 2003 18:20:37 -0000	1.120
+++ actor.cpp	5 Jun 2003 02:47:12 -0000	1.121
@@ -873,12 +873,9 @@
 
 	setupActorScale();
 
-	BaseCostumeRenderer *bcr;
+	BaseCostumeRenderer* bcr = _vm->_bcr;
 
-	if (_vm->_features & GF_NEW_COSTUMES)
-		bcr = new AkosRenderer(_vm);
-	else
-		bcr = new CostumeRenderer(_vm);
+	bcr->updateNbStrips ();
 
 	bcr->_actorX = x - _vm->virtscr[0].xstart;
 	bcr->_actorY = y - elevation;
@@ -937,12 +934,6 @@
 	// Record the vertical extent of the drawn actor
 	top = bcr->_draw_top;
 	bottom = bcr->_draw_bottom;
-	
-	// Finally get rid of the costume renderer again.
-	// TODO: Instead of creating costume renderers on the fly and then
-	// disposing them again, we could once at the start create one,
-	// and then reuse it.
-	delete bcr;
 }
 
 void Actor::animateCostume() {





More information about the Scummvm-git-logs mailing list