[Scummvm-cvs-logs] scummvm master -> 410367ced003c53c2df5ebc7b2eee7b63c7f453b

dreammaster dreammaster at scummvm.org
Sat Apr 30 06:59:42 CEST 2011


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:
410367ced0 TSAGE: Reintroduced the show introduction code using a ConfMan flag


Commit: 410367ced003c53c2df5ebc7b2eee7b63c7f453b
    https://github.com/scummvm/scummvm/commit/410367ced003c53c2df5ebc7b2eee7b63c7f453b
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2011-04-29T21:58:11-07:00

Commit Message:
TSAGE: Reintroduced the show introduction code using a ConfMan flag

Changed paths:
    engines/tsage/ringworld_scenes2.cpp



diff --git a/engines/tsage/ringworld_scenes2.cpp b/engines/tsage/ringworld_scenes2.cpp
index 3e3686e..8d7121e 100644
--- a/engines/tsage/ringworld_scenes2.cpp
+++ b/engines/tsage/ringworld_scenes2.cpp
@@ -23,6 +23,7 @@
  *
  */
 
+#include "common/config-manager.h"
 #include "tsage/ringworld_scenes2.h"
 #include "tsage/scenes.h"
 #include "tsage/tsage.h"
@@ -112,20 +113,22 @@ void Scene1000::Action3::signal() {
 		setDelay(240);
 		break;
 	case 5: {
-		// 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
-		_globals->_player.enableControl();
-
-		if (MessageDialog::show2(WATCH_INTRO_MSG, START_PLAY_BTN_STRING, INTRODUCTION_BTN_STRING) == 0) {
-			_actionIndex = 20;
-			_globals->_soundHandler.proc1(this);
-		} else {
+		const char *SEEN_INTRO = "seen_intro";
+		if (!ConfMan.hasKey(SEEN_INTRO) || !ConfMan.getBool(SEEN_INTRO)) {
+			// First time being played, so show the introduction
+			ConfMan.setBool(SEEN_INTRO, true);
+			ConfMan.flushToDisk();
 			setDelay(1);
+		} else {
+			// Prompt user for whether to start play or watch introduction
+			_globals->_player.enableControl();
+
+			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();






More information about the Scummvm-git-logs mailing list