diff options
author | Bertrand Augereau | 2003-06-05 02:47:12 +0000 |
---|---|---|
committer | Bertrand Augereau | 2003-06-05 02:47:12 +0000 |
commit | cf8d8617c97da441e016de5a8d523fed7d33ba30 (patch) | |
tree | 54d12142e9f0fd90651a63bd4316435dfdce59ba | |
parent | 3bbaa8edb55614111891e7530af8d196a77a3496 (diff) | |
download | scummvm-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.cpp | 13 |
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() { |