diff options
Diffstat (limited to 'engines/kyra/engine/kyra_hof.cpp')
-rw-r--r-- | engines/kyra/engine/kyra_hof.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/engines/kyra/engine/kyra_hof.cpp b/engines/kyra/engine/kyra_hof.cpp index ef8b119c0d..1d60c04035 100644 --- a/engines/kyra/engine/kyra_hof.cpp +++ b/engines/kyra/engine/kyra_hof.cpp @@ -71,6 +71,7 @@ KyraEngine_HoF::KyraEngine_HoF(OSystem *system, const GameFlags &flags) : KyraEn _unkHandleSceneChangeFlag = false; _pathfinderFlag = 0; _mouseX = _mouseY = 0; + _asciiCodeEvents = _kbEventSkip = true; _nextIdleAnim = 0; _lastIdleScript = -1; @@ -453,8 +454,8 @@ void KyraEngine_HoF::runLoop() { handleInput(_mouseX, _mouseY); } - //if (queryGameFlag(0x1EE) && inputFlag) - // sub_13B19(inputFlag); + if (queryGameFlag(0x1EE) && inputFlag) + processKeyboardSfx(inputFlag); _system->delayMillis(10); } @@ -1193,6 +1194,15 @@ int KyraEngine_HoF::inputSceneChange(int x, int y, int unk1, int unk2) { return refreshNPC; } +void KyraEngine_HoF::processKeyboardSfx(int inputFlag) { + if ((inputFlag & 0xFF) >= ARRAYSIZE(_keyboardSounds)) + return; + int16 track = _keyboardSounds[inputFlag & 0xFF]; + if (track == -1) + return; + snd_playSoundEffect(track); +} + int KyraEngine_HoF::getCharacterWalkspeed() const { return _timer->getDelay(0); } |