aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2016-10-03 23:01:14 -0400
committerPaul Gilbert2016-10-03 23:01:14 -0400
commit054bfb3c196ac5a02d149c758a2ee0a4711b55e4 (patch)
treeecc1e8a37f047ab7d4b45451e165d2a3c7c75e2d
parentad355ec79d49bfe0a2c2ce329f9bf691d46a1950 (diff)
downloadscummvm-rg350-054bfb3c196ac5a02d149c758a2ee0a4711b55e4.tar.gz
scummvm-rg350-054bfb3c196ac5a02d149c758a2ee0a4711b55e4.tar.bz2
scummvm-rg350-054bfb3c196ac5a02d149c758a2ee0a4711b55e4.zip
TITANIC: Fixes for movie rendering using transBlitRect
-rw-r--r--engines/titanic/support/transparency_surface.cpp6
-rw-r--r--engines/titanic/support/video_surface.cpp9
2 files changed, 8 insertions, 7 deletions
diff --git a/engines/titanic/support/transparency_surface.cpp b/engines/titanic/support/transparency_surface.cpp
index d956c77a58..f917dfb48b 100644
--- a/engines/titanic/support/transparency_surface.cpp
+++ b/engines/titanic/support/transparency_surface.cpp
@@ -46,7 +46,11 @@ CTransparencySurface::CTransparencySurface(const Graphics::Surface *surface,
_flag1 = false;
break;
case TRANS_DEFAULT:
- error("TRANS_DEFAULT not supported in transparency surface");
+ if (*(byte *)surface->getPixels() < 0x80) {
+ _flag1 = true;
+ _flag2 = false;
+ }
+ break;
default:
break;
}
diff --git a/engines/titanic/support/video_surface.cpp b/engines/titanic/support/video_surface.cpp
index 7021eac1b7..bcaaad4492 100644
--- a/engines/titanic/support/video_surface.cpp
+++ b/engines/titanic/support/video_surface.cpp
@@ -200,10 +200,6 @@ void CVideoSurface::transBlitRect(const Rect &srcRect, const Rect &destRect, CVi
src->_transparencyMode == TRANS_ALPHA255;
CTransparencySurface transSurface(src->getTransparencySurface(), src->_transparencyMode);
- if (flipFlag)
- transSurface.setRow(srcRect.top);
- else
- transSurface.setRow(src->getHeight() - srcRect.bottom);
for (int yCtr = 0; yCtr < srcRect.height(); ++yCtr) {
// Prepare for copying the line
@@ -225,8 +221,9 @@ void CVideoSurface::transBlitRect(const Rect &srcRect, const Rect &destRect, CVi
}
// Move to next line
- srcPtr = flipFlag ? srcPtr + getWidth() : srcPtr - getWidth();
- destPtr -= destArea.w;
+ srcPtr = flipFlag ? srcPtr + (src->getPitch() / 2) :
+ srcPtr - (src->getPitch() / 2);
+ destPtr -= destArea.pitch / 2;
}
src->unlock();