aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm
diff options
context:
space:
mode:
authorMax Horn2007-02-15 10:30:30 +0000
committerMax Horn2007-02-15 10:30:30 +0000
commit41898a3dd973a53e11ada1abea5299362493a28b (patch)
tree70954e5ea42249d861a4d347b15382355bd95a1b /engines/scumm
parentec27c53491a60258ecb8a67a023964d5ff94b9ab (diff)
downloadscummvm-rg350-41898a3dd973a53e11ada1abea5299362493a28b.tar.gz
scummvm-rg350-41898a3dd973a53e11ada1abea5299362493a28b.tar.bz2
scummvm-rg350-41898a3dd973a53e11ada1abea5299362493a28b.zip
Fix for bug #1451720: MANIACNES: Actors don't appear if outside camera range
svn-id: r25600
Diffstat (limited to 'engines/scumm')
-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;