RCS file: /cvsroot/scummvm/scummvm/queen/journal.cpp,v
retrieving revision 1.44
diff -u -r1.44 journal.cpp
|
|
|
247 | 247 | } |
248 | 248 | drawConfigPanel(); |
249 | 249 | } else if (zoneNum == ZN_VOICE_TOGGLE) { |
250 | | if (_vm->resource()->isCD()) |
251 | | _vm->sound()->toggleSpeech(); |
252 | | else |
253 | | _vm->sound()->speechToggle(false); |
| 250 | _vm->sound()->toggleSpeech(); |
254 | 251 | drawConfigPanel(); |
255 | 252 | } else if (zoneNum == ZN_TEXT_TOGGLE) { |
256 | 253 | _vm->subtitles(!_vm->subtitles()); |
RCS file: /cvsroot/scummvm/scummvm/queen/logic.cpp,v
retrieving revision 1.215
diff -u -r1.215 logic.cpp
|
|
|
1232 | 1232 | // update screen scrolling |
1233 | 1233 | _vm->display()->horizontalScroll(mx); |
1234 | 1234 | |
1235 | | // update bobs position / frame |
| 1235 | // update Bob's position / frame |
1236 | 1236 | joe->x = piton->x = 3 * mx / 4 + 200; |
1237 | 1237 | joe->frameNum = mx / 36 + 45; |
1238 | 1238 | |
RCS file: /cvsroot/scummvm/scummvm/queen/queen.cpp,v
retrieving revision 1.111
diff -u -r1.111 queen.cpp
|
|
|
110 | 110 | ConfMan.registerDefault("music_mute", false); |
111 | 111 | ConfMan.registerDefault("sfx_mute", false); |
112 | 112 | ConfMan.registerDefault("talkspeed", Logic::DEFAULT_TALK_SPEED); |
113 | | ConfMan.registerDefault("speech_mute", !_resource->isCD()); |
| 113 | ConfMan.registerDefault("speech_mute", false); |
114 | 114 | ConfMan.registerDefault("subtitles", true); |
115 | 115 | } |
116 | 116 | |
… |
… |
|
133 | 133 | _sound->musicToggle(!ConfMan.getBool("music_mute")); |
134 | 134 | _sound->sfxToggle(!ConfMan.getBool("sfx_mute")); |
135 | 135 | _talkSpeed = ConfMan.getInt("talkspeed"); |
136 | | _sound->speechToggle(_resource->isCD() ? !ConfMan.getBool("speech_mute"): false); |
| 136 | _sound->speechToggle(!ConfMan.getBool("speech_mute")); |
137 | 137 | _subtitles = ConfMan.getBool("subtitles"); |
138 | 138 | checkOptionSettings(); |
139 | 139 | } |
RCS file: /cvsroot/scummvm/scummvm/queen/sound.cpp,v
retrieving revision 1.47
diff -u -r1.47 sound.cpp
|
|
|
103 | 103 | #endif |
104 | 104 | strcat(name, ".SB"); |
105 | 105 | waitFinished(isSpeech); |
106 | | sfxPlay(name, isSpeech); |
| 106 | if (_vm->resource()->fileExists(name)) { |
| 107 | _lastSampleExists = true; |
| 108 | sfxPlay(name, isSpeech); |
| 109 | } else { |
| 110 | _lastSampleExists = false; |
| 111 | } |
107 | 112 | } |
108 | 113 | } |
109 | 114 | |
… |
… |
|
120 | 125 | } |
121 | 126 | strcat(name, ".SB"); |
122 | 127 | waitFinished(isSpeech); |
123 | | sfxPlay(name, isSpeech); |
| 128 | if (_vm->resource()->fileExists(name)) { |
| 129 | _lastSampleExists = true; |
| 130 | sfxPlay(name, isSpeech); |
| 131 | } else { |
| 132 | _lastSampleExists = false; |
| 133 | } |
124 | 134 | } |
125 | 135 | |
126 | 136 | void Sound::playSong(int16 songNum) { |
… |
… |
|
191 | 201 | |
192 | 202 | #ifdef USE_MAD |
193 | 203 | void MP3Sound::sfxPlay(const char *name, bool isSpeech) { |
194 | | if (_vm->resource()->fileExists(name)) { |
195 | | uint32 size; |
196 | | File *f = _vm->resource()->giveCompressedSound(name, &size); |
197 | | _mixer->playInputStream(isSpeech ? &_speechHandle : &_sfxHandle, makeMP3Stream(f, size), false); |
198 | | } |
| 204 | uint32 size; |
| 205 | File *f = _vm->resource()->giveCompressedSound(name, &size); |
| 206 | _mixer->playInputStream(isSpeech ? &_speechHandle : &_sfxHandle, makeMP3Stream(f, size), false); |
199 | 207 | } |
200 | 208 | #endif |
201 | 209 | |
202 | 210 | #ifdef USE_VORBIS |
203 | 211 | void OGGSound::sfxPlay(const char *name, bool isSpeech) { |
204 | | if (_vm->resource()->fileExists(name)) { |
205 | | uint32 size; |
206 | | File *f = _vm->resource()->giveCompressedSound(name, &size); |
207 | | _mixer->playInputStream(isSpeech ? &_speechHandle : &_sfxHandle, makeVorbisStream(f, size), false); |
208 | | } |
| 212 | uint32 size; |
| 213 | File *f = _vm->resource()->giveCompressedSound(name, &size); |
| 214 | _mixer->playInputStream(isSpeech ? &_speechHandle : &_sfxHandle, makeVorbisStream(f, size), false); |
209 | 215 | } |
210 | 216 | #endif |
211 | 217 | |
212 | 218 | #ifdef USE_FLAC |
213 | 219 | void FLACSound::sfxPlay(const char *name, bool isSpeech) { |
214 | | if (_vm->resource()->fileExists(name)) { |
215 | | uint32 size; |
216 | | File *f = _vm->resource()->giveCompressedSound(name, &size); |
217 | | _mixer->playInputStream(isSpeech ? &_speechHandle : &_sfxHandle, makeFlacStream(f, size), false); |
218 | | } |
| 220 | uint32 size; |
| 221 | File *f = _vm->resource()->giveCompressedSound(name, &size); |
| 222 | _mixer->playInputStream(isSpeech ? &_speechHandle : &_sfxHandle, makeFlacStream(f, size), false); |
219 | 223 | } |
220 | 224 | #endif |
221 | 225 | |
RCS file: /cvsroot/scummvm/scummvm/queen/sound.h,v
retrieving revision 1.24
diff -u -r1.24 sound.h
|
|
|
53 | 53 | public: |
54 | 54 | Sound(SoundMixer *mixer, QueenEngine *vm); |
55 | 55 | virtual ~Sound(); |
56 | | virtual void sfxPlay(const char *name, bool isSpeech) = 0; |
57 | 56 | static Sound *giveSound(SoundMixer *mixer, QueenEngine *vm, uint8 compression); |
58 | 57 | void playSfx(uint16 sfx, bool isSpeech); |
59 | 58 | void playSfx(const char *base, bool isSpeech); |
… |
… |
|
76 | 75 | |
77 | 76 | bool isSpeechActive() const { return _speechHandle.isActive(); } |
78 | 77 | bool isSfxActive() const { return _sfxHandle.isActive(); } |
79 | | |
| 78 | bool lastSampleExists() const { return _lastSampleExists; } |
| 79 | |
80 | 80 | int16 lastOverride() const { return _lastOverride; } |
81 | 81 | |
82 | 82 | void saveState(byte *&ptr); |
… |
… |
|
107 | 107 | bool _sfxToggle; |
108 | 108 | bool _speechToggle; |
109 | 109 | bool _musicToggle; |
| 110 | bool _lastSampleExists; |
110 | 111 | |
111 | 112 | int16 _lastOverride; |
112 | 113 | PlayingSoundHandle _sfxHandle; |
113 | 114 | PlayingSoundHandle _speechHandle; |
| 115 | |
| 116 | private: |
| 117 | virtual void sfxPlay(const char *name, bool isSpeech) = 0; |
114 | 118 | }; |
115 | 119 | |
116 | 120 | class SilentSound : public Sound { |
RCS file: /cvsroot/scummvm/scummvm/queen/talk.cpp,v
retrieving revision 1.112
diff -u -r1.112 talk.cpp
|
|
|
757 | 757 | break; |
758 | 758 | } |
759 | 759 | |
760 | | if (_vm->sound()->speechOn()) { |
| 760 | if (_vm->sound()->speechOn() && _vm->sound()->lastSampleExists()) { |
761 | 761 | // sfx is finished, stop the speak animation |
762 | 762 | if (!_vm->sound()->isSpeechActive()) { |
763 | 763 | break; |
… |
… |
|
772 | 772 | } |
773 | 773 | } |
774 | 774 | |
775 | | // Make sure that Person closes their mouths |
| 775 | // Make sure that Person closes their mouth |
776 | 776 | if (!isJoe && parameters->ff > 0) |
777 | 777 | _vm->bankMan()->overpack(parameters->ff, startFrame, bankNum); |
778 | 778 | } |
… |
… |
|
834 | 834 | if (!isJoe) { |
835 | 835 | if (SPEAK_AMAL_ON == command) { |
836 | 836 | // It's the oracle! |
837 | | // Dont turn AMAL animation off, and dont manually anim person |
| 837 | // Don't turn AMAL animation off, and don't manually anim person |
838 | 838 | command = SPEAK_ORACLE; |
839 | 839 | oracle = true; |
840 | 840 | uint16 frameNum = _vm->graphics()->personFrames(bobNum); |