aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scumm/actor.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/scumm/actor.cpp b/scumm/actor.cpp
index cbefe01dca..df2ce8d7da 100644
--- a/scumm/actor.cpp
+++ b/scumm/actor.cpp
@@ -1109,6 +1109,28 @@ void Scumm::setActorRedrawFlags() {
}
}
+void Scumm::resetActorBgs() {
+ int i, j;
+
+ for (i = 0; i < gdi._numStrips; i++) {
+ int strip = _screenStartStrip + i;
+ clearGfxUsageBit(strip, USAGE_BIT_DIRTY);
+ clearGfxUsageBit(strip, USAGE_BIT_RESTORED);
+ for (j = 1; j < _numActors; j++) {
+ if (testGfxUsageBit(strip, j) &&
+ ((_actors[j].top != 0xFF || _actors[j].needRedraw) || _actors[j].needBgReset)) {
+ clearGfxUsageBit(strip, j);
+ if ((_actors[j].bottom - _actors[j].top) >= 0)
+ gdi.resetBackground(_actors[j].top, _actors[j].bottom, i);
+ }
+ }
+ }
+
+ for (i = 1; i < _numActors; i++) {
+ _actors[i].needBgReset = false;
+ }
+}
+
int Scumm::getActorFromPos(int x, int y) {
int i;
@@ -1569,28 +1591,6 @@ void Actor::remapActorPalette(int r_fact, int g_fact, int b_fact, int threshold)
}
}
-void Scumm::resetActorBgs() {
- int i, j;
-
- for (i = 0; i < gdi._numStrips; i++) {
- int strip = _screenStartStrip + i;
- clearGfxUsageBit(strip, USAGE_BIT_DIRTY);
- clearGfxUsageBit(strip, USAGE_BIT_RESTORED);
- for (j = 1; j < _numActors; j++) {
- if (testGfxUsageBit(strip, j) &&
- ((_actors[j].top != 0xFF || _actors[j].needRedraw) || _actors[j].needBgReset)) {
- clearGfxUsageBit(strip, j);
- if ((_actors[j].bottom - _actors[j].top) >= 0)
- gdi.resetBackground(_actors[j].top, _actors[j].bottom, i);
- }
- }
- }
-
- for (i = 1; i < _numActors; i++) {
- _actors[i].needBgReset = false;
- }
-}
-
void Actor::classChanged(int cls, bool value) {
if (cls == kObjectClassAlwaysClip)
forceClip = value;