aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Menshakov2009-12-12 13:00:44 +0000
committerVladimir Menshakov2009-12-12 13:00:44 +0000
commitd45385f98ed5453f25cefa19d687bd85ffc82324 (patch)
treec915845e7059946fcbcd1358c74896a7b3732831
parent476d52aab2af87bd188ac194c3d29953296ea0ed (diff)
downloadscummvm-rg350-d45385f98ed5453f25cefa19d687bd85ffc82324.tar.gz
scummvm-rg350-d45385f98ed5453f25cefa19d687bd85ffc82324.tar.bz2
scummvm-rg350-d45385f98ed5453f25cefa19d687bd85ffc82324.zip
fixed non-default src rectangle rendering
svn-id: r46340
-rw-r--r--engines/teenagent/surface.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/teenagent/surface.cpp b/engines/teenagent/surface.cpp
index d1ccb66494..82a6399657 100644
--- a/engines/teenagent/surface.cpp
+++ b/engines/teenagent/surface.cpp
@@ -78,10 +78,10 @@ Common::Rect Surface::render(Graphics::Surface *surface, int dx, int dy, bool mi
byte *dst = (byte *)surface->getBasePtr(dx + x, dy + y);
for (int i = src_rect.top; i < src_rect.bottom; ++i) {
- for (int j = src_rect.left; j < src_rect.right; ++j) {
+ for (int j = 0; j < src_rect.width(); ++j) {
byte p = src[j];
if (p != 0xff)
- dst[mirror? w - j - 1: j] = p;
+ dst[(mirror? src_rect.width() - j - 1: j)] = p;
}
dst += surface->pitch;
src += pitch;