diff options
Diffstat (limited to 'engines/hopkins/talk.cpp')
-rw-r--r-- | engines/hopkins/talk.cpp | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/engines/hopkins/talk.cpp b/engines/hopkins/talk.cpp index 736ec9865c..df7b26c82c 100644 --- a/engines/hopkins/talk.cpp +++ b/engines/hopkins/talk.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -68,12 +68,17 @@ void TalkManager::startAnimatedCharacterDialogue(const Common::String &filename) getStringFromBuffer(40, spriteFilename, (const char *)_characterBuffer); getStringFromBuffer(0, _questionsFilename, (const char *)_characterBuffer); getStringFromBuffer(20, _answersFilename, (const char *)_characterBuffer); - if (_vm->_globals->_language == LANG_FR) { + + switch (_vm->_globals->_language) { + case LANG_FR: _answersFilename = _questionsFilename = "RUE.TXT"; - } else if (_vm->_globals->_language == LANG_EN) { + break; + case LANG_EN: _answersFilename = _questionsFilename = "RUEAN.TXT"; - } else if (_vm->_globals->_language == LANG_SP) { + break; + case LANG_SP: _answersFilename = _questionsFilename = "RUEES.TXT"; + break; } _dialogueMesgId1 = READ_LE_INT16((uint16 *)_characterBuffer + 40); _paletteBufferIdx = 20 * READ_LE_INT16((uint16 *)_characterBuffer + 42) + 110; @@ -261,7 +266,7 @@ int TalkManager::dialogQuestion(bool animatedFl) { int retVal = -1; bool loopCond = false; - do { + do { int mousePosY = _vm->_events->getMouseY(); if (sentence1PosY < mousePosY && mousePosY < (sentence2PosY - 1)) { _vm->_fontMan->setOptimalColor(6, 7, 8, 5); @@ -608,7 +613,6 @@ void TalkManager::displayBobDialogAnim(int idx) { _vm->_objectsMan->_bob[idx]._flipFl = false; _vm->_objectsMan->_bob[idx]._animData = _vm->_animMan->_animBqe[idx]._data; _vm->_objectsMan->_bob[idx]._bobMode = 10; - bqeData = _characterSprite; _vm->_objectsMan->_bob[idx]._spriteData = _characterSprite; _vm->_objectsMan->_bob[idx]._bobModeChange = newMode; _vm->_objectsMan->_bob[idx]._modeChangeCtr = -1; @@ -820,7 +824,7 @@ void TalkManager::handleAnswer(int zone, int verb) { int lastOpcodeResult = 1; do { int opcodeType = _vm->_script->handleOpcode(ptr + 20 * lastOpcodeResult); - if (_vm->shouldQuit()) + if (opcodeType == -1 || _vm->shouldQuit()) return; if (opcodeType == 2) |