aboutsummaryrefslogtreecommitdiff
path: root/backends/graphics
diff options
context:
space:
mode:
authorCameron Cawley2019-12-23 23:26:25 +0000
committerFilippos Karapetis2019-12-25 08:52:19 +0200
commite2e72af31d45ee1c28b38a30b1eeb93d791839a7 (patch)
treede642a3bea20a189fbb952e1f8ac1909b3e4f8bc /backends/graphics
parentf328ab43694b74adf56924ed9d8b4da74be4f7ac (diff)
downloadscummvm-rg350-e2e72af31d45ee1c28b38a30b1eeb93d791839a7.tar.gz
scummvm-rg350-e2e72af31d45ee1c28b38a30b1eeb93d791839a7.tar.bz2
scummvm-rg350-e2e72af31d45ee1c28b38a30b1eeb93d791839a7.zip
SDL: Remove duplicated cursorStretch200To240() function
Diffstat (limited to 'backends/graphics')
-rw-r--r--backends/graphics/surfacesdl/surfacesdl-graphics.cpp27
1 files changed, 1 insertions, 26 deletions
diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
index 21a8265d8c..bb7221da4b 100644
--- a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
+++ b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
@@ -106,10 +106,6 @@ static const int s_gfxModeSwitchTable[][4] = {
{ GFX_NORMAL, GFX_DOTMATRIX, -1, -1 }
};
-#ifdef USE_SCALERS
-static int cursorStretch200To240(uint8 *buf, uint32 pitch, int width, int height, int srcX, int srcY, int origSrcY);
-#endif
-
AspectRatio::AspectRatio(int w, int h) {
// TODO : Validation and so on...
// Currently, we just ensure the program don't instantiate non-supported aspect ratios
@@ -2224,34 +2220,13 @@ void SurfaceSdlGraphicsManager::blitCursor() {
#ifdef USE_SCALERS
if (!_cursorDontScale && _videoMode.aspectRatioCorrection)
- cursorStretch200To240((uint8 *)_mouseSurface->pixels, _mouseSurface->pitch, rW, rH1, 0, 0, 0);
+ stretch200To240Nearest((uint8 *)_mouseSurface->pixels, _mouseSurface->pitch, rW, rH1, 0, 0, 0);
#endif
SDL_UnlockSurface(_mouseSurface);
SDL_UnlockSurface(_mouseOrigSurface);
}
-#ifdef USE_SCALERS
-// Basically it is stretch200To240Nearest from common/scale/aspect.cpp
-static int cursorStretch200To240(uint8 *buf, uint32 pitch, int width, int height, int srcX, int srcY, int origSrcY) {
- int maxDstY = real2Aspect(origSrcY + height - 1);
- int y;
- const uint8 *startSrcPtr = buf + srcX * 2 + (srcY - origSrcY) * pitch;
- uint8 *dstPtr = buf + srcX * 2 + maxDstY * pitch;
-
- for (y = maxDstY; y >= srcY; y--) {
- const uint8 *srcPtr = startSrcPtr + aspect2Real(y) * pitch;
-
- if (srcPtr == dstPtr)
- break;
- memcpy(dstPtr, srcPtr, width * 2);
- dstPtr -= pitch;
- }
-
- return 1 + maxDstY - srcY;
-}
-#endif
-
void SurfaceSdlGraphicsManager::undrawMouse() {
const int x = _mouseBackup.x;
const int y = _mouseBackup.y;