svn-id: r6855
This commit is contained in:
Max Horn 2003-03-24 21:56:29 +00:00
parent 12c0a6834a
commit c98130a0a6
2 changed files with 8 additions and 15 deletions

View file

@ -1112,10 +1112,8 @@ void Scumm::setActorRedrawFlags(bool fg, bool bg) {
if (_fullRedraw) { if (_fullRedraw) {
for (j = 1; j < NUM_ACTORS; j++) { for (j = 1; j < NUM_ACTORS; j++) {
Actor *a = derefActor(j); Actor *a = derefActor(j);
if (fg) a->needRedraw |= fg;
a->needRedraw = true; a->needBgReset |= bg;
if (bg)
a->needBgReset = true;
} }
} else { } else {
for (i = 0; i < gdi._numStrips; i++) { for (i = 0; i < gdi._numStrips; i++) {
@ -1125,10 +1123,8 @@ void Scumm::setActorRedrawFlags(bool fg, bool bg) {
if (testGfxUsageBit(strip, j) && testGfxOtherUsageBits(strip, j)) { if (testGfxUsageBit(strip, j) && testGfxOtherUsageBits(strip, j)) {
Actor *a = derefActor(j); Actor *a = derefActor(j);
assert(a->number == j); assert(a->number == j);
if (fg) a->needRedraw |= fg;
a->needRedraw = true; a->needBgReset |= bg;
if (bg)
a->needBgReset = true;
} }
} }
} }

View file

@ -1719,20 +1719,17 @@ void Scumm::setCameraAt(int pos_x, int pos_y) {
runScript(_vars[VAR_SCROLL_SCRIPT], 0, 0, 0); runScript(_vars[VAR_SCROLL_SCRIPT], 0, 0, 0);
} }
} else { } else {
int t;
if (camera._mode != CM_FOLLOW_ACTOR || abs(pos_x - camera._cur.x) > (_realWidth / 2)) { if (camera._mode != CM_FOLLOW_ACTOR || abs(pos_x - camera._cur.x) > (_realWidth / 2)) {
camera._cur.x = pos_x; camera._cur.x = pos_x;
} }
camera._dest.x = pos_x; camera._dest.x = pos_x;
t = _vars[VAR_CAMERA_MIN_X]; if (camera._cur.x < _vars[VAR_CAMERA_MIN_X])
if (camera._cur.x < t) camera._cur.x = _vars[VAR_CAMERA_MIN_X];
camera._cur.x = t;
t = _vars[VAR_CAMERA_MAX_X]; if (camera._cur.x > _vars[VAR_CAMERA_MAX_X])
if (camera._cur.x > t) camera._cur.x = _vars[VAR_CAMERA_MAX_X];
camera._cur.x = t;
if (_vars[VAR_SCROLL_SCRIPT]) { if (_vars[VAR_SCROLL_SCRIPT]) {
_vars[VAR_CAMERA_POS_X] = camera._cur.x; _vars[VAR_CAMERA_POS_X] = camera._cur.x;