[Scummvm-cvs-logs] scummvm master -> 316cd55bb22a8cbcef866ea30d01cf7dae440cb6

m-kiewitz m_kiewitz at users.sourceforge.net
Fri Jun 12 13:53:16 CEST 2015


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:
316cd55bb2 SHERLOCK: 3DO: room fade in, font ignore UI ignore


Commit: 316cd55bb22a8cbcef866ea30d01cf7dae440cb6
    https://github.com/scummvm/scummvm/commit/316cd55bb22a8cbcef866ea30d01cf7dae440cb6
Author: Martin Kiewitz (m_kiewitz at users.sourceforge.net)
Date: 2015-06-12T13:53:44+02:00

Commit Message:
SHERLOCK: 3DO: room fade in, font ignore UI ignore

Changed paths:
    engines/sherlock/fonts.cpp
    engines/sherlock/scalpel/scalpel_user_interface.cpp
    engines/sherlock/scene.cpp



diff --git a/engines/sherlock/fonts.cpp b/engines/sherlock/fonts.cpp
index 5dfb10a..31c44dd 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 1b54d60..acb648c 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 609fd17..7229338 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






More information about the Scummvm-git-logs mailing list