Skip to content

Commit

Permalink
TUCKER: Allow skipping speech
Browse files Browse the repository at this point in the history
Escape, period or right mouse click skips one sentence at a time.
  • Loading branch information
bonki committed Feb 25, 2018
1 parent c55ee3f commit 842c67f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
11 changes: 11 additions & 0 deletions engines/tucker/tucker.cpp
Expand Up @@ -653,6 +653,10 @@ void TuckerEngine::parseEvents() {
break;
case Common::KEYCODE_ESCAPE:
_inputKeys[kInputKeyEscape] = true;
_inputKeys[kInputKeySkipSpeech] = true;
break;
case Common::KEYCODE_PERIOD:
_inputKeys[kInputKeySkipSpeech] = true;
break;
case Common::KEYCODE_d:
if (ev.kbd.hasFlags(Common::KBD_CTRL)) {
Expand All @@ -678,6 +682,7 @@ void TuckerEngine::parseEvents() {
case Common::EVENT_RBUTTONDOWN:
updateCursorPos(ev.mouse.x, ev.mouse.y);
_mouseButtonsMask |= 2;
_inputKeys[kInputKeySkipSpeech] = true;
break;
case Common::EVENT_RBUTTONUP:
updateCursorPos(ev.mouse.x, ev.mouse.y);
Expand All @@ -692,6 +697,12 @@ void TuckerEngine::parseEvents() {
break;
}
}
if (_inputKeys[kInputKeySkipSpeech]) {
if (isSpeechSoundPlaying()) {
stopSpeechSound();
}
_inputKeys[kInputKeySkipSpeech] = false;
}
_quitGame = shouldQuit();
}

Expand Down
3 changes: 2 additions & 1 deletion engines/tucker/tucker.h
Expand Up @@ -212,7 +212,8 @@ enum InputKey {
kInputKeyToggleInventory,
kInputKeyToggleTextSpeech,
kInputKeyHelp,
kInputKeyCount
kInputKeyCount,
kInputKeySkipSpeech
};

enum GameFlag {
Expand Down

0 comments on commit 842c67f

Please sign in to comment.