aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/illusions/screen.cpp24
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;