aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/costume.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/scumm/costume.cpp')
-rw-r--r--engines/scumm/costume.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/engines/scumm/costume.cpp b/engines/scumm/costume.cpp
index 82201a6017..aba347f939 100644
--- a/engines/scumm/costume.cpp
+++ b/engines/scumm/costume.cpp
@@ -655,6 +655,11 @@ byte NESCostumeRenderer::drawLimb(const Actor *a, int limb) {
x = -x;
}
+ left = MIN(left, _actorX + x);
+ right = MAX(right, _actorX + x + 8);
+ top = MIN(top, _actorY + y);
+ bottom = MAX(bottom, _actorY + y + 8);
+
if ((_actorX + x < 0) || (_actorX + x + 8 >= _out.w))
continue;
if ((_actorY + y < 0) || (_actorY + y + 8 >= _out.h))
@@ -681,10 +686,6 @@ byte NESCostumeRenderer::drawLimb(const Actor *a, int limb) {
*((byte *)_out.pixels + my * _out.pitch + mx) = palette[c];
}
}
- left = MIN(left, _actorX + x);
- right = MAX(right, _actorX + x + 8);
- top = MIN(top, _actorY + y);
- bottom = MAX(bottom, _actorY + y + 8);
}
_draw_top = top;