aboutsummaryrefslogtreecommitdiff
path: root/scumm/actor.cpp
diff options
context:
space:
mode:
authorMax Horn2003-01-16 18:07:52 +0000
committerMax Horn2003-01-16 18:07:52 +0000
commit2eff7e22423562f407a0978917d713463da83848 (patch)
treead24f5618a766811c5d140ad124a7bb0f2a1cf7c /scumm/actor.cpp
parent4e07c1bb91d2fc2a2ab7156b5a252591d3ac1848 (diff)
downloadscummvm-rg350-2eff7e22423562f407a0978917d713463da83848.tar.gz
scummvm-rg350-2eff7e22423562f407a0978917d713463da83848.tar.bz2
scummvm-rg350-2eff7e22423562f407a0978917d713463da83848.zip
fix off by one bug in gfxUsageBits code; fixed small glitch the actor iteration cleanup
svn-id: r6485
Diffstat (limited to 'scumm/actor.cpp')
-rw-r--r--scumm/actor.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/scumm/actor.cpp b/scumm/actor.cpp
index 5c37f12285..d04dfc495b 100644
--- a/scumm/actor.cpp
+++ b/scumm/actor.cpp
@@ -1117,6 +1117,7 @@ void Scumm::setActorRedrawFlags(bool fg, bool bg)
for (j = 1; j < NUM_ACTORS; j++) {
if (testGfxUsageBit(strip, j) && testGfxOtherUsageBits(strip, j)) {
Actor *a = derefActor(j);
+ assert(a->number == j);
if (fg)
a->needRedraw = true;
if (bg)
@@ -1136,6 +1137,7 @@ int Scumm::getActorFromPos(int x, int y)
return 0;
for (i = 1; i < NUM_ACTORS; i++) {
Actor *a = derefActor(i);
+ assert(a->number == i);
if (testGfxUsageBit(x >> 3, i) && !getClass(i, 32) && y >= a->top && y <= a->bottom) {
return i;
}
@@ -1554,7 +1556,7 @@ void Scumm::resetActorBgs()
}
for (i = 1; i < NUM_ACTORS; i++) {
- a = derefActor(j);
+ a = derefActor(i);
a->needBgReset = false;
}
}