From 748e00f1cf30e9690532bd98087de2e65ca2bac2 Mon Sep 17 00:00:00 2001 From: Sylvain Dupont Date: Sat, 16 Oct 2010 19:27:11 +0000 Subject: TOON: Implemented the 4 different mute modes for sound/text As specified in the hotkeys screen (music,dialog,sound,text on/off) Sounds are still played but with a volume = 0 (for timing issues) svn-id: r53545 --- engines/toon/toon.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'engines/toon/toon.cpp') diff --git a/engines/toon/toon.cpp b/engines/toon/toon.cpp index dfb25a7777..e11b29cd6e 100644 --- a/engines/toon/toon.cpp +++ b/engines/toon/toon.cpp @@ -187,6 +187,18 @@ void ToonEngine::parseInput() { if (event.kbd.keycode == Common::KEYCODE_F6) { loadGame(-1); } + if (event.kbd.ascii == 't') { + _showConversationText = !_showConversationText; + } + if (event.kbd.ascii == 'm') { + _audioManager->muteMusic(!_audioManager->isMusicMuted()); + } + if (event.kbd.ascii == 'd') { + _audioManager->muteVoice(!_audioManager->isVoiceMuted()); + } + if (event.kbd.ascii == 's') { + _audioManager->muteSfx(!_audioManager->isSfxMuted()); + } if (event.kbd.flags & Common::KBD_ALT) { int32 slotNum = event.kbd.ascii - '0'; @@ -710,6 +722,7 @@ ToonEngine::ToonEngine(OSystem *syst, const ADGameDescription *gameDescription) _currentPicture = 0; _roomScaleData = 0; _shadowLUT = 0; + _showConversationText = true; _isDemo = _gameDescription->flags & ADGF_DEMO; DebugMan.addDebugChannel(kDebugAnim, "Anim", "Animation debug level"); @@ -2710,7 +2723,7 @@ Character *ToonEngine::getCharacterById(int32 charId) { } void ToonEngine::drawConversationLine() { - if (_currentTextLine) { + if (_currentTextLine && _showConversationText) { _fontRenderer->setFontColorByCharacter(_currentTextLineCharacterId); _fontRenderer->setFont(_fontToon); _fontRenderer->renderMultiLineText(_currentTextLineX, _currentTextLineY, Common::String(_currentTextLine), 0); -- cgit v1.2.3