[Scummvm-cvs-logs] CVS: scummvm/backends/sdl sdl-common.cpp,1.45,1.45.2.1
Max Horn
fingolfin at users.sourceforge.net
Sun May 18 12:35:11 CEST 2003
Update of /cvsroot/scummvm/scummvm/backends/sdl
In directory sc8-pr-cvs1:/tmp/cvs-serv28983
Modified Files:
Tag: branch-0-4-0
sdl-common.cpp
Log Message:
applied fix from trunk
Index: sdl-common.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/sdl/sdl-common.cpp,v
retrieving revision 1.45
retrieving revision 1.45.2.1
diff -u -d -r1.45 -r1.45.2.1
--- sdl-common.cpp 1 May 2003 12:42:46 -0000 1.45
+++ sdl-common.cpp 18 May 2003 19:34:06 -0000 1.45.2.1
@@ -225,8 +225,9 @@
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
@@ -236,8 +237,9 @@
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);
}
}
More information about the Scummvm-git-logs
mailing list