aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2002-06-01 21:45:15 +0000
committerMax Horn2002-06-01 21:45:15 +0000
commitc96245f631bfc3e39e5e731f9cf4b686bebf9cf2 (patch)
treef768f6851a166585d92f0c255e7908a29c6facab
parent2a37e8b872206d1c700bcf8b048088070e91341c (diff)
downloadscummvm-rg350-c96245f631bfc3e39e5e731f9cf4b686bebf9cf2.tar.gz
scummvm-rg350-c96245f631bfc3e39e5e731f9cf4b686bebf9cf2.tar.bz2
scummvm-rg350-c96245f631bfc3e39e5e731f9cf4b686bebf9cf2.zip
added some comments; fixed #558310
svn-id: r4391
-rw-r--r--actor.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/actor.cpp b/actor.cpp
index fe7d98a50e..c02b8c046c 100644
--- a/actor.cpp
+++ b/actor.cpp
@@ -910,6 +910,7 @@ void Scumm::processActors()
Actor *actors[MAX_ACTORS], *a, **ac, **ac2, *tmp;
int numactors = 0, cnt, cnt2;
+ // Make a list of all actors in this room
for (i = 1; i < NUM_ACTORS; i++) {
a = derefActor(i);
if (a->isInCurrentRoom())
@@ -918,6 +919,8 @@ void Scumm::processActors()
if (!numactors)
return;
+ // Sort actors by position before we draw them (to ensure that actors in
+ // front are drawn after thos behind them).
ac = actors;
cnt = numactors;
do {
@@ -932,12 +935,15 @@ void Scumm::processActors()
} while (ac2++, --cnt2);
} while (ac++, --cnt);
+ // Finally draw all the actors in this room
ac = actors;
cnt = numactors;
do {
a = *ac;
if (a->costume) {
CHECK_HEAP getMaskFromBox(a->walkbox);
+ if (_fullRedraw)
+ a->needRedraw = true;
a->drawActorCostume();
CHECK_HEAP a->actorAnimate();
}