aboutsummaryrefslogtreecommitdiff
path: root/scumm/actor.cpp
diff options
context:
space:
mode:
authorJames Brown2003-01-16 17:37:34 +0000
committerJames Brown2003-01-16 17:37:34 +0000
commit4e07c1bb91d2fc2a2ab7156b5a252591d3ac1848 (patch)
tree9377fc2d8931c6afc7ef024305ae040db20a9e87 /scumm/actor.cpp
parentd5a266f2ca7ca39b31286d8f34eae26a2919ba8e (diff)
downloadscummvm-rg350-4e07c1bb91d2fc2a2ab7156b5a252591d3ac1848.tar.gz
scummvm-rg350-4e07c1bb91d2fc2a2ab7156b5a252591d3ac1848.tar.bz2
scummvm-rg350-4e07c1bb91d2fc2a2ab7156b5a252591d3ac1848.zip
Patch 668634: Actor iteration fix
svn-id: r6484
Diffstat (limited to 'scumm/actor.cpp')
-rw-r--r--scumm/actor.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/scumm/actor.cpp b/scumm/actor.cpp
index 478156bb8f..5c37f12285 100644
--- a/scumm/actor.cpp
+++ b/scumm/actor.cpp
@@ -1103,7 +1103,7 @@ void Scumm::setActorRedrawFlags(bool fg, bool bg)
int i, j;
if (_fullRedraw) {
- for (j = 0; j < NUM_ACTORS; j++) {
+ for (j = 1; j < NUM_ACTORS; j++) {
Actor *a = derefActor(j);
if (fg)
a->needRedraw = true;
@@ -1114,7 +1114,7 @@ void Scumm::setActorRedrawFlags(bool fg, bool bg)
for (i = 0; i < gdi._numStrips; i++) {
int strip = _screenStartStrip + i;
if (testGfxAnyUsageBits(strip)) {
- for (j = 0; j < NUM_ACTORS; j++) {
+ for (j = 1; j < NUM_ACTORS; j++) {
if (testGfxUsageBit(strip, j) && testGfxOtherUsageBits(strip, j)) {
Actor *a = derefActor(j);
if (fg)
@@ -1543,18 +1543,18 @@ void Scumm::resetActorBgs()
for (i = 0; i < gdi._numStrips; i++) {
int strip = _screenStartStrip + i;
- a = getFirstActor();
- for (j = 0; j < NUM_ACTORS; j++) {
+ for (j = 1; j < NUM_ACTORS; j++) {
+ a = derefActor(j);
if (testGfxUsageBit(strip, j) && a->top != 0xFF && a->needBgReset) {
clearGfxUsageBit(strip, j);
if ((a->bottom - a->top) >= 0)
gdi.resetBackground(a->top, a->bottom, i);
}
- a++;
}
}
- for (i = 1, a = getFirstActor(); ++a, i < NUM_ACTORS; i++) {
+ for (i = 1; i < NUM_ACTORS; i++) {
+ a = derefActor(j);
a->needBgReset = false;
}
}