From 0fc137cdf2f04d676b196efb6bc0599efd53e84f Mon Sep 17 00:00:00 2001 From: Max Horn Date: Mon, 8 Mar 2010 10:31:09 +0000 Subject: Rename PocketPCPortrait scaler to DownscaleHorizByThreeQuarters, and move it to graphics/scaler. svn-id: r48191 --- backends/platform/wince/CEScaler.cpp | 35 ----------------------------------- backends/platform/wince/CEScaler.h | 6 ------ backends/platform/wince/wince-sdl.cpp | 2 +- 3 files changed, 1 insertion(+), 42 deletions(-) (limited to 'backends/platform') diff --git a/backends/platform/wince/CEScaler.cpp b/backends/platform/wince/CEScaler.cpp index 4e321e527e..8334ba7a04 100644 --- a/backends/platform/wince/CEScaler.cpp +++ b/backends/platform/wince/CEScaler.cpp @@ -25,41 +25,6 @@ #include "graphics/scaler/intern.h" #include "CEScaler.h" -template -void PocketPCPortraitTemplate(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height) { - uint16 *work; - - // Various casts below go via (void *) to avoid warning. This is - // safe as these are all even addresses. - while (height--) { - work = (uint16 *)(void *)dstPtr; - - for (int i=0; i(color1, color2); - work[1] = interpolate32_1_1(color2, color3); - work[2] = interpolate32_3_1(color4, color3); - - work += 3; - } - srcPtr += srcPitch; - dstPtr += dstPitch; - } -} - -void PocketPCPortrait(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height) { - extern int gBitFormat; - if (gBitFormat == 565) - PocketPCPortraitTemplate >(srcPtr, srcPitch, dstPtr, dstPitch, width, height); - else - PocketPCPortraitTemplate >(srcPtr, srcPitch, dstPtr, dstPitch, width, height); -} - void PocketPCLandscapeAspect(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height) { const int redblueMasks[] = { 0x7C1F, 0xF81F }; diff --git a/backends/platform/wince/CEScaler.h b/backends/platform/wince/CEScaler.h index 548c0c99c1..b806630d31 100644 --- a/backends/platform/wince/CEScaler.h +++ b/backends/platform/wince/CEScaler.h @@ -31,12 +31,6 @@ #include "graphics/scaler.h" #include "graphics/scaler/intern.h" -/** - * This filter (down)scales the source image horizontally by a factor of 3/4. - * For example, a 320x200 image is scaled to 240x200. - */ -DECLARE_SCALER(PocketPCPortrait); - /** * This filter (up)scales the source image vertically by a factor of 6/5. * For example, a 320x200 image is scaled to 320x240. diff --git a/backends/platform/wince/wince-sdl.cpp b/backends/platform/wince/wince-sdl.cpp index 75e882f43e..02538f879f 100644 --- a/backends/platform/wince/wince-sdl.cpp +++ b/backends/platform/wince/wince-sdl.cpp @@ -1150,7 +1150,7 @@ bool OSystem_WINCE3::update_scalers() { _scaleFactorXd = 4; _scaleFactorYm = 1; _scaleFactorYd = 1; - _scalerProc = PocketPCPortrait; + _scalerProc = DownscaleHorizByThreeQuarters; _modeFlags = 0; } else { _scaleFactorXm = 1; -- cgit v1.2.3