Ticket #8621: FM-Towns_F5.patch

File FM-Towns_F5.patch, 1013 bytes (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 || _game.id == GID_INDY3)) {
     561                        // HACK: In the FM-Towns games Indy3 and Zak the most significant bit is set for special keys
     562                        // like F5 (=0x8005) or joystick buttons (mask 0xFE00, e.g. SELECT=0xFE40 for the save/load menu).
     563                        // Hence the distinction with (_mouseAndKeyboardStat < MBS_MAX_KEY) between mouse- and key-events is not applicable
     564                        // to this games, so we have to remap the special keys here.
     565                        if(_mouseAndKeyboardStat == 319) {
     566                                _mouseAndKeyboardStat = 0x8005;
     567                        }
     568                }
     569
    560570                // Generic keyboard input
    561571                runInputScript(4, _mouseAndKeyboardStat, 1);
    562572        } else if (_mouseAndKeyboardStat & MBS_MOUSE_MASK) {