aboutsummaryrefslogtreecommitdiff
path: root/backends/sdl/graphics.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'backends/sdl/graphics.cpp')
-rw-r--r--backends/sdl/graphics.cpp71
1 files changed, 0 insertions, 71 deletions
diff --git a/backends/sdl/graphics.cpp b/backends/sdl/graphics.cpp
index 692f200e7f..89958d6440 100644
--- a/backends/sdl/graphics.cpp
+++ b/backends/sdl/graphics.cpp
@@ -720,77 +720,6 @@ void OSystem_SDL::setPalette(const byte *colors, uint start, uint num) {
_paletteDirtyEnd = start + num;
}
-void OSystem_SDL::move_screen(int dx, int dy, int height) {
-
- // Short circuit check - do we have to do anything anyway?
- if ((dx == 0 && dy == 0) || height <= 0)
- return;
-
- Common::StackLock lock(_graphicsMutex); // Lock the mutex until this function ends
-
- byte *src, *dst;
- int x, y;
-
- // We'll have to do a full screen redraw anyway, so set the flag.
- _forceFull = true;
-
- // Hide the mouse
- undraw_mouse();
-
- // Try to lock the screen surface
- if (SDL_LockSurface(_screen) == -1)
- error("SDL_LockSurface failed: %s", SDL_GetError());
-
- // vertical movement
- if (dy > 0) {
- // move down - copy from bottom to top
- dst = (byte *)_screen->pixels + (height - 1) * _screenWidth;
- src = dst - dy * _screenWidth;
- for (y = dy; y < height; y++) {
- memcpy(dst, src, _screenWidth);
- src -= _screenWidth;
- dst -= _screenWidth;
- }
- } else if (dy < 0) {
- // move up - copy from top to bottom
- dst = (byte *)_screen->pixels;
- src = dst - dy * _screenWidth;
- for (y = -dy; y < height; y++) {
- memcpy(dst, src, _screenWidth);
- src += _screenWidth;
- dst += _screenWidth;
- }
- }
-
- // horizontal movement
- if (dx > 0) {
- // move right - copy from right to left
- dst = (byte *)_screen->pixels + (_screenWidth - 1);
- src = dst - dx;
- for (y = 0; y < height; y++) {
- for (x = dx; x < _screenWidth; x++) {
- *dst-- = *src--;
- }
- src += _screenWidth + (_screenWidth - dx);
- dst += _screenWidth + (_screenWidth - dx);
- }
- } else if (dx < 0) {
- // move left - copy from left to right
- dst = (byte *)_screen->pixels;
- src = dst - dx;
- for (y = 0; y < height; y++) {
- for (x = -dx; x < _screenWidth; x++) {
- *dst++ = *src++;
- }
- src += _screenWidth - (_screenWidth + dx);
- dst += _screenWidth - (_screenWidth + dx);
- }
- }
-
- // Unlock the screen surface
- SDL_UnlockSurface(_screen);
-}
-
void OSystem_SDL::set_shake_pos(int shake_pos) {
_newShakePos = shake_pos;
}