diff options
author | Max Horn | 2003-09-06 23:29:35 +0000 |
---|---|---|
committer | Max Horn | 2003-09-06 23:29:35 +0000 |
commit | 1f59b15f91998bf0b2fdd3fe452fbaca947d67ba (patch) | |
tree | 48cee538e7ad49a49bd929f3fa00237c3fd1f74c | |
parent | c41936e2329d6f1dd3904435a477becd930fc211 (diff) | |
download | scummvm-rg350-1f59b15f91998bf0b2fdd3fe452fbaca947d67ba.tar.gz scummvm-rg350-1f59b15f91998bf0b2fdd3fe452fbaca947d67ba.tar.bz2 scummvm-rg350-1f59b15f91998bf0b2fdd3fe452fbaca947d67ba.zip |
implemented FOA keyboard fighting
svn-id: r10052
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | README | 6 | ||||
-rw-r--r-- | scumm/script.cpp | 5 | ||||
-rw-r--r-- | scumm/scummvm.cpp | 29 |
4 files changed, 23 insertions, 20 deletions
@@ -11,7 +11,8 @@ For a more comprehensive changelog for the latest experimental CVS code, see: - Adlib GM emulation table revamped, providing more accurate software MIDI - Added full and partial sound looping to Zak McKracken FmTowns - Default Makefile now uses configure script, old one is Makefile.noconf -- Improved compression of Indy4 - Fate of Atlantis and Simon the Sorcerer 2 sound files +- Improved compression of Fate of Atlantis and Simon the Sorcerer 2 sound files +- Keyboard fighting in Fate of Atlantis now works 0.5.1 (2003-08-06) - Rewrote Beneath a Steel Sky savegame code (see note in READMEs 'Known Bugs') @@ -185,10 +185,6 @@ the section on Reporting Bugs. Monkey Island 1 (EGA): - MIDI support requires the Roland update from LucasArts - Indiana Jones and the Fate of Atlantis: - - Keyboard fighting does not work. ScummVM now defaults to - using mouse fighting. - Sam and Max: - Highway subgame does not behave correctly. @@ -215,7 +211,7 @@ the section on Reporting Bugs. Curse of Monkey Island - The "Pirate Song" scene does not play correctly - - + All CD games: - If you are experiencing random crashes, and your game plays music from CD, you have encountered a Windows bug. diff --git a/scumm/script.cpp b/scumm/script.cpp index de1bc96afd..b1b7e8cbd5 100644 --- a/scumm/script.cpp +++ b/scumm/script.cpp @@ -573,11 +573,6 @@ void Scumm::writeVar(uint var, int value) { var &= 0x7FFF; checkRange(_numBitVariables - 1, 0, var, "Bit variable %d out of range(w)"); - // FIXME: Enable Indy4 mousefighting by default. - // is there a better place to put this? - if (_gameId == GID_INDY4 && var == 107 && vm.slot[_currentScript].number == 1) - value = 1; - if (value) _bitVars[var >> 3] |= (1 << (var & 7)); else diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp index 17e1812216..edb708e29a 100644 --- a/scumm/scummvm.cpp +++ b/scumm/scummvm.cpp @@ -1497,7 +1497,7 @@ void Scumm::parseEvents() { sprintf(_saveLoadName, "Quicksave %d", _saveLoadSlot); _saveLoadFlag = (event.kbd.flags == OSystem::KBD_ALT) ? 1 : 2; _saveLoadCompatible = false; - } else if (event.kbd.flags==OSystem::KBD_CTRL) { + } else if (event.kbd.flags == OSystem::KBD_CTRL) { if (event.kbd.keycode == 'f') _fastMode ^= 1; else if (event.kbd.keycode == 'g') @@ -1513,16 +1513,27 @@ void Scumm::parseEvents() { // because that's what MI2 looks for in // its "instant win" cheat. _keyPressed = event.kbd.keycode + 154; - // FIXME support in game screen - // this remaps F1 to F5 for comi - } else if (event.kbd.ascii == 315 && _gameId == GID_CMI) + } else if (event.kbd.ascii == 315 && _gameId == GID_CMI) { + // FIXME: support in-game menu screen. For now, this remaps F1 to F5 in COMI _keyPressed = 319; - // don't let game have arrow keys as we currently steal them - // for keyboard cursor control - // this fixes bug with up arrow (273) corresponding to - // "instant win" cheat in MI2 mentioned above - else if (event.kbd.ascii < 273 || event.kbd.ascii > 276) + } else if (_gameId == GID_INDY4 && event.kbd.ascii >= '0' && event.kbd.ascii <= '9') { + // To support keyboard fighting in FOA, we need to remap the number keys. + // FOA apparently expects PC scancode values (see script 46 if you want + // to know where I got these numbers from). + static const int numpad[10] = { + '0', + 335, 336, 337, + 331, 332, 333, + 327, 328, 329 + }; + _keyPressed = numpad[event.kbd.ascii - '0']; + } else if (event.kbd.ascii < 273 || event.kbd.ascii > 276) { + // don't let game have arrow keys as we currently steal them + // for keyboard cursor control + // this fixes bug with up arrow (273) corresponding to + // "instant win" cheat in MI2 mentioned above _keyPressed = event.kbd.ascii; // Normal key press, pass on to the game. + } break; case OSystem::EVENT_MOUSEMOVE: |