diff options
author | Martin Kiewitz | 2015-06-12 13:53:44 +0200 |
---|---|---|
committer | Martin Kiewitz | 2015-06-12 13:53:44 +0200 |
commit | 316cd55bb22a8cbcef866ea30d01cf7dae440cb6 (patch) | |
tree | cbfd7beb90ca31181c16dbc31eb7e27ba08162dd | |
parent | b668b1edd724b8c281edacb68665cd037c5d9bd2 (diff) | |
download | scummvm-rg350-316cd55bb22a8cbcef866ea30d01cf7dae440cb6.tar.gz scummvm-rg350-316cd55bb22a8cbcef866ea30d01cf7dae440cb6.tar.bz2 scummvm-rg350-316cd55bb22a8cbcef866ea30d01cf7dae440cb6.zip |
SHERLOCK: 3DO: room fade in, font ignore UI ignore
-rw-r--r-- | engines/sherlock/fonts.cpp | 9 | ||||
-rw-r--r-- | engines/sherlock/scalpel/scalpel_user_interface.cpp | 3 | ||||
-rw-r--r-- | engines/sherlock/scene.cpp | 14 |
3 files changed, 23 insertions, 3 deletions
diff --git a/engines/sherlock/fonts.cpp b/engines/sherlock/fonts.cpp index 5dfb10a06e..31c44dd4bf 100644 --- a/engines/sherlock/fonts.cpp +++ b/engines/sherlock/fonts.cpp @@ -64,6 +64,9 @@ void Fonts::writeString(Surface *surface, const Common::String &str, const Common::Point &pt, int overrideColor) { Common::Point charPos = pt; + if (!_font) + return; + for (const char *c = str.c_str(); *c; ++c) { if (*c == ' ') charPos.x += 5; @@ -79,6 +82,9 @@ void Fonts::writeString(Surface *surface, const Common::String &str, int Fonts::stringWidth(const Common::String &str) { int width = 0; + if (!_font) + return 0; + for (const char *c = str.c_str(); *c; ++c) width += charWidth(*c); @@ -88,6 +94,9 @@ int Fonts::stringWidth(const Common::String &str) { int Fonts::stringHeight(const Common::String &str) { int height = 0; + if (!_font) + return 0; + for (const char *c = str.c_str(); *c; ++c) height = MAX(height, charHeight(*c)); diff --git a/engines/sherlock/scalpel/scalpel_user_interface.cpp b/engines/sherlock/scalpel/scalpel_user_interface.cpp index 1b54d607a6..acb648c3ad 100644 --- a/engines/sherlock/scalpel/scalpel_user_interface.cpp +++ b/engines/sherlock/scalpel/scalpel_user_interface.cpp @@ -390,6 +390,9 @@ void ScalpelUserInterface::depressButton(int num) { Screen &screen = *_vm->_screen; Common::Point pt(MENU_POINTS[num][0], MENU_POINTS[num][1]); + if (_vm->getPlatform() == Common::kPlatform3DO) + return; // don't do anything for 3DO atm + ImageFrame &frame = (*_controls)[num]; screen._backBuffer1.transBlitFrom(frame, pt); screen.slamArea(pt.x, pt.y, pt.x + frame._width, pt.y + frame._height); diff --git a/engines/sherlock/scene.cpp b/engines/sherlock/scene.cpp index 609fd17a56..7229338f5f 100644 --- a/engines/sherlock/scene.cpp +++ b/engines/sherlock/scene.cpp @@ -1052,10 +1052,18 @@ void Scene::transitionToScene() { updateBackground(); // Actually do the transition - if (screen._fadeStyle) - screen.randomTransition(); - else + if (screen._fadeStyle) { + if (_vm->getPlatform() != Common::kPlatform3DO) { + // do pixel-transition for PC + screen.randomTransition(); + } else { + // fade in for 3DO + screen.clear(); + screen.fadeIntoScreen3DO(2); + } + } else { screen.blitFrom(screen._backBuffer1); + } screen.update(); // Start any initial animation for the scene |