aboutsummaryrefslogtreecommitdiff
path: root/backends/sdl
diff options
context:
space:
mode:
authorMax Horn2003-05-18 02:40:54 +0000
committerMax Horn2003-05-18 02:40:54 +0000
commite91bf4df2f8312858686269ad2f93dc88b301a31 (patch)
treeafe72aafafc92cf077c8cd1cebd648d3b781e7f9 /backends/sdl
parent1156abd532f1e3439e4f81e32aa05a558858c44c (diff)
downloadscummvm-rg350-e91bf4df2f8312858686269ad2f93dc88b301a31.tar.gz
scummvm-rg350-e91bf4df2f8312858686269ad2f93dc88b301a31.tar.bz2
scummvm-rg350-e91bf4df2f8312858686269ad2f93dc88b301a31.zip
fixed my wrong fix for move_screen
svn-id: r7623
Diffstat (limited to 'backends/sdl')
-rw-r--r--backends/sdl/sdl-common.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/backends/sdl/sdl-common.cpp b/backends/sdl/sdl-common.cpp
index 95c4ea7364..92eca7acf8 100644
--- a/backends/sdl/sdl-common.cpp
+++ b/backends/sdl/sdl-common.cpp
@@ -233,8 +233,9 @@ void OSystem_SDL_Common::move_screen(int dx, int dy, int height) {
copy_rect((byte *)_screen->pixels + _screenWidth * (y - dy), _screenWidth, 0, y, _screenWidth, 1);
} else if (dy < 0) {
// move up - copy from top to bottom
+ dy = -dy;
for (y = dy; y < height; y++)
- copy_rect((byte *)_screen->pixels + _screenWidth * (y - dy), _screenWidth, 0, y, _screenWidth, 1);
+ copy_rect((byte *)_screen->pixels + _screenWidth * y, _screenWidth, 0, y - dy, _screenWidth, 1);
}
// horizontal movement
@@ -244,8 +245,9 @@ void OSystem_SDL_Common::move_screen(int dx, int dy, int height) {
copy_rect((byte *)_screen->pixels + x - dx, _screenWidth, x, 0, 1, height);
} else if (dx < 0) {
// move left - copy from left to right
+ dx = -dx;
for (x = dx; x < _screenWidth; x++)
- copy_rect((byte *)_screen->pixels + x - dx, _screenWidth, x, 0, 1, height);
+ copy_rect((byte *)_screen->pixels + x, _screenWidth, x - dx, 0, 1, height);
}
}