diff options
author | johndoe123 | 2016-03-25 22:34:36 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2018-07-20 06:43:33 +0000 |
commit | 9447d42fd71ce092d70fad416caf2babacf00dcd (patch) | |
tree | 9fcc85d1db92934eea63bed6b41c7a37a9e7aa0b /engines/illusions/screen.cpp | |
parent | ad558f8c684662e8dbfdf96dcf1e244d5a0b2451 (diff) | |
download | scummvm-rg350-9447d42fd71ce092d70fad416caf2babacf00dcd.tar.gz scummvm-rg350-9447d42fd71ce092d70fad416caf2babacf00dcd.tar.bz2 scummvm-rg350-9447d42fd71ce092d70fad416caf2babacf00dcd.zip |
ILLUSIONS: BBDOU: Remove experimental sprite smoothing code
Diffstat (limited to 'engines/illusions/screen.cpp')
-rw-r--r-- | engines/illusions/screen.cpp | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/engines/illusions/screen.cpp b/engines/illusions/screen.cpp index d8dd00430f..8add55ef2e 100644 --- a/engines/illusions/screen.cpp +++ b/engines/illusions/screen.cpp @@ -831,27 +831,14 @@ void Screen::drawSurface20(Common::Rect &dstRect, Graphics::Surface *surface, Co //debug("Screen::drawSurface20"); } -//#define TEST_SMOOTHING -#ifdef TEST_SMOOTHING -static uint16 average(const uint16 a, const uint16 b) { - byte r1, g1, b1, r2, g2, b2; - g_system->getScreenFormat().colorToRGB(a, r1, g1, b1); - g_system->getScreenFormat().colorToRGB(b, r2, g2, b2); -// return g_system->getScreenFormat().RGBToColor((r1 + r1 + r2) / 3, (g1 + g1 + g2) / 3, (b1 + b1 + b2) / 3); - return g_system->getScreenFormat().RGBToColor((r1 + r2) / 2, (g1 + g2) / 2, (b1 + b2) / 2); -} -#endif - void Screen::drawSurface21(Common::Rect &dstRect, Graphics::Surface *surface, Common::Rect &srcRect) { // Scaled const int dstWidth = dstRect.width(), dstHeight = dstRect.height(); const int srcWidth = srcRect.width(), srcHeight = srcRect.height(); const int errYStart = srcHeight / dstHeight; const int errYIncr = srcHeight % dstHeight; -// const int midY = dstHeight / 2; const int errXStart = srcWidth / dstWidth; const int errXIncr = srcWidth % dstWidth; -// const int midX = dstWidth / 2; int h = dstHeight, errY = 0, skipY, srcY = srcRect.top; byte *dst = (byte*)_backSurface->getBasePtr(dstRect.left, dstRect.top); skipY = (dstHeight < srcHeight) ? 0 : dstHeight / (2*srcHeight) + 1; @@ -864,17 +851,8 @@ void Screen::drawSurface21(Common::Rect &dstRect, Graphics::Surface *surface, Co byte *dstRow = dst; while (w-- > 0) { uint16 pixel = READ_LE_UINT16(src); - if (pixel != _colorKey1) { -#ifdef TEST_SMOOTHING - if (errX >= midX) { - uint16 npixel = READ_LE_UINT16(src + 2); - if (npixel == _colorKey1) - npixel = READ_LE_UINT16(dstRow); - pixel = average(pixel, npixel); - } -#endif + if (pixel != _colorKey1) WRITE_LE_UINT16(dstRow, pixel); - } dstRow += 2; src += 2 * errXStart; errX += errXIncr; |