From 8d326d1e28eef8e9e8eea9745bdd93ee19580eff Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Sat, 24 Mar 2007 00:21:47 +0000 Subject: Add patch #1687013 - Zak FM-Towns: F1-F4 person switching. svn-id: r26288 --- engines/scumm/verbs.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'engines/scumm') diff --git a/engines/scumm/verbs.cpp b/engines/scumm/verbs.cpp index 2e37178bc1..b899ab6751 100644 --- a/engines/scumm/verbs.cpp +++ b/engines/scumm/verbs.cpp @@ -567,6 +567,23 @@ void ScummEngine::checkExecVerbs() { } } + if ((_game.platform == Common::kPlatformFMTowns && _game.id == GID_ZAK) && + (_mouseAndKeyboardStat >= 315 && _mouseAndKeyboardStat <= 318)) { + // Hack: Handle switching to a person via F1-F4 keys. + // This feature isn't available in the scripts of the FM-TOWNS verison. + int fKey = _mouseAndKeyboardStat - 314; + int switchSlot = getVerbSlot(36, 0); + // check if switch-verb is enabled + if (_verbs[switchSlot].curmode == 1) { + // Check if person is available (see script 23 from ZAK_FM-TOWNS and script 4 from ZAK_PC). + // Zak: Var[144 Bit 15], Annie: Var[145 Bit 0], Melissa: Var[145 Bit 1], Leslie: Var[145 Bit 2] + if (!readVar(0x890E + fKey)) { + runInputScript(1, 36 + fKey, 0); + } + } + return; + } + // Generic keyboard input runInputScript(4, _mouseAndKeyboardStat, 1); } else if (_mouseAndKeyboardStat & MBS_MOUSE_MASK) { -- cgit v1.2.3