diff options
author | Cameron Cawley | 2019-12-23 23:26:25 +0000 |
---|---|---|
committer | Filippos Karapetis | 2019-12-25 08:52:19 +0200 |
commit | e2e72af31d45ee1c28b38a30b1eeb93d791839a7 (patch) | |
tree | de642a3bea20a189fbb952e1f8ac1909b3e4f8bc /graphics | |
parent | f328ab43694b74adf56924ed9d8b4da74be4f7ac (diff) | |
download | scummvm-rg350-e2e72af31d45ee1c28b38a30b1eeb93d791839a7.tar.gz scummvm-rg350-e2e72af31d45ee1c28b38a30b1eeb93d791839a7.tar.bz2 scummvm-rg350-e2e72af31d45ee1c28b38a30b1eeb93d791839a7.zip |
SDL: Remove duplicated cursorStretch200To240() function
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/scaler/aspect.cpp | 11 | ||||
-rw-r--r-- | graphics/scaler/aspect.h | 2 |
2 files changed, 5 insertions, 8 deletions
diff --git a/graphics/scaler/aspect.cpp b/graphics/scaler/aspect.cpp index dae1d41079..1c2844955f 100644 --- a/graphics/scaler/aspect.cpp +++ b/graphics/scaler/aspect.cpp @@ -205,8 +205,7 @@ void makeRectStretchable(int &x, int &y, int &w, int &h, bool interpolate) { * srcY + height - 1, and it should be stretched to Y coordinates srcY * through real2Aspect(srcY + height - 1). */ - -template<typename ColorMask> + int stretch200To240Nearest(uint8 *buf, uint32 pitch, int width, int height, int srcX, int srcY, int origSrcY) { int maxDstY = real2Aspect(origSrcY + height - 1); int y; @@ -224,7 +223,6 @@ int stretch200To240Nearest(uint8 *buf, uint32 pitch, int width, int height, int return 1 + maxDstY - srcY; } - template<typename ColorMask> int stretch200To240Interpolated(uint8 *buf, uint32 pitch, int width, int height, int srcX, int srcY, int origSrcY) { int maxDstY = real2Aspect(origSrcY + height - 1); @@ -262,8 +260,8 @@ int stretch200To240Interpolated(uint8 *buf, uint32 pitch, int width, int height, } int stretch200To240(uint8 *buf, uint32 pitch, int width, int height, int srcX, int srcY, int origSrcY, bool interpolate) { - extern int gBitFormat; #if ASPECT_MODE != kSuperFastAndUglyAspectMode + extern int gBitFormat; if (interpolate) { if (gBitFormat == 565) return stretch200To240Interpolated<Graphics::ColorMasks<565> >(buf, pitch, width, height, srcX, srcY, origSrcY); @@ -271,10 +269,7 @@ int stretch200To240(uint8 *buf, uint32 pitch, int width, int height, int srcX, i return stretch200To240Interpolated<Graphics::ColorMasks<555> >(buf, pitch, width, height, srcX, srcY, origSrcY); } else { #endif - if (gBitFormat == 565) - return stretch200To240Nearest<Graphics::ColorMasks<565> >(buf, pitch, width, height, srcX, srcY, origSrcY); - else // gBitFormat == 555 - return stretch200To240Nearest<Graphics::ColorMasks<555> >(buf, pitch, width, height, srcX, srcY, origSrcY); + return stretch200To240Nearest(buf, pitch, width, height, srcX, srcY, origSrcY); #if ASPECT_MODE != kSuperFastAndUglyAspectMode } #endif diff --git a/graphics/scaler/aspect.h b/graphics/scaler/aspect.h index 93201c3d40..ee1dfc1460 100644 --- a/graphics/scaler/aspect.h +++ b/graphics/scaler/aspect.h @@ -58,4 +58,6 @@ int stretch200To240(uint8 *buf, int origSrcY, bool interpolate); +int stretch200To240Nearest(uint8 *buf, uint32 pitch, int width, int height, int srcX, int srcY, int origSrcY); + #endif |