diff options
author | Max Horn | 2004-09-04 01:31:04 +0000 |
---|---|---|
committer | Max Horn | 2004-09-04 01:31:04 +0000 |
commit | 4bd05071e511c077811040c7c746d1c5f8e8c3f8 (patch) | |
tree | 15ddd6e0ab7b7474668ea07bca628ddbd4efa8a4 /backends/sdl/graphics.cpp | |
parent | b086ee7f67b7de4d218ff1e4862271d9e921ba9c (diff) | |
download | scummvm-rg350-4bd05071e511c077811040c7c746d1c5f8e8c3f8.tar.gz scummvm-rg350-4bd05071e511c077811040c7c746d1c5f8e8c3f8.tar.bz2 scummvm-rg350-4bd05071e511c077811040c7c746d1c5f8e8c3f8.zip |
Got rid of OSystem::move_screen
svn-id: r14882
Diffstat (limited to 'backends/sdl/graphics.cpp')
-rw-r--r-- | backends/sdl/graphics.cpp | 71 |
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; } |