Ticket #8622: FM-Towns_Zak_F1-F4.patch

File FM-Towns_Zak_F1-F4.patch, 1.3 KB (added by SF/tobigun, 17 years ago)
  • ../../engines/scumm/verbs.cpp

     
    557557                        _mouseAndKeyboardStat = numpad[_mouseAndKeyboardStat - '0'];
    558558                }
    559559
     560                if (_game.platform == Common::kPlatformFMTowns && _game.id == GID_ZAK) {
     561                        if(_mouseAndKeyboardStat >= 315 && _mouseAndKeyboardStat <= 318) {
     562                                // Hack: Handle switch to person with F1-F4.
     563                                // This feature is not available with the UNZ FM-Towns Emulator and it is not coded
     564                                // into any of the Zak256 scripts, so it is probable that is not supported by the
     565                                // original interpreter.
     566                                int fKey = _mouseAndKeyboardStat - 314;
     567                                int switchSlot = getVerbSlot(36, 0);
     568                                // check if switch-verb is enabled
     569                                if (_verbs[switchSlot].curmode == 1) {
     570                                        // check if person is available (see script[23] from ZAK_FM and script[4] from ZAK_VGA)
     571                                        // Zak: Var[144 Bit 15], Annie: Var[145 Bit 0], Melissa: Var[145 Bit 1], Leslie: Var[145 Bit 2]
     572                                        if (!readVar(0x890E + fKey)) {
     573                                                runInputScript(1, 36 + fKey, 0);
     574                                        }
     575                                }
     576                                return;
     577                        }
     578                }
     579
    560580                // Generic keyboard input
    561581                runInputScript(4, _mouseAndKeyboardStat, 1);
    562582        } else if (_mouseAndKeyboardStat & MBS_MOUSE_MASK) {