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
This commit is contained in:
Max Horn 2004-09-24 21:36:04 +00:00
parent 2872c312a9
commit d17f88d967
3 changed files with 4 additions and 4 deletions

View File

@ -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);
}

View File

@ -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;

View File

@ -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: