aboutsummaryrefslogtreecommitdiff
path: root/engines/sherlock
diff options
context:
space:
mode:
authorPaul Gilbert2019-02-25 21:27:30 -0800
committerPaul Gilbert2019-02-25 21:27:30 -0800
commiteae00fe6f9f0eb565f2c38447d705945db0e6ba6 (patch)
treedc13f8d728853e2a29f13f9759dc05d9a0d6764a /engines/sherlock
parent09d34607808cbe22c7e8cd83d6781e442315c397 (diff)
downloadscummvm-rg350-eae00fe6f9f0eb565f2c38447d705945db0e6ba6.tar.gz
scummvm-rg350-eae00fe6f9f0eb565f2c38447d705945db0e6ba6.tar.bz2
scummvm-rg350-eae00fe6f9f0eb565f2c38447d705945db0e6ba6.zip
SHERLOCK: 3DO: Fix transparency for characters, and speech dialogs
Diffstat (limited to 'engines/sherlock')
-rw-r--r--engines/sherlock/scalpel/scalpel_user_interface.cpp2
-rw-r--r--engines/sherlock/surface.cpp7
-rw-r--r--engines/sherlock/surface.h2
3 files changed, 9 insertions, 2 deletions
diff --git a/engines/sherlock/scalpel/scalpel_user_interface.cpp b/engines/sherlock/scalpel/scalpel_user_interface.cpp
index 8dae24ecd4..8f0ebbf1b5 100644
--- a/engines/sherlock/scalpel/scalpel_user_interface.cpp
+++ b/engines/sherlock/scalpel/scalpel_user_interface.cpp
@@ -2105,7 +2105,7 @@ void ScalpelUserInterface::summonWindow(bool slideUp, int height) {
Screen &screen = *_vm->_screen;
// Extract the window that's been drawn on the back buffer
- Surface tempSurface(SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCREEN_HEIGHT - height);
+ Surface tempSurface(SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCREEN_HEIGHT - height, screen._backBuffer1.format);
Common::Rect r(0, height, SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCREEN_HEIGHT);
tempSurface.SHblitFrom(screen._backBuffer1, Common::Point(0, 0), r);
diff --git a/engines/sherlock/surface.cpp b/engines/sherlock/surface.cpp
index cca012630c..a5fbca5bd8 100644
--- a/engines/sherlock/surface.cpp
+++ b/engines/sherlock/surface.cpp
@@ -22,6 +22,7 @@
#include "sherlock/surface.h"
#include "sherlock/fonts.h"
+#include "sherlock/sherlock.h"
namespace Sherlock {
@@ -34,6 +35,10 @@ BaseSurface::BaseSurface(int width_, int height_) : Graphics::Screen(width_, hei
create(width_, height_);
}
+BaseSurface::BaseSurface(int width_, int height_, const Graphics::PixelFormat &pf) :
+ Graphics::Screen(width_, height_, pf), Fonts() {
+}
+
void BaseSurface::writeString(const Common::String &str, const Common::Point &pt, uint overrideColor) {
Fonts::writeString(this, str, pt, overrideColor);
}
@@ -62,7 +67,7 @@ void BaseSurface::SHtransBlitFrom(const Graphics::Surface &src, const Common::Po
Common::Rect destRect(pt.x, pt.y, pt.x + src.w * SCALE_THRESHOLD / scaleVal,
pt.y + src.h * SCALE_THRESHOLD / scaleVal);
- Graphics::Screen::transBlitFrom(src, srcRect, destRect, TRANSPARENCY,
+ Graphics::Screen::transBlitFrom(src, srcRect, destRect, IS_3DO ? 0 : TRANSPARENCY,
flipped, overrideColor);
}
diff --git a/engines/sherlock/surface.h b/engines/sherlock/surface.h
index 7514c89122..6e2904e657 100644
--- a/engines/sherlock/surface.h
+++ b/engines/sherlock/surface.h
@@ -50,6 +50,7 @@ public:
* Constructor
*/
BaseSurface(int width, int height);
+ BaseSurface(int width_, int height_, const Graphics::PixelFormat &pf);
/**
* Draws a surface on this surface
@@ -122,6 +123,7 @@ protected:
public:
Surface() : BaseSurface() {}
Surface(int width_, int height_) : BaseSurface(width_, height_) {}
+ Surface(int width_, int height_, const Graphics::PixelFormat &pf) : BaseSurface(width_, height_, pf) {}
};
} // End of namespace Sherlock