aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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();