[Scummvm-cvs-logs] CVS: scummvm/scumm script.cpp,1.150,1.151 script_v8.cpp,2.230,2.231 scummvm.cpp,2.579,2.580 string.cpp,1.194,1.195

Travis Howell kirben at users.sourceforge.net
Fri Feb 20 18:16:01 CET 2004


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3099/scumm

Modified Files:
	script.cpp script_v8.cpp scummvm.cpp string.cpp 
Log Message:

Use correct method for subtitle speed.


Index: script.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script.cpp,v
retrieving revision 1.150
retrieving revision 1.151
diff -u -d -r1.150 -r1.151
--- script.cpp	16 Feb 2004 03:53:03 -0000	1.150
+++ script.cpp	21 Feb 2004 02:03:53 -0000	1.151
@@ -543,9 +543,11 @@
 		checkRange(_numVariables - 1, 0, var, "Variable %d out of range(w)");
 
 		// FIXME: Find some better place to put this.
-		if (var == VAR_CHARINC)
-			VAR(VAR_CHARINC) = _defaultTalkDelay / 20;
-		else
+		if (var == VAR_CHARINC && ConfMan.hasKey("talkspeed")) {
+			int talkspeed = ConfMan.getInt("talkspeed") / 20;
+			if (talkspeed >= 0 && talkspeed <= 180)
+				VAR(VAR_CHARINC) = talkspeed;
+		} else
 			_scummVars[var] = value;
 
 		// stay in sync with loom cd subtitle var

Index: script_v8.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v8.cpp,v
retrieving revision 2.230
retrieving revision 2.231
diff -u -d -r2.230 -r2.231
--- script_v8.cpp	20 Feb 2004 17:12:08 -0000	2.230
+++ script_v8.cpp	21 Feb 2004 02:03:53 -0000	2.231
@@ -422,8 +422,10 @@
 	if (!(var & 0xF0000000)) {
 		checkRange(_numVariables - 1, 0, var, "Variable %d out of range(w)");
 
-		if (var == VAR_CHARINC) {
-			VAR(VAR_CHARINC) = _defaultTalkDelay / 20;
+		if (var == VAR_CHARINC && ConfMan.hasKey("talkspeed")) {
+			int talkspeed = ConfMan.getInt("talkspeed") / 20;
+			if (talkspeed >= 0 && talkspeed <= 180)
+				VAR(VAR_CHARINC) = talkspeed;
 		} else
 			_scummVars[var] = value;
 

Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scummvm.cpp,v
retrieving revision 2.579
retrieving revision 2.580
diff -u -d -r2.579 -r2.580
--- scummvm.cpp	20 Feb 2004 15:04:51 -0000	2.579
+++ scummvm.cpp	21 Feb 2004 02:03:53 -0000	2.580
@@ -642,7 +642,6 @@
 			ConfMan.set("subtitles", !ConfMan.getBool("nosubtitles"));
 	}
 	_confirmExit = ConfMan.getBool("confirm_exit");
-	_defaultTalkDelay = ConfMan.getInt("talkspeed");
 	_native_mt32 = ConfMan.getBool("native_mt32");
 	// TODO: We shouldn't rely on the global Language values matching those COMI etc. expect.
 	// Rather we should explicitly translate them.
@@ -1200,6 +1199,7 @@
 		VAR(VAR_CURRENT_LIGHTS) = LIGHTMODE_actor_base | LIGHTMODE_actor_color | LIGHTMODE_screen;
 	}
 	
+	_defaultTalkDelay = 60;
 	VAR(VAR_CHARINC) = 4;
 	talkingActor(0);
 }
@@ -1884,17 +1884,11 @@
 		if (_imuse)
 			_imuse->set_music_volume (vol);
 	} else if (_lastKeyHit == '-') { // - text speed down
-		_defaultTalkDelay += 5;
-		if (_defaultTalkDelay > 90)
-			_defaultTalkDelay = 90;
-
-		VAR(VAR_CHARINC) = _defaultTalkDelay / 20;
+		if (VAR(VAR_CHARINC) < 9)
+			VAR(VAR_CHARINC) = + 1;
 	} else if (_lastKeyHit == '+') { // + text speed up
-		_defaultTalkDelay -= 5;
-		if (_defaultTalkDelay < 5)
-			_defaultTalkDelay = 5;
-
-		VAR(VAR_CHARINC) = _defaultTalkDelay / 20;
+		if (VAR(VAR_CHARINC) > 0)
+			VAR(VAR_CHARINC) -= 1;
 	} else if (_lastKeyHit == '~' || _lastKeyHit == '#') { // Debug console
 		_debugger->attach();
 	} else if (_version <= 2) {

Index: string.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/string.cpp,v
retrieving revision 1.194
retrieving revision 1.195
diff -u -d -r1.194 -r1.195
--- string.cpp	18 Feb 2004 11:46:07 -0000	1.194
+++ string.cpp	21 Feb 2004 02:03:53 -0000	1.195
@@ -177,15 +177,6 @@
 		_useTalkAnims = true;
 	}
 
-	// HACK: Most of the audio sync in Loom is handled by the "MI1
-	// timer", but some of it depends on text strings timing out at
-	// the right moment.
-
-	if (_gameId == GID_LOOM256) {
-		_defaultTalkDelay = 100;
-		VAR(VAR_CHARINC) = 5;
-	}
-
 	_talkDelay = _defaultTalkDelay;
 
 	if (!_keepText) {





More information about the Scummvm-git-logs mailing list