diff options
author | Eugene Sandulenko | 2005-08-16 13:13:27 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2005-08-16 13:13:27 +0000 |
commit | 8cbdf0e6295fd31b2a355fdb4c7bdc84176c1b48 (patch) | |
tree | b14345740e97d497b32303f3721c7907ae6ec4f9 /saga | |
parent | 0db33e8dfd7ef139e23d4a6179baeb1fc2613ce8 (diff) | |
download | scummvm-rg350-8cbdf0e6295fd31b2a355fdb4c7bdc84176c1b48.tar.gz scummvm-rg350-8cbdf0e6295fd31b2a355fdb4c7bdc84176c1b48.tar.bz2 scummvm-rg350-8cbdf0e6295fd31b2a355fdb4c7bdc84176c1b48.zip |
o Fix crashes on puzzle with floppy (speechless) versions
o Now hints get correct voices.
svn-id: r18695
Diffstat (limited to 'saga')
-rw-r--r-- | saga/actor.cpp | 5 | ||||
-rw-r--r-- | saga/puzzle.cpp | 8 |
2 files changed, 8 insertions, 5 deletions
diff --git a/saga/actor.cpp b/saga/actor.cpp index f35bf149b8..3ac6e62360 100644 --- a/saga/actor.cpp +++ b/saga/actor.cpp @@ -2052,7 +2052,10 @@ void Actor::nonActorSpeech(const Common::Rect &box, const char **strings, int st _activeSpeech.speechFlags = speechFlags; _activeSpeech.actorsCount = 1; _activeSpeech.actorIds[0] = 0; - _activeSpeech.sampleResourceId = sampleResourceId; + if (!(_vm->getFeatures() & GF_CD_FX)) + _activeSpeech.sampleResourceId = -1; + else + _activeSpeech.sampleResourceId = sampleResourceId; _activeSpeech.playing = false; _activeSpeech.slowModeCharIndex = 0; _activeSpeech.speechBox = box; diff --git a/saga/puzzle.cpp b/saga/puzzle.cpp index 26ef8ca518..9c76c61297 100644 --- a/saga/puzzle.cpp +++ b/saga/puzzle.cpp @@ -608,11 +608,11 @@ void Puzzle::giveHint(void) { } if (i >= 0) { - char hintBuf[64]; - const char *hintPtr = hintBuf; - sprintf(hintBuf, optionsStr[_lang][kROHint], pieceNames[piece]); + static char hintBuf[64]; + static const char *hintPtr = hintBuf; + sprintf(hintBuf, optionsStr[_lang][kROHint], pieceNames[_lang][piece]); - _vm->_actor->nonActorSpeech(_hintBox, &hintPtr, 1, PUZZLE_TOOL_SOUNDS + _hintSpeaker + piece, 0); + _vm->_actor->nonActorSpeech(_hintBox, &hintPtr, 1, PUZZLE_TOOL_SOUNDS + _hintSpeaker + piece * 3, 0); } else { // If no pieces are in the wrong place |