diff options
-rw-r--r-- | gameDetector.cpp | 8 | ||||
-rw-r--r-- | gameDetector.h | 1 | ||||
-rw-r--r-- | readme.txt | 1 | ||||
-rw-r--r-- | script.cpp | 7 | ||||
-rw-r--r-- | scummvm.cpp | 7 | ||||
-rw-r--r-- | string.cpp | 1 |
6 files changed, 19 insertions, 6 deletions
diff --git a/gameDetector.cpp b/gameDetector.cpp index cfb60d5410..59cd556efd 100644 --- a/gameDetector.cpp +++ b/gameDetector.cpp @@ -47,6 +47,7 @@ static const char USAGE_STRING[] = "\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 @@ void GameDetector::parseCommandLine(int argc, char **argv) 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 @@ int GameDetector::detectMain(int argc, char **argv) _noSubtitles = 0; // use by default - should this depend on soundtrack? + _talkSpeed = 60; + #ifndef _WIN32_WCE _gfx_mode = GFX_DOUBLESIZE; #else diff --git a/gameDetector.h b/gameDetector.h index 6476a0c6bd..600948b4e3 100644 --- a/gameDetector.h +++ b/gameDetector.h @@ -38,6 +38,7 @@ public: byte _sfx_volume; bool _amiga; + uint16 _talkSpeed; uint16 _debugMode; uint16 _noSubtitles; uint16 _bootParam; diff --git a/readme.txt b/readme.txt index c6b7ee34ab..24ed6fa3a9 100644 --- a/readme.txt +++ b/readme.txt @@ -228,6 +228,7 @@ Command Line Options: -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 diff --git a/script.cpp b/script.cpp index d9388b42e7..a7c7fa1f69 100644 --- a/script.cpp +++ b/script.cpp @@ -358,7 +358,12 @@ void Scumm::writeVar(uint var, int value) { 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) diff --git a/scummvm.cpp b/scummvm.cpp index 23719256bd..443597300a 100644 --- a/scummvm.cpp +++ b/scummvm.cpp @@ -73,8 +73,7 @@ void Scumm::scummInit() a->number = i; initActor(a, 1); } - - _defaultTalkDelay = 60; + _vars[VAR_CHARINC] = 4; _numNestedScripts = 0; @@ -1380,9 +1379,9 @@ Scumm *Scumm::createFromDetector(GameDetector *detector, OSystem *syst) 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; diff --git a/string.cpp b/string.cpp index d682e64e01..bca0f767b7 100644 --- a/string.cpp +++ b/string.cpp @@ -374,7 +374,6 @@ void Scumm::CHARSET_1() charset._xpos2 = charset._left; charset._ypos2 = charset._top; - _talkDelay += _vars[VAR_CHARINC]; continue; } |