aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorTravis Howell2004-08-11 04:46:41 +0000
committerTravis Howell2004-08-11 04:46:41 +0000
commitc0d8b6c47ad7d420179070b4652b2d563cea7dc5 (patch)
tree3dc28b7be9472cf6e69b69ef87a03e45ffe364f1 /scumm
parent57b158214949fbb24b37e23d0adeec2c52bbf86a (diff)
downloadscummvm-rg350-c0d8b6c47ad7d420179070b4652b2d563cea7dc5.tar.gz
scummvm-rg350-c0d8b6c47ad7d420179070b4652b2d563cea7dc5.tar.bz2
scummvm-rg350-c0d8b6c47ad7d420179070b4652b2d563cea7dc5.zip
Add part of suggested cleanup to remove extra variable.
actorDrawVirScr might still be required in future HE games, see actorOps case 219. svn-id: r14553
Diffstat (limited to 'scumm')
-rw-r--r--scumm/actor.cpp8
-rw-r--r--scumm/base-costume.cpp4
-rw-r--r--scumm/base-costume.h4
3 files changed, 4 insertions, 12 deletions
diff --git a/scumm/actor.cpp b/scumm/actor.cpp
index 4bebc978ec..3fee5e1d22 100644
--- a/scumm/actor.cpp
+++ b/scumm/actor.cpp
@@ -1054,15 +1054,9 @@ void Actor::drawActorCostume() {
bcr->_draw_bottom = bottom = 0;
bcr->_skipLimb = (skipLimb != 0);
- // FIXME: Why do the _actorDrawVirScr and actorDrawVirScr variable exist, and even
- // gets saved? I (Fingolfin) can't see any reason for this... looking how they are
- // used,it appears we could just get rid of _actorDrawVirScr and instead add params
- // to drawActorCostume() and drawCostume() which do their job....
- bcr->_actorDrawVirScr = (actorDrawVirScr != 0);
-
// If the actor is partially hidden, redraw it next frame.
// Only done for pre-AKOS, though.
- if (bcr->drawCostume(_vm->virtscr[0], cost) & 1) {
+ if (bcr->drawCostume(_vm->virtscr[0], cost, actorDrawVirScr) & 1) {
needRedraw = (_vm->_version <= 6);
}
diff --git a/scumm/base-costume.cpp b/scumm/base-costume.cpp
index 0a4de63d43..718678ec99 100644
--- a/scumm/base-costume.cpp
+++ b/scumm/base-costume.cpp
@@ -25,11 +25,11 @@
namespace Scumm {
-byte BaseCostumeRenderer::drawCostume(const VirtScreen &vs, const CostumeData &cost) {
+byte BaseCostumeRenderer::drawCostume(const VirtScreen &vs, const CostumeData &cost, bool drawVirScr) {
int i;
byte result = 0;
- if (_actorDrawVirScr)
+ if (drawVirScr)
_outptr = _vm->getResourceAddress(rtBuffer, 5) + vs.xstart;
else
_outptr = vs.screenPtr + vs.xstart;
diff --git a/scumm/base-costume.h b/scumm/base-costume.h
index cb75d11200..0b89f60f05 100644
--- a/scumm/base-costume.h
+++ b/scumm/base-costume.h
@@ -116,8 +116,6 @@ public:
_mirror = false;
_width = _height = 0;
_skipLimb = 0;
- _actorDrawVirScr = 0;
-
_outptr = 0;
_outwidth = _outheight = 0;
@@ -128,7 +126,7 @@ public:
virtual void setCostume(int costume) = 0;
- byte drawCostume(const VirtScreen &vs, const CostumeData &cost);
+ byte drawCostume(const VirtScreen &vs, const CostumeData &cost, bool actorDrawVirScr);
protected: