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 | |
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')
-rw-r--r-- | backends/PalmOS/Src/palm.h | 4 | ||||
-rw-r--r-- | backends/PalmOS/Src/palmgfx.cpp | 59 | ||||
-rw-r--r-- | backends/dc/dc.h | 1 | ||||
-rw-r--r-- | backends/dc/display.cpp | 40 | ||||
-rw-r--r-- | backends/gp32/gp32.cpp | 38 | ||||
-rw-r--r-- | backends/gp32/gp32.h | 4 | ||||
-rw-r--r-- | backends/morphos/morphos.cpp | 42 | ||||
-rw-r--r-- | backends/morphos/morphos.h | 1 | ||||
-rw-r--r-- | backends/null/null.cpp | 5 | ||||
-rw-r--r-- | backends/sdl/graphics.cpp | 71 | ||||
-rw-r--r-- | backends/sdl/sdl-common.h | 2 | ||||
-rw-r--r-- | backends/x11/x11.cpp | 39 |
12 files changed, 0 insertions, 306 deletions
diff --git a/backends/PalmOS/Src/palm.h b/backends/PalmOS/Src/palm.h index 5401f04384..6dbab515f2 100644 --- a/backends/PalmOS/Src/palm.h +++ b/backends/PalmOS/Src/palm.h @@ -74,10 +74,6 @@ public: // The screen will not be updated to reflect the new bitmap void copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h); - // Moves the screen content around by the given amount of pixels - // but only the top height pixel rows, the rest stays untouched - void move_screen(int dx, int dy, int height); - // Update the dirty areas of the screen void updateScreen(); diff --git a/backends/PalmOS/Src/palmgfx.cpp b/backends/PalmOS/Src/palmgfx.cpp index 65c3336e47..8f96844cad 100644 --- a/backends/PalmOS/Src/palmgfx.cpp +++ b/backends/PalmOS/Src/palmgfx.cpp @@ -583,65 +583,6 @@ void OSystem_PALMOS::updateScreen() { ((this)->*(_renderer_proc))(); } -void OSystem_PALMOS::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; - - // Hide the mouse - if (_mouseDrawn) - undraw_mouse(); - - RectangleType r, dummy; - WinSetDrawWindow(_offScreenH); - RctSetRectangle(&r, ((_offScreenH != _screenH) ? 0 : _screenOffset.x), ((_offScreenH != _screenH) ? 0 : _screenOffset.y), _screenWidth, _screenHeight); - - // vertical movement - if (dy > 0) { - // move down - copy from bottom to top - if (_useHRmode) { - // need to set the draw window - HRWinScrollRectangle(gVars->HRrefNum, &r, winDown, dy, &dummy); - } else { - WinScrollRectangle(&r, winDown, dy, &dummy); - } - } else if (dy < 0) { - // move up - copy from top to bottom - dy = -dy; - if (_useHRmode) { - // need to set the draw window - HRWinScrollRectangle(gVars->HRrefNum, &r, winUp, dy, &dummy); - } else { - WinScrollRectangle(&r, winUp, dy, &dummy); - } - } - - // horizontal movement - if (dx > 0) { - // move right - copy from right to left - if (_useHRmode) { - // need to set the draw window - HRWinScrollRectangle(gVars->HRrefNum, &r, winRight, dx, &dummy); - } else { - WinScrollRectangle(&r, winRight, dx, &dummy); - } - } else if (dx < 0) { - // move left - copy from left to right - dx = -dx; - if (_useHRmode) { - // need to set the draw window - HRWinScrollRectangle(gVars->HRrefNum, &r, winLeft, dx, &dummy); - } else { - WinScrollRectangle(&r, winLeft, dx, &dummy); - } - } - - - WinSetDrawWindow(_screenH); - // Prevent crash on Clie device using successive [HR]WinScrollRectangle ! - SysTaskDelay(1); -} - void OSystem_PALMOS::draw1BitGfx(UInt16 id, Int32 x, Int32 y, Boolean show) { if (OPTIONS_TST(kOptDisableOnScrDisp)) return; diff --git a/backends/dc/dc.h b/backends/dc/dc.h index 490a97ffea..3f40f8667d 100644 --- a/backends/dc/dc.h +++ b/backends/dc/dc.h @@ -73,7 +73,6 @@ class OSystem_Dreamcast : public OSystem { // Draw a bitmap to screen. // The screen will not be updated to reflect the new bitmap void copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h); - void move_screen(int dx, int dy, int height); // Update the dirty areas of the screen void updateScreen(); diff --git a/backends/dc/display.cpp b/backends/dc/display.cpp index 97bf65be93..2e46967dea 100644 --- a/backends/dc/display.cpp +++ b/backends/dc/display.cpp @@ -206,46 +206,6 @@ void OSystem_Dreamcast::copyRectToScreen(const byte *buf, int pitch, int x, int _screen_dirty = true; } -void OSystem_Dreamcast::move_screen(int dx, int dy, int height) { - - if ((dx == 0) && (dy == 0)) - return; - - if (dx == 0) { - // vertical movement - if (dy > 0) { - // move down - // copy from bottom to top - for (int y = height - 1; y >= dy; y--) - copyRectToScreen(screen + SCREEN_W * (y - dy), SCREEN_W, 0, y, _screen_w, 1); - } else { - // move up - // copy from top to bottom - for (int y = 0; y < height + dx; y++) - copyRectToScreen(screen + SCREEN_W * (y - dy), SCREEN_W, 0, y, _screen_w, 1); - } - } else if (dy == 0) { - // horizontal movement - if (dx > 0) { - // move right - // copy from right to left - for (int x = _screen_w - 1; x >= dx; x--) - copyRectToScreen(screen + x - dx, SCREEN_W, x, 0, 1, height); - } else { - // move left - // copy from left to right - for (int x = 0; x < _screen_w; x++) - copyRectToScreen(screen + x - dx, SCREEN_W, x, 0, 1, height); - } - } else { - // free movement - // not necessary for now - } - - _screen_dirty = true; -} - - bool OSystem_Dreamcast::showMouse(bool visible) { bool last = _ms_visible; diff --git a/backends/gp32/gp32.cpp b/backends/gp32/gp32.cpp index 5a636a38da..3451aa69e0 100644 --- a/backends/gp32/gp32.cpp +++ b/backends/gp32/gp32.cpp @@ -350,44 +350,6 @@ int SDL_SetColors(SDL_Surface *surface, SDL_Color *colors, int firstcolor, int n return 1; } -// Moves the screen content around by the given amount of pixels -// but only the top height pixel rows, the rest stays untouched -void OSystem_GP32::move_screen(int dx, int dy, int height) { - if ((dx == 0) && (dy == 0)) - return; - - if (dx == 0) { - // vertical movement - if (dy > 0) { - // move down - // copy from bottom to top - for (int y = height - 1; y >= dy; y--) - copyRectToScreen((byte *)_screen->pixels + _screenWidth * (y - dy), _screenWidth, 0, y, _screenWidth, 1); - } else { - // move up - // copy from top to bottom - for (int y = 0; y < height + dx; y++) - copyRectToScreen((byte *)_screen->pixels + _screenWidth * (y - dy), _screenWidth, 0, y, _screenWidth, 1); - } - } else if (dy == 0) { - // horizontal movement - if (dx > 0) { - // move right - // copy from right to left - for (int x = _screenWidth - 1; x >= dx; x--) - copyRectToScreen((byte *)_screen->pixels + x - dx, _screenWidth, x, 0, 1, height); - } else { - // move left - // copy from left to right - for (int x = 0; x < _screenWidth; x++) - copyRectToScreen((byte *)_screen->pixels + x - dx, _screenWidth, x, 0, 1, height); - } - } else { - // free movement - // not necessary for now - } -} - void OSystem_GP32::load_gfx_mode() { GpRectFill(NULL,&gpDraw[GAME_SURFACE], 0, 0, 320, 240, 0); //black border diff --git a/backends/gp32/gp32.h b/backends/gp32/gp32.h index 80b3160673..fbb0253773 100644 --- a/backends/gp32/gp32.h +++ b/backends/gp32/gp32.h @@ -47,10 +47,6 @@ public: // The screen will not be updated to reflect the new bitmap void copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h); - // Moves the screen content around by the given amount of pixels - // but only the top height pixel rows, the rest stays untouched - void move_screen(int dx, int dy, int height); - // Update the dirty areas of the screen void updateScreen(); diff --git a/backends/morphos/morphos.cpp b/backends/morphos/morphos.cpp index aea11d251b..0691963468 100644 --- a/backends/morphos/morphos.cpp +++ b/backends/morphos/morphos.cpp @@ -1103,48 +1103,6 @@ void OSystem_MorphOS::copyRectToScreen(const byte *src, int pitch, int x, int y, } } -void OSystem_MorphOS::move_screen(int dx, int dy, int height) { - - if ((dx == 0) && (dy == 0)) - return; - - UpdateRects = 26; - Rectangle update_rect = { 0, 0, ScummBufferWidth, ScummBufferHeight }; - OrRectRegion(NewUpdateRegion, &update_rect); - ScreenChanged = true; - - UndrawMouse(); - - // vertical movement - if (dy > 0) { - // move down - // copy from bottom to top - for (int y = height - 1; y >= dy; y--) - copyRectToScreen((byte *)ScummBuffer + ScummBufferWidth * (y - dy), ScummBufferWidth, 0, y, ScummBufferWidth, 1); - } else if (dy < 0) { - // move up - // copy from top to bottom - dy = -dy; - for (int y = dy; y < height; y++) - copyRectToScreen((byte *)ScummBuffer + ScummBufferWidth * y, ScummBufferWidth, 0, y - dy, ScummBufferWidth, 1); - } - - // horizontal movement - if (dx > 0) { - // move right - // copy from right to left - for (int x = ScummBufferWidth - 1; x >= dx; x--) - copyRectToScreen((byte *)ScummBuffer + x - dx, ScummBufferWidth, x, 0, 1, height); - } else if (dx < 0) { - // move left - // copy from left to right - dx = -dx; - for (int x = dx; x < ScummBufferWidth; x++) - copyRectToScreen((byte *)ScummBuffer + x, ScummBufferWidth, x, 0, 1, height); - } -} - - bool OSystem_MorphOS::AddUpdateRect(WORD x, WORD y, WORD w, WORD h) { if (UpdateRects > 25) diff --git a/backends/morphos/morphos.h b/backends/morphos/morphos.h index 7294f855ca..0279bc3517 100644 --- a/backends/morphos/morphos.h +++ b/backends/morphos/morphos.h @@ -52,7 +52,6 @@ class OSystem_MorphOS : public OSystem // Draw a bitmap to screen. // The screen will not be updated to reflect the new bitmap virtual void copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h); - void move_screen(int dx, int dy, int height); // Update the dirty areas of the screen virtual void updateScreen(); diff --git a/backends/null/null.cpp b/backends/null/null.cpp index 3e2b07cd53..ff23217483 100644 --- a/backends/null/null.cpp +++ b/backends/null/null.cpp @@ -52,7 +52,6 @@ public: virtual void setPalette(const byte *colors, uint start, uint num); virtual void copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h); virtual void updateScreen(); - virtual void move_screen(int dx, int dy, int height); virtual void set_shake_pos(int shakeOffset); virtual void showOverlay(); @@ -181,10 +180,6 @@ void OSystem_NULL::updateScreen() { } -void OSystem_NULL::move_screen(int dx, int dy, int height) -{ -} - void OSystem_NULL::set_shake_pos(int shakeOffset) { } 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; } diff --git a/backends/sdl/sdl-common.h b/backends/sdl/sdl-common.h index 10f6c8b5e4..3c1e600eaa 100644 --- a/backends/sdl/sdl-common.h +++ b/backends/sdl/sdl-common.h @@ -52,8 +52,6 @@ public: // The screen will not be updated to reflect the new bitmap void copyRectToScreen(const byte *src, int pitch, int x, int y, int w, int h); - void move_screen(int dx, int dy, int height); - // Update the dirty areas of the screen void updateScreen(); diff --git a/backends/x11/x11.cpp b/backends/x11/x11.cpp index d7899a30c3..cbf4e90555 100644 --- a/backends/x11/x11.cpp +++ b/backends/x11/x11.cpp @@ -90,8 +90,6 @@ public: // The screen will not be updated to reflect the new bitmap void copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h); - void move_screen(int dx, int dy, int height); - // Update the dirty areas of the screen void updateScreen(); @@ -577,43 +575,6 @@ void OSystem_X11::copyRectToScreen(const byte *buf, int pitch, int x, int y, int } } -void OSystem_X11::move_screen(int dx, int dy, int height) { - - if ((dx == 0) && (dy == 0)) - return; - - if (dx == 0) { - // vertical movement - if (dy > 0) { - // move down - // copy from bottom to top - for (int y = height - 1; y >= dy; y--) - copyRectToScreen(local_fb + fb_width * (y - dy), fb_width, 0, y, fb_width, 1); - } else { - // move up - // copy from top to bottom - for (int y = 0; y < height + dx; y++) - copyRectToScreen(local_fb + fb_width * (y - dy), fb_width, 0, y, fb_width, 1); - } - } else if (dy == 0) { - // horizontal movement - if (dx > 0) { - // move right - // copy from right to left - for (int x = fb_width - 1; x >= dx; x--) - copyRectToScreen(local_fb + x - dx, fb_width, x, 0, 1, height); - } else { - // move left - // copy from left to right - for (int x = 0; x < fb_width; x++) - copyRectToScreen(local_fb + x - dx, fb_width, x, 0, 1, height); - } - } else { - // free movement - // not necessary for now - } -} - void OSystem_X11::blit_convert(const dirty_square * d, uint16 *dst, int pitch) { uint8 *ptr_src = local_fb + (fb_width * d->y) + d->x; uint16 *ptr_dst = dst + (fb_width * d->y) + d->x; |