[Scummvm-cvs-logs] CVS: scummvm gameDetector.cpp,1.57,1.58 gameDetector.h,1.12,1.13 readme.txt,1.46,1.47 script.cpp,1.54,1.55 scummvm.cpp,1.138,1.139 string.cpp,1.39,1.40

James Brown ender at users.sourceforge.net
Sun May 5 13:09:10 CEST 2002


Update of /cvsroot/scummvm/scummvm
In directory usw-pr-cvs1:/tmp/cvs-serv7224

Modified Files:
	gameDetector.cpp gameDetector.h readme.txt script.cpp 
	scummvm.cpp string.cpp 
Log Message:
Add text speed option (-y for Yak :)


Index: gameDetector.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gameDetector.cpp,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -d -r1.57 -r1.58
--- gameDetector.cpp	5 May 2002 20:04:22 -0000	1.57
+++ gameDetector.cpp	5 May 2002 20:08:40 -0000	1.58
@@ -47,6 +47,7 @@
 	"\t-c<num>    - use cdrom <num> for cd audio\n"
 	"\t-d[<num>]  - enable debug output (debug level [1])\n"
 	"\t-n         - no subtitles for speech\n"
+	"\t-y         - set text speed (default: 60)\n"
 	"\t-b<num>    - start in room <num>\n"
 	"\t-t<num>    - set music tempo (default- adlib: 0x1F0000, midi: 0x460000)\n"
 	"\t-p<path>   - look for game in <path>\n"
@@ -230,6 +231,11 @@
 				if (option != NULL)
 					scummcfg->change_filename(option);
 				break;
+			case 'y':
+				HANDLE_OPTION();
+				_talkSpeed = atoi(option);				
+				scummcfg->set("talkspeed", _talkSpeed);
+				break;
 			default:
 				goto ShowHelpAndExit;
 			}
@@ -450,6 +456,8 @@
 
 	_noSubtitles = 0;							// use by default - should this depend on soundtrack?
 
+	_talkSpeed = 60;
+	
 #ifndef _WIN32_WCE
 	_gfx_mode = GFX_DOUBLESIZE;
 #else

Index: gameDetector.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gameDetector.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- gameDetector.h	4 May 2002 00:20:39 -0000	1.12
+++ gameDetector.h	5 May 2002 20:08:40 -0000	1.13
@@ -38,6 +38,7 @@
 	byte _sfx_volume;
 	bool _amiga;
 
+	uint16 _talkSpeed;
 	uint16 _debugMode;
 	uint16 _noSubtitles;
 	uint16 _bootParam;

Index: readme.txt
===================================================================
RCS file: /cvsroot/scummvm/scummvm/readme.txt,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -d -r1.46 -r1.47
--- readme.txt	5 May 2002 01:54:06 -0000	1.46
+++ readme.txt	5 May 2002 20:08:40 -0000	1.47
@@ -228,6 +228,7 @@
         -g<mode>   - Select graphics scaler. See below.
         -f         - Full-screen mode.
         -n         - Disable subtitles. Use with games that have voice.
+        -y         - Set talk speed ('yak option'). Default is '60'
         -a         - Enable amiga pal conversion, for playing Amiga versions
         -d[<num>]  - Set debug verbosity to <num>
         -w[<file>] - Write configuration file

Index: script.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/script.cpp,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -d -r1.54 -r1.55
--- script.cpp	5 May 2002 18:10:29 -0000	1.54
+++ script.cpp	5 May 2002 20:08:40 -0000	1.55
@@ -358,7 +358,12 @@
 {
 	if (!(var & 0xF000)) {
 		checkRange(_numVariables - 1, 0, var, "Variable %d out of range(w)");
-		_vars[var] = value;
+
+		// FIXME: Find some better place to put this.
+		if (var == VAR_CHARINC)
+			_vars[VAR_CHARINC] = _defaultTalkDelay / 20;
+		else
+			_vars[var] = value;		
 
 		if ((_varwatch == (int)var) || (_varwatch == 0)) {
 			if (vm.slot[_currentScript].number < 100)

Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scummvm.cpp,v
retrieving revision 1.138
retrieving revision 1.139
diff -u -d -r1.138 -r1.139
--- scummvm.cpp	5 May 2002 20:04:25 -0000	1.138
+++ scummvm.cpp	5 May 2002 20:08:41 -0000	1.139
@@ -73,8 +73,7 @@
 		a->number = i;
 		initActor(a, 1);
 	}
-
-	_defaultTalkDelay = 60;
+	
 	_vars[VAR_CHARINC] = 4;
 
 	_numNestedScripts = 0;
@@ -1380,9 +1379,9 @@
 	scumm->_soundCardType = detector->_soundCardType;
 	scumm->_noSubtitles = detector->_noSubtitles;
 	scumm->_cdrom = detector->_cdrom;
-
+	scumm->_defaultTalkDelay = detector->_talkSpeed;
 	scumm->_sound_volume_sfx = detector->_sfx_volume;	
-	scumm->_sound_volume_music = detector->_music_volume;
+	scumm->_sound_volume_music = detector->_music_volume;	
 	{
 		IMuse *imuse;
 

Index: string.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/string.cpp,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- string.cpp	24 Apr 2002 04:26:09 -0000	1.39
+++ string.cpp	5 May 2002 20:08:41 -0000	1.40
@@ -374,7 +374,6 @@
 
 			charset._xpos2 = charset._left;
 			charset._ypos2 = charset._top;
-
 			_talkDelay += _vars[VAR_CHARINC];
 			continue;
 		}





More information about the Scummvm-git-logs mailing list