aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBertrand Augereau2003-06-05 02:47:12 +0000
committerBertrand Augereau2003-06-05 02:47:12 +0000
commitcf8d8617c97da441e016de5a8d523fed7d33ba30 (patch)
tree54d12142e9f0fd90651a63bd4316435dfdce59ba
parent3bbaa8edb55614111891e7530af8d196a77a3496 (diff)
downloadscummvm-rg350-cf8d8617c97da441e016de5a8d523fed7d33ba30.tar.gz
scummvm-rg350-cf8d8617c97da441e016de5a8d523fed7d33ba30.tar.bz2
scummvm-rg350-cf8d8617c97da441e016de5a8d523fed7d33ba30.zip
use the global BaseCostumeRenderer instead of reinstancing it every time
svn-id: r8309
-rw-r--r--scumm/actor.cpp13
1 files changed, 2 insertions, 11 deletions
diff --git a/scumm/actor.cpp b/scumm/actor.cpp
index 347f5b912b..a23c7d16de 100644
--- a/scumm/actor.cpp
+++ b/scumm/actor.cpp
@@ -873,12 +873,9 @@ void Actor::drawActorCostume() {
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 @@ void Actor::drawActorCostume() {
// 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() {