From d17f88d9670d428995a69edc08f54d585e0f181f Mon Sep 17 00:00:00 2001 From: Max Horn Date: Fri, 24 Sep 2004 21:36:04 +0000 Subject: Use Gdi::_numStrips in costume code (this allows us to be more flexible in how we compute _numStrips: from now on, only one place has to be changed for that) svn-id: r15254 --- scumm/actor.cpp | 2 +- scumm/base-costume.cpp | 4 ++-- scumm/base-costume.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scumm/actor.cpp b/scumm/actor.cpp index 7029a02802..9c3752b709 100644 --- a/scumm/actor.cpp +++ b/scumm/actor.cpp @@ -1090,7 +1090,7 @@ void Actor::drawActorCostume(bool hitTestMode) { // If the actor is partially hidden, redraw it next frame. // Only done for pre-AKOS, though. - if (bcr->drawCostume(_vm->virtscr[0], this, drawToBackBuf) & 1) { + if (bcr->drawCostume(_vm->virtscr[0], _vm->gdi._numStrips, this, drawToBackBuf) & 1) { needRedraw = (_vm->_version <= 6); } diff --git a/scumm/base-costume.cpp b/scumm/base-costume.cpp index f52f92038a..f4d2b28f87 100644 --- a/scumm/base-costume.cpp +++ b/scumm/base-costume.cpp @@ -25,7 +25,7 @@ namespace Scumm { -byte BaseCostumeRenderer::drawCostume(const VirtScreen &vs, const Actor *a, bool drawToBackBuf) { +byte BaseCostumeRenderer::drawCostume(const VirtScreen &vs, int numStrips, const Actor *a, bool drawToBackBuf) { int i; byte result = 0; @@ -36,7 +36,7 @@ byte BaseCostumeRenderer::drawCostume(const VirtScreen &vs, const Actor *a, bool _outwidth = vs.pitch; _outheight = vs.h; - _numStrips = _outwidth / 8; + _numStrips = numStrips; if (_vm->_version == 1) { _xmove = 0; diff --git a/scumm/base-costume.h b/scumm/base-costume.h index 5a08b356f4..bc3591ea53 100644 --- a/scumm/base-costume.h +++ b/scumm/base-costume.h @@ -132,7 +132,7 @@ public: virtual void setCostume(int costume) = 0; - byte drawCostume(const VirtScreen &vs, const Actor *a, bool drawToBackBuf); + byte drawCostume(const VirtScreen &vs, int numStrips, const Actor *a, bool drawToBackBuf); protected: -- cgit v1.2.3