[Scummvm-git-logs] scummvm master -> 41d1e0a415c7c5647f2f05e7025c68cbf84a8b91
dreammaster
dreammaster at scummvm.org
Sat Oct 22 02:01:23 CEST 2016
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
41d1e0a415 SHERLOCK: 3DO: Fixes to allow game to start
Commit: 41d1e0a415c7c5647f2f05e7025c68cbf84a8b91
https://github.com/scummvm/scummvm/commit/41d1e0a415c7c5647f2f05e7025c68cbf84a8b91
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2016-10-21T20:01:14-04:00
Commit Message:
SHERLOCK: 3DO: Fixes to allow game to start
Changed paths:
engines/sherlock/scalpel/3do/scalpel_3do_screen.cpp
engines/sherlock/scalpel/3do/scalpel_3do_screen.h
engines/sherlock/scalpel/scalpel_screen.cpp
engines/sherlock/screen.cpp
engines/sherlock/surface.h
diff --git a/engines/sherlock/scalpel/3do/scalpel_3do_screen.cpp b/engines/sherlock/scalpel/3do/scalpel_3do_screen.cpp
index f8112d8..163f10d 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 7167480..dc27c10 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 15e8436..1b564ec 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 423be44..fdc6a02 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 d55606e..7514c89 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);
/**
More information about the Scummvm-git-logs
mailing list