[Scummvm-cvs-logs] scummvm master -> a0e3b97bc0b2f2192df42a04c0d6d743763c8da9

clone2727 clone2727 at gmail.com
Sun Apr 13 15:28:11 CEST 2014


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
fb658c3969 PEGASUS: Fix showing save failed dialog when not using the GMM
a0e3b97bc0 PEGASUS: Disable non-existent hint movie


Commit: fb658c396980ec6e4d303cd50da06754c653d0c9
    https://github.com/scummvm/scummvm/commit/fb658c396980ec6e4d303cd50da06754c653d0c9
Author: Matthew Hoops (clone2727 at gmail.com)
Date: 2014-04-13T09:27:13-04:00

Commit Message:
PEGASUS: Fix showing save failed dialog when not using the GMM

Changed paths:
    engines/pegasus/pegasus.cpp
    engines/pegasus/pegasus.h



diff --git a/engines/pegasus/pegasus.cpp b/engines/pegasus/pegasus.cpp
index c5edd34..978cb24 100644
--- a/engines/pegasus/pegasus.cpp
+++ b/engines/pegasus/pegasus.cpp
@@ -36,6 +36,7 @@
 #include "backends/keymapper/keymapper.h"
 #include "base/plugins.h"
 #include "base/version.h"
+#include "gui/message.h"
 #include "gui/saveload.h"
 #include "video/theora_decoder.h"
 #include "video/qt_decoder.h"
@@ -379,20 +380,21 @@ Common::Error PegasusEngine::showSaveDialog() {
 
 	int slot = slc.runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName());
 
-	Common::Error result;
+	if (slot >= 0)
+		return saveGameState(slot, slc.getResultString());
 
-	if (slot >= 0) {
-		if (saveGameState(slot, slc.getResultString()).getCode() == Common::kNoError)
-			result = Common::kNoError;
-		else
-			result = Common::kUnknownError;
-	} else {
-		result = Common::kUserCanceled;
-	}
+	return Common::kUserCanceled;
+}
 
-	return result;
+void PegasusEngine::showSaveFailedDialog(const Common::Error &status) {
+	Common::String failMessage = Common::String::format(_("Gamestate save failed (%s)! "
+			"Please consult the README for basic information, and for "
+			"instructions on how to obtain further assistance."), status.getDesc().c_str());
+	GUI::MessageDialog dialog(failMessage);
+	dialog.runModal();
 }
 
+
 GUI::Debugger *PegasusEngine::getDebugger() {
 	return _console;
 }
@@ -969,8 +971,14 @@ void PegasusEngine::doGameMenuCommand(const GameMenuCommand command) {
 		resetIntroTimer();
 		break;
 	case kMenuCmdPauseSave:
-		if (showSaveDialog().getCode() != Common::kUserCanceled)
+		result = showSaveDialog();			
+
+		if (result.getCode() != Common::kUserCanceled) {
+			if (result.getCode() != Common::kNoError)
+				showSaveFailedDialog(result);
+
 			pauseMenu(false);
+		}
 		break;
 	case kMenuCmdPauseContinue:
 		pauseMenu(false);
@@ -1021,7 +1029,12 @@ void PegasusEngine::handleInput(const Input &input, const Hotspot *cursorSpot) {
 		// Can only save during a game and not in the demo
 		if (g_neighborhood && !isDemo()) {
 			pauseEngine(true);
-			showSaveDialog();
+
+			Common::Error result = showSaveDialog();
+
+			if (result.getCode() != Common::kNoError && result.getCode() != Common::kUserCanceled)
+				showSaveFailedDialog(result);
+
 			pauseEngine(false);
 		}
 	}
diff --git a/engines/pegasus/pegasus.h b/engines/pegasus/pegasus.h
index fb66eb7..d88545a 100644
--- a/engines/pegasus/pegasus.h
+++ b/engines/pegasus/pegasus.h
@@ -257,6 +257,7 @@ private:
 	bool _saveAllowed, _loadAllowed; // It's so nice that this was in the original code already :P
 	Common::Error showLoadDialog();
 	Common::Error showSaveDialog();
+	void showSaveFailedDialog(const Common::Error &status);
 	bool _saveRequested, _loadRequested;
 
 	// Misc.


Commit: a0e3b97bc0b2f2192df42a04c0d6d743763c8da9
    https://github.com/scummvm/scummvm/commit/a0e3b97bc0b2f2192df42a04c0d6d743763c8da9
Author: Matthew Hoops (clone2727 at gmail.com)
Date: 2014-04-13T09:27:13-04:00

Commit Message:
PEGASUS: Disable non-existent hint movie

Changed paths:
    engines/pegasus/neighborhood/caldoria/caldoria.cpp



diff --git a/engines/pegasus/neighborhood/caldoria/caldoria.cpp b/engines/pegasus/neighborhood/caldoria/caldoria.cpp
index 0707a83..7977c17 100644
--- a/engines/pegasus/neighborhood/caldoria/caldoria.cpp
+++ b/engines/pegasus/neighborhood/caldoria/caldoria.cpp
@@ -1916,10 +1916,13 @@ uint Caldoria::getNumHints() {
 					numHints = 1;
 			}
 			break;
+#if 0
+		// The hint file is missing
 		case MakeRoomView(kCaldoria49, kEast):
 		case MakeRoomView(kCaldoria54, kEast):
 			numHints = 1;
 			break;
+#endif
 		case MakeRoomView(kCaldoria49, kNorth):
 			numHints = 1;
 			break;
@@ -1950,9 +1953,12 @@ Common::String Caldoria::getHintMovie(uint hintNum) {
 			}
 
 			return "Images/AI/Globals/XGLOB1A";
+#if 0
+		// The hint file is missing
 		case MakeRoomView(kCaldoria49, kEast):
 		case MakeRoomView(kCaldoria54, kEast):
 			return "Images/AI/Caldoria/X49E";
+#endif
 		case MakeRoomView(kCaldoria49, kNorth):
 			return "Images/AI/Caldoria/X49NB2";
 		}






More information about the Scummvm-git-logs mailing list