aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/teenagent/actor.cpp4
-rw-r--r--engines/teenagent/surface.cpp7
2 files changed, 7 insertions, 4 deletions
diff --git a/engines/teenagent/actor.cpp b/engines/teenagent/actor.cpp
index df2f150086..a9afac8485 100644
--- a/engines/teenagent/actor.cpp
+++ b/engines/teenagent/actor.cpp
@@ -126,7 +126,7 @@ Common::Rect Actor::render(Graphics::Surface *surface, const Common::Point &posi
if (head != NULL)
clip.top = head->h;
- int xp = position.x - dx, yp = position.y - dy;
+ int xp = position.x - dx * zoom / 256, yp = position.y - dy * zoom / 256;
if (xp < 0)
xp = 0;
if (xp + s->w > 320)
@@ -137,7 +137,7 @@ Common::Rect Actor::render(Graphics::Surface *surface, const Common::Point &posi
if (yp + clip.top + clip.height() > 200)
yp = 200 - clip.top - clip.height();
- dirty = s->render(surface, xp, yp + clip.top, orientation == kActorLeft, clip, zoom);
+ dirty = s->render(surface, xp, yp + clip.top * zoom / 256, orientation == kActorLeft, clip, zoom);
if (head != NULL)
dirty.extend(head->render(surface, xp, yp, orientation == kActorLeft, Common::Rect(), zoom));
diff --git a/engines/teenagent/surface.cpp b/engines/teenagent/surface.cpp
index bb6aca155a..efcb294038 100644
--- a/engines/teenagent/surface.cpp
+++ b/engines/teenagent/surface.cpp
@@ -86,10 +86,12 @@ Common::Rect Surface::render(Graphics::Surface *surface, int dx, int dy, bool mi
dst += surface->pitch;
src += pitch;
}
+ src_rect.translate(x + dx, y + dy);
+ return src_rect;
} else {
Common::Rect dst_rect(src_rect);
dst_rect.right = (dst_rect.width() * zoom / 256) + dst_rect.left;
- dst_rect.top = dst_rect.bottom - (dst_rect.height() * zoom / 256);
+ dst_rect.bottom = dst_rect.top + (dst_rect.height() * zoom / 256);
assert(x + dx + dst_rect.width() <= surface->w);
assert(y + dy + dst_rect.height() <= surface->h);
@@ -105,8 +107,9 @@ Common::Rect Surface::render(Graphics::Surface *surface, int dx, int dy, bool mi
}
dst += surface->pitch;
}
+ dst_rect.translate(x + dx, y + dy);
+ return dst_rect;
}
- return Common::Rect(x + dx, y + dy, x + src_rect.width() + dx, y + src_rect.height() + dy);
}
} // End of namespace TeenAgent