[Scummvm-cvs-logs] scummvm master -> 5985320c5e61a1abdbf1d097e0f1c6df6b5eff99

dreammaster dreammaster at scummvm.org
Tue Apr 19 13:44:14 CEST 2011


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:
b7c9bf4b33 TSAGE: Simplified the new Saver::getObjectCount method
5985320c5e TSAGE: Removed original game that uses 'Intro.txt' to indicate whether the introduction has played


Commit: b7c9bf4b3306cd8006bc312bbb06ee9d491fa265
    https://github.com/scummvm/scummvm/commit/b7c9bf4b3306cd8006bc312bbb06ee9d491fa265
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2011-04-19T04:33:56-07:00

Commit Message:
TSAGE: Simplified the new Saver::getObjectCount method

Changed paths:
    engines/tsage/saveload.cpp



diff --git a/engines/tsage/saveload.cpp b/engines/tsage/saveload.cpp
index 73c9d02..d9ae5a1 100644
--- a/engines/tsage/saveload.cpp
+++ b/engines/tsage/saveload.cpp
@@ -350,12 +350,7 @@ int Saver::blockIndexOf(SavedObject *p) {
  * Returns the number of objects in the object list registry
  */
 int Saver::getObjectCount() const {
-	int count = 0;
-	Common::List<SavedObject *>::const_iterator i;
-
-	for (i = _objList.begin(); i != _objList.end(); ++i, ++count)
-		;
-	return count;
+	return _objList.size();
 }
 
 /**


Commit: 5985320c5e61a1abdbf1d097e0f1c6df6b5eff99
    https://github.com/scummvm/scummvm/commit/5985320c5e61a1abdbf1d097e0f1c6df6b5eff99
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2011-04-19T04:42:43-07:00

Commit Message:
TSAGE: Removed original game that uses 'Intro.txt' to indicate whether the introduction has played

Changed paths:
    engines/tsage/ringworld_scenes2.cpp



diff --git a/engines/tsage/ringworld_scenes2.cpp b/engines/tsage/ringworld_scenes2.cpp
index 9d941d3..3e3686e 100644
--- a/engines/tsage/ringworld_scenes2.cpp
+++ b/engines/tsage/ringworld_scenes2.cpp
@@ -112,28 +112,23 @@ void Scene1000::Action3::signal() {
 		setDelay(240);
 		break;
 	case 5: {
-		// Intro.txt file presence is used to allow user option to skip the introduction
-		_globals->_player.enableControl();
-		Common::InSaveFile *in = g_system->getSavefileManager()->openForLoading("Intro.txt");
-		if (!in) {
-			// File not present, so create it
-			Common::OutSaveFile *out = g_system->getSavefileManager()->openForSaving("Intro.txt");
-			out->finalize();
-			delete out;
-			setDelay(1);
-		} else {
-			delete in;
+		// WORKAROUND: At this point, the original used the presence of a file called 'Intro.txt'
+		// to determine whether the introduction has been played the first time the game was started.
+		// In ScummVM, we don't like creating any files that aren't explicitly savegames, so the
+		// game startup will always show the Start Play / Introduction buttons, even when the game
+		// is played for the first time
 
-			// Prompt user for whether to start play or watch introduction
-			if (MessageDialog::show2(WATCH_INTRO_MSG, START_PLAY_BTN_STRING, INTRODUCTION_BTN_STRING) == 0) {
-				_actionIndex = 20;
-				_globals->_soundHandler.proc1(this);
-			} else {
-				setDelay(1);
-			}
+		// Prompt user for whether to start play or watch introduction
+		_globals->_player.enableControl();
 
-			_globals->_player.disableControl();
+		if (MessageDialog::show2(WATCH_INTRO_MSG, START_PLAY_BTN_STRING, INTRODUCTION_BTN_STRING) == 0) {
+			_actionIndex = 20;
+			_globals->_soundHandler.proc1(this);
+		} else {
+			setDelay(1);
 		}
+
+		_globals->_player.disableControl();
 		break;
 	}
 	case 6: {






More information about the Scummvm-git-logs mailing list