implemented FOA keyboard fighting

svn-id: r10052
This commit is contained in:
Max Horn 2003-09-06 23:29:35 +00:00
parent c41936e232
commit 1f59b15f91
4 changed files with 23 additions and 20 deletions

3
NEWS
View File

@ -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')

6
README
View File

@ -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.

View File

@ -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

View File

@ -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;
} 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
else if (event.kbd.ascii < 273 || event.kbd.ascii > 276)
_keyPressed = event.kbd.ascii; // Normal key press, pass on to the game.
}
break;
case OSystem::EVENT_MOUSEMOVE: