aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2004-09-24 21:36:04 +0000
committerMax Horn2004-09-24 21:36:04 +0000
commitd17f88d9670d428995a69edc08f54d585e0f181f (patch)
treec16cc68208ddc53afbf4316aa32927f6bf3ca47f
parent2872c312a942dbbb29645aca627d852ab1d38bcf (diff)
downloadscummvm-rg350-d17f88d9670d428995a69edc08f54d585e0f181f.tar.gz
scummvm-rg350-d17f88d9670d428995a69edc08f54d585e0f181f.tar.bz2
scummvm-rg350-d17f88d9670d428995a69edc08f54d585e0f181f.zip
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
-rw-r--r--scumm/actor.cpp2
-rw-r--r--scumm/base-costume.cpp4
-rw-r--r--scumm/base-costume.h2
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: