aboutsummaryrefslogtreecommitdiff
path: root/scumm/actor.cpp
diff options
context:
space:
mode:
authorMax Horn2003-01-05 23:53:16 +0000
committerMax Horn2003-01-05 23:53:16 +0000
commitd9515432e4a1ed57d693c37aba2e6e2812b1fdae (patch)
tree7be1c6c857ea726ff1c22ef3cdb75e56b0d32410 /scumm/actor.cpp
parenta0d4234e8945464da1a125c954f1f7e7ff2c40a3 (diff)
downloadscummvm-rg350-d9515432e4a1ed57d693c37aba2e6e2812b1fdae.tar.gz
scummvm-rg350-d9515432e4a1ed57d693c37aba2e6e2812b1fdae.tar.bz2
scummvm-rg350-d9515432e4a1ed57d693c37aba2e6e2812b1fdae.zip
started unifying code in akos.cpp and costume.cpp
svn-id: r6343
Diffstat (limited to 'scumm/actor.cpp')
-rw-r--r--scumm/actor.cpp33
1 files changed, 18 insertions, 15 deletions
diff --git a/scumm/actor.cpp b/scumm/actor.cpp
index e57af33565..16fe2b5019 100644
--- a/scumm/actor.cpp
+++ b/scumm/actor.cpp
@@ -920,12 +920,12 @@ void Actor::drawActorCostume()
if (!(_vm->_features & GF_AFTER_V7)) {
CostumeRenderer cr(_vm);
- cr._actorX = x - _vm->virtscr->xstart;
+ cr._actorX = x - _vm->virtscr[0].xstart;
cr._actorY = y - elevation;
cr._scaleX = scalex;
cr._scaleY = scaley;
- cr._outheight = _vm->virtscr->height;
+ cr._outheight = _vm->virtscr[0].height;
// FIXME - Hack to fix two glitches in the scene where Bobbin
// heals Rusty: Bobbin's feet get masked when Rusty shows him
@@ -980,28 +980,32 @@ void Actor::drawActorCostume()
else if (cr._zbuf > _vm->gdi._numZBuffer)
cr._zbuf = (byte)_vm->gdi._numZBuffer;
+ cr._shadow_mode = shadow_mode;
cr._shadow_table = _vm->_shadowPalette;
cr.setCostume(costume);
cr.setPalette(palette);
cr.setFacing(facing);
- top = 0xFF;
+ cr.draw_top = top = 0xFF;
+ cr.draw_bottom = bottom = 0;
- bottom = 0;
+ cr._dirty_id = number;
/* if the actor is partially hidden, redraw it next frame */
- if (cr.drawCostume(this) & 1) {
+ if (cr.drawCostume(cost) & 1) {
needBgReset = true;
needRedraw = true;
}
+ top = cr.draw_top;
+ bottom = cr.draw_bottom;
} else {
AkosRenderer ar(_vm);
ar.charsetmask = true;
- ar._x = x - _vm->virtscr->xstart;
+ ar._x = x - _vm->virtscr[0].xstart;
ar._y = y - elevation;
- ar.scale_x = scalex;
- ar.scale_y = scaley;
+ ar._scaleX = scalex;
+ ar._scaleY = scaley;
ar.clipping = forceClip;
if (ar.clipping == 100) {
ar.clipping = _vm->getMaskFromBox(walkbox);
@@ -1009,9 +1013,9 @@ void Actor::drawActorCostume()
ar.clipping = _vm->gdi._numZBuffer;
}
- ar.outptr = _vm->virtscr->screenPtr + _vm->virtscr->xstart;
- ar.outwidth = _vm->virtscr->width;
- ar.outheight = _vm->virtscr->height;
+ ar.outptr = _vm->virtscr[0].screenPtr + _vm->virtscr[0].xstart;
+ ar.outwidth = _vm->virtscr[0].width;
+ ar.outheight = _vm->virtscr[0].height;
ar.shadow_mode = shadow_mode;
ar.shadow_table = _vm->_shadowPalette;
@@ -1020,13 +1024,12 @@ void Actor::drawActorCostume()
ar.setPalette(palette);
ar.setFacing(this);
- ar.dirty_id = number;
-
- ar.cd = &cost;
+ ar._dirty_id = number;
ar.draw_top = top = 0x7fffffff;
ar.draw_bottom = bottom = 0;
- if (ar.drawCostume()) {
+
+ if (ar.drawCostume(cost)) {
needBgReset = true;
needRedraw = true;
}