[Scummvm-cvs-logs] CVS: scummvm/backends/sdl sdl-common.cpp,1.49,1.50
Max Horn
fingolfin at users.sourceforge.net
Sat May 17 19:41:05 CEST 2003
Update of /cvsroot/scummvm/scummvm/backends/sdl
In directory sc8-pr-cvs1:/tmp/cvs-serv8004
Modified Files:
sdl-common.cpp
Log Message:
fixed my wrong fix for move_screen
Index: sdl-common.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/sdl/sdl-common.cpp,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -d -r1.49 -r1.50
--- sdl-common.cpp 17 May 2003 23:48:32 -0000 1.49
+++ sdl-common.cpp 18 May 2003 02:40:54 -0000 1.50
@@ -233,8 +233,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
@@ -244,8 +245,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