[Scummvm-cvs-logs] CVS: scummvm/queen cutaway.cpp,1.140,1.140.2.1 journal.cpp,1.43.2.1,1.43.2.2 queen.cpp,1.108.2.3,1.108.2.4 sound.cpp,1.47,1.47.2.1 sound.h,1.24,1.24.2.1 talk.cpp,1.112,1.112.2.1
Gregory Montoir
cyx at users.sourceforge.net
Sun Dec 19 04:49:03 CET 2004
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm scumm.cpp,1.287,1.288
- Next message: [Scummvm-cvs-logs] CVS: scummvm/saga actor.cpp,1.41,1.42 actor.h,1.21,1.22 interface.cpp,1.39,1.40 scene.cpp,1.58,1.59 scene.h,1.23,1.24 sprite.cpp,1.27,1.28 sprite.h,1.7,1.8
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/queen
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14076/queen
Modified Files:
Tag: branch-0-7-0
cutaway.cpp journal.cpp queen.cpp sound.cpp sound.h talk.cpp
Log Message:
Fixed regression in queen floppy version. Before doing any speech/texts synchronization, we check the voice sfx exists. See also patch #1087870
Index: cutaway.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/cutaway.cpp,v
retrieving revision 1.140
retrieving revision 1.140.2.1
diff -u -d -r1.140 -r1.140.2.1
--- cutaway.cpp 6 Dec 2004 20:42:10 -0000 1.140
+++ cutaway.cpp 19 Dec 2004 12:48:11 -0000 1.140.2.1
@@ -960,7 +960,7 @@
// if the cutaway has been cancelled, we must stop the speech and the sfx as well
if (_vm->input()->cutawayQuit()) {
- if (_vm->sound()->speechOn())
+ if (_vm->sound()->isSpeechActive())
_vm->sound()->stopSpeech();
_vm->sound()->stopSfx();
}
@@ -1262,7 +1262,7 @@
break;
}
- if ((OBJECT_TYPE_TEXT_SPEAK == type || OBJECT_TYPE_TEXT_DISPLAY_AND_SPEAK == type) && _vm->sound()->speechOn()) {
+ if ((OBJECT_TYPE_TEXT_SPEAK == type || OBJECT_TYPE_TEXT_DISPLAY_AND_SPEAK == type) && _vm->sound()->speechOn() && _vm->sound()->speechSfxExists()) {
if (!_vm->sound()->isSpeechActive()) {
break;
}
Index: journal.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/journal.cpp,v
retrieving revision 1.43.2.1
retrieving revision 1.43.2.2
diff -u -d -r1.43.2.1 -r1.43.2.2
--- journal.cpp 17 Dec 2004 13:51:05 -0000 1.43.2.1
+++ journal.cpp 19 Dec 2004 12:48:11 -0000 1.43.2.2
@@ -247,10 +247,7 @@
}
drawConfigPanel();
} else if (zoneNum == ZN_VOICE_TOGGLE) {
- if (_vm->resource()->isCD())
- _vm->sound()->toggleSpeech();
- else
- _vm->sound()->speechToggle(false);
+ _vm->sound()->toggleSpeech();
drawConfigPanel();
} else if (zoneNum == ZN_TEXT_TOGGLE) {
_vm->subtitles(!_vm->subtitles());
Index: queen.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/queen.cpp,v
retrieving revision 1.108.2.3
retrieving revision 1.108.2.4
diff -u -d -r1.108.2.3 -r1.108.2.4
--- queen.cpp 17 Dec 2004 16:50:29 -0000 1.108.2.3
+++ queen.cpp 19 Dec 2004 12:48:11 -0000 1.108.2.4
@@ -110,7 +110,7 @@
ConfMan.registerDefault("music_mute", false);
ConfMan.registerDefault("sfx_mute", false);
ConfMan.registerDefault("talkspeed", Logic::DEFAULT_TALK_SPEED);
- ConfMan.registerDefault("speech_mute", !_resource->isCD());
+ ConfMan.registerDefault("speech_mute", _resource->isDemo() || _resource->isInterview());
ConfMan.registerDefault("subtitles", true);
}
@@ -126,6 +126,11 @@
if (!_sound->speechOn()) {
_subtitles = true;
}
+
+ // demo and interview versions don't have speech at all
+ if (_sound->speechOn() && (_resource->isDemo() || _resource->isInterview())) {
+ _sound->speechToggle(false);
+ }
}
void QueenEngine::readOptionSettings() {
@@ -133,7 +138,7 @@
_sound->musicToggle(!ConfMan.getBool("music_mute"));
_sound->sfxToggle(!ConfMan.getBool("sfx_mute"));
_talkSpeed = ConfMan.getInt("talkspeed");
- _sound->speechToggle(_resource->isCD() ? !ConfMan.getBool("speech_mute"): false);
+ _sound->speechToggle(!ConfMan.getBool("speech_mute"));
_subtitles = ConfMan.getBool("subtitles");
checkOptionSettings();
}
Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/sound.cpp,v
retrieving revision 1.47
retrieving revision 1.47.2.1
diff -u -d -r1.47 -r1.47.2.1
--- sound.cpp 27 Nov 2004 15:58:07 -0000 1.47
+++ sound.cpp 19 Dec 2004 12:48:11 -0000 1.47.2.1
@@ -92,7 +92,7 @@
void Sound::playSfx(uint16 sfx, bool isSpeech) {
if (isSpeech && !speechOn()) return;
- else if (!sfxOn()) return;
+ else if (!sfxOn()) return;
if (sfx != 0) {
char name[13];
@@ -103,7 +103,12 @@
#endif
strcat(name, ".SB");
waitFinished(isSpeech);
- sfxPlay(name, isSpeech);
+ if (_vm->resource()->fileExists(name)) {
+ sfxPlay(name, isSpeech);
+ _speechSfxExists = isSpeech;
+ } else {
+ _speechSfxExists = false;
+ }
}
}
@@ -120,7 +125,12 @@
}
strcat(name, ".SB");
waitFinished(isSpeech);
- sfxPlay(name, isSpeech);
+ if (_vm->resource()->fileExists(name)) {
+ sfxPlay(name, isSpeech);
+ _speechSfxExists = isSpeech;
+ } else {
+ _speechSfxExists = false;
+ }
}
void Sound::playSong(int16 songNum) {
@@ -182,40 +192,32 @@
}
void SBSound::sfxPlay(const char *name, bool isSpeech) {
- if (_vm->resource()->fileExists(name)) {
- uint32 size;
- uint8 *buf = _vm->resource()->loadFile(name, SB_HEADER_SIZE, &size, true);
- playSound(buf, size, isSpeech);
- }
+ uint32 size;
+ uint8 *buf = _vm->resource()->loadFile(name, SB_HEADER_SIZE, &size, true);
+ playSound(buf, size, isSpeech);
}
#ifdef USE_MAD
void MP3Sound::sfxPlay(const char *name, bool isSpeech) {
- if (_vm->resource()->fileExists(name)) {
- uint32 size;
- File *f = _vm->resource()->giveCompressedSound(name, &size);
- _mixer->playInputStream(isSpeech ? &_speechHandle : &_sfxHandle, makeMP3Stream(f, size), false);
- }
+ uint32 size;
+ File *f = _vm->resource()->giveCompressedSound(name, &size);
+ _mixer->playInputStream(isSpeech ? &_speechHandle : &_sfxHandle, makeMP3Stream(f, size), false);
}
#endif
#ifdef USE_VORBIS
void OGGSound::sfxPlay(const char *name, bool isSpeech) {
- if (_vm->resource()->fileExists(name)) {
- uint32 size;
- File *f = _vm->resource()->giveCompressedSound(name, &size);
- _mixer->playInputStream(isSpeech ? &_speechHandle : &_sfxHandle, makeVorbisStream(f, size), false);
- }
+ uint32 size;
+ File *f = _vm->resource()->giveCompressedSound(name, &size);
+ _mixer->playInputStream(isSpeech ? &_speechHandle : &_sfxHandle, makeVorbisStream(f, size), false);
}
#endif
#ifdef USE_FLAC
void FLACSound::sfxPlay(const char *name, bool isSpeech) {
- if (_vm->resource()->fileExists(name)) {
- uint32 size;
- File *f = _vm->resource()->giveCompressedSound(name, &size);
- _mixer->playInputStream(isSpeech ? &_speechHandle : &_sfxHandle, makeFlacStream(f, size), false);
- }
+ uint32 size;
+ File *f = _vm->resource()->giveCompressedSound(name, &size);
+ _mixer->playInputStream(isSpeech ? &_speechHandle : &_sfxHandle, makeFlacStream(f, size), false);
}
#endif
Index: sound.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/sound.h,v
retrieving revision 1.24
retrieving revision 1.24.2.1
diff -u -d -r1.24 -r1.24.2.1
--- sound.h 22 Nov 2004 22:16:50 -0000 1.24
+++ sound.h 19 Dec 2004 12:48:12 -0000 1.24.2.1
@@ -77,6 +77,8 @@
bool isSpeechActive() const { return _speechHandle.isActive(); }
bool isSfxActive() const { return _sfxHandle.isActive(); }
+ bool speechSfxExists() const { return _speechSfxExists; }
+
int16 lastOverride() const { return _lastOverride; }
void saveState(byte *&ptr);
@@ -107,6 +109,7 @@
bool _sfxToggle;
bool _speechToggle;
bool _musicToggle;
+ bool _speechSfxExists;
int16 _lastOverride;
PlayingSoundHandle _sfxHandle;
Index: talk.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/talk.cpp,v
retrieving revision 1.112
retrieving revision 1.112.2.1
diff -u -d -r1.112 -r1.112.2.1
--- talk.cpp 6 Dec 2004 20:42:11 -0000 1.112
+++ talk.cpp 19 Dec 2004 12:48:12 -0000 1.112.2.1
@@ -757,7 +757,7 @@
break;
}
- if (_vm->sound()->speechOn()) {
+ if (_vm->sound()->speechOn() && _vm->sound()->speechSfxExists()) {
// sfx is finished, stop the speak animation
if (!_vm->sound()->isSpeechActive()) {
break;
@@ -772,7 +772,7 @@
}
}
- // Make sure that Person closes their mouths
+ // Make sure that Person closes their mouth
if (!isJoe && parameters->ff > 0)
_vm->bankMan()->overpack(parameters->ff, startFrame, bankNum);
}
@@ -834,7 +834,7 @@
if (!isJoe) {
if (SPEAK_AMAL_ON == command) {
// It's the oracle!
- // Dont turn AMAL animation off, and dont manually anim person
+ // Don't turn AMAL animation off, and don't manually anim person
command = SPEAK_ORACLE;
oracle = true;
uint16 frameNum = _vm->graphics()->personFrames(bobNum);
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm scumm.cpp,1.287,1.288
- Next message: [Scummvm-cvs-logs] CVS: scummvm/saga actor.cpp,1.41,1.42 actor.h,1.21,1.22 interface.cpp,1.39,1.40 scene.cpp,1.58,1.59 scene.h,1.23,1.24 sprite.cpp,1.27,1.28 sprite.h,1.7,1.8
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list