aboutsummaryrefslogtreecommitdiff
path: root/engines/sherlock
diff options
context:
space:
mode:
authorPaul Gilbert2016-10-21 20:01:14 -0400
committerPaul Gilbert2016-10-21 20:01:14 -0400
commit41d1e0a415c7c5647f2f05e7025c68cbf84a8b91 (patch)
tree17e010f186aff336bd0caaf0960ad78dd516766d /engines/sherlock
parentbbd5b89c13d67811506d70fe55f7007ca63c7213 (diff)
downloadscummvm-rg350-41d1e0a415c7c5647f2f05e7025c68cbf84a8b91.tar.gz
scummvm-rg350-41d1e0a415c7c5647f2f05e7025c68cbf84a8b91.tar.bz2
scummvm-rg350-41d1e0a415c7c5647f2f05e7025c68cbf84a8b91.zip
SHERLOCK: 3DO: Fixes to allow game to start
Diffstat (limited to 'engines/sherlock')
-rw-r--r--engines/sherlock/scalpel/3do/scalpel_3do_screen.cpp23
-rw-r--r--engines/sherlock/scalpel/3do/scalpel_3do_screen.h35
-rw-r--r--engines/sherlock/scalpel/scalpel_screen.cpp4
-rw-r--r--engines/sherlock/screen.cpp2
-rw-r--r--engines/sherlock/surface.h4
5 files changed, 55 insertions, 13 deletions
diff --git a/engines/sherlock/scalpel/3do/scalpel_3do_screen.cpp b/engines/sherlock/scalpel/3do/scalpel_3do_screen.cpp
index f8112d8add..163f10d091 100644
--- a/engines/sherlock/scalpel/3do/scalpel_3do_screen.cpp
+++ b/engines/sherlock/scalpel/3do/scalpel_3do_screen.cpp
@@ -31,6 +31,14 @@ namespace Scalpel {
Scalpel3DOScreen::Scalpel3DOScreen(SherlockEngine *vm): ScalpelScreen(vm) {
}
+void Scalpel3DOScreen::SHblitFrom(const Graphics::Surface &src) {
+ SHblitFrom(src, Common::Point(0, 0));
+}
+
+void Scalpel3DOScreen::SHblitFrom(const Graphics::Surface &src, const Common::Point &destPos) {
+ SHblitFrom(src, Common::Point(0, 0), Common::Rect(0, 0, src.w, src.h));
+}
+
void Scalpel3DOScreen::SHblitFrom(const Graphics::Surface &src, const Common::Point &pt, const Common::Rect &srcBounds) {
if (!_vm->_isScreenDoubled) {
ScalpelScreen::SHblitFrom(src, pt, srcBounds);
@@ -107,13 +115,26 @@ void Scalpel3DOScreen::transBlitFromUnscaled(const Graphics::Surface &src, const
#endif
}
-void Scalpel3DOScreen::fillRect(const Common::Rect &r, uint color) {
+void Scalpel3DOScreen::SHfillRect(const Common::Rect &r, uint color) {
if (_vm->_isScreenDoubled)
ScalpelScreen::fillRect(Common::Rect(r.left * 2, r.top * 2, r.right * 2, r.bottom * 2), color);
else
ScalpelScreen::fillRect(r, color);
}
+void Scalpel3DOScreen::SHtransBlitFrom(const ImageFrame &src, const Common::Point &pt,
+ bool flipped, int overrideColor, int scaleVal) {
+ ScalpelScreen::SHtransBlitFrom(src, pt, flipped, overrideColor,
+ _vm->_isScreenDoubled ? scaleVal / 2 : scaleVal);
+}
+
+void Scalpel3DOScreen::SHtransBlitFrom(const Graphics::Surface &src, const Common::Point &pt,
+ bool flipped, int overrideColor, int scaleVal) {
+ ScalpelScreen::SHtransBlitFrom(src, pt, flipped, overrideColor,
+ _vm->_isScreenDoubled ? scaleVal / 2 : scaleVal);
+}
+
+
void Scalpel3DOScreen::fadeIntoScreen3DO(int speed) {
Events &events = *_vm->_events;
uint16 *currentScreenBasePtr = (uint16 *)getPixels();
diff --git a/engines/sherlock/scalpel/3do/scalpel_3do_screen.h b/engines/sherlock/scalpel/3do/scalpel_3do_screen.h
index 71674803ba..dc27c10908 100644
--- a/engines/sherlock/scalpel/3do/scalpel_3do_screen.h
+++ b/engines/sherlock/scalpel/3do/scalpel_3do_screen.h
@@ -34,12 +34,6 @@ namespace Scalpel {
class Scalpel3DOScreen : public ScalpelScreen {
protected:
/**
- * Draws a sub-section of a surface at a given position within this surface
- * Overriden for the 3DO to automatically double the size of everything to the underlying 640x400 surface
- */
- virtual void SHblitFrom(const Graphics::Surface &src, const Common::Point &pt, const Common::Rect &srcBounds);
-
- /**
* Draws a surface at a given position within this surface with transparency
*/
virtual void transBlitFromUnscaled(const Graphics::Surface &src, const Common::Point &pt, bool flipped,
@@ -61,9 +55,36 @@ public:
void blitFrom3DOcolorLimit(uint16 color);
/**
+ * Draws a surface on this surface
+ */
+ virtual void SHblitFrom(const Graphics::Surface &src);
+
+ /**
+ * Draws a surface at a given position within this surface
+ */
+ virtual void SHblitFrom(const Graphics::Surface &src, const Common::Point &destPos);
+
+ /**
+ * Draws a sub-section of a surface at a given position within this surface
+ */
+ virtual void SHblitFrom(const Graphics::Surface &src, const Common::Point &destPos, const Common::Rect &srcBounds);
+
+ /**
+ * Draws an image frame at a given position within this surface with transparency
+ */
+ virtual void SHtransBlitFrom(const ImageFrame &src, const Common::Point &pt,
+ bool flipped = false, int overrideColor = 0, int scaleVal = SCALE_THRESHOLD);
+
+ /**
+ * Draws an image frame at a given position within this surface with transparency
+ */
+ virtual void SHtransBlitFrom(const Graphics::Surface &src, const Common::Point &pt,
+ bool flipped = false, int overrideColor = 0, int scaleVal = SCALE_THRESHOLD);
+
+ /**
* Fill a given area of the surface with a given color
*/
- virtual void fillRect(const Common::Rect &r, uint color);
+ virtual void SHfillRect(const Common::Rect &r, uint color);
virtual uint16 width() const;
virtual uint16 height() const;
diff --git a/engines/sherlock/scalpel/scalpel_screen.cpp b/engines/sherlock/scalpel/scalpel_screen.cpp
index 15e8436be6..1b564ec611 100644
--- a/engines/sherlock/scalpel/scalpel_screen.cpp
+++ b/engines/sherlock/scalpel/scalpel_screen.cpp
@@ -28,8 +28,8 @@ namespace Sherlock {
namespace Scalpel {
ScalpelScreen::ScalpelScreen(SherlockEngine *vm) : Screen(vm) {
- _backBuffer1.create(320, 200);
- _backBuffer2.create(320, 200);
+ _backBuffer1.create(320, 200, g_system->getScreenFormat());
+ _backBuffer2.create(320, 200, g_system->getScreenFormat());
activateBackBuffer1();
}
diff --git a/engines/sherlock/screen.cpp b/engines/sherlock/screen.cpp
index 423be448fe..fdc6a02b47 100644
--- a/engines/sherlock/screen.cpp
+++ b/engines/sherlock/screen.cpp
@@ -57,7 +57,7 @@ Screen::Screen(SherlockEngine *vm) : BaseSurface(), _vm(vm),
_oldFadePercent = 0;
_flushScreen = false;
- create(_backBuffer1.w, _backBuffer1.h);
+ create(g_system->getWidth(), g_system->getHeight(), g_system->getScreenFormat());
_backBuffer.create(_backBuffer1, _backBuffer1.getBounds());
}
diff --git a/engines/sherlock/surface.h b/engines/sherlock/surface.h
index d55606ed82..7514c89122 100644
--- a/engines/sherlock/surface.h
+++ b/engines/sherlock/surface.h
@@ -75,13 +75,13 @@ public:
/**
* Draws an image frame at a given position within this surface with transparency
*/
- void SHtransBlitFrom(const ImageFrame &src, const Common::Point &pt,
+ virtual void SHtransBlitFrom(const ImageFrame &src, const Common::Point &pt,
bool flipped = false, int overrideColor = 0, int scaleVal = SCALE_THRESHOLD);
/**
* Draws an image frame at a given position within this surface with transparency
*/
- void SHtransBlitFrom(const Graphics::Surface &src, const Common::Point &pt,
+ virtual void SHtransBlitFrom(const Graphics::Surface &src, const Common::Point &pt,
bool flipped = false, int overrideColor = 0, int scaleVal = SCALE_THRESHOLD);
/**