From e616b4c4b6fdb8d4fa31ebd14a9c3a4817b66db5 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 15 Feb 2007 10:40:20 +0000 Subject: Fix for bug #1328146: MANIACNES: Shortcut keys are incorrectly configured svn-id: r25601 --- engines/scumm/script_v2.cpp | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) (limited to 'engines') diff --git a/engines/scumm/script_v2.cpp b/engines/scumm/script_v2.cpp index 7322a8f9d9..d0be273547 100644 --- a/engines/scumm/script_v2.cpp +++ b/engines/scumm/script_v2.cpp @@ -861,16 +861,26 @@ void ScummEngine_v2::o2_verbOps() { vs->curRect.left = x; vs->curRect.top = y; - // FIXME: again, this map depends on the language of the game. + // FIXME: these keyboard map depends on the language of the game. // E.g. a german keyboard has 'z' and 'y' swapped, while a french // keyboard starts with "awert", etc. - const char keyboard[] = { - 'q','w','e','r','t', - 'a','s','d','f','g', - 'z','x','c','v','b' - }; - if (1 <= slot && slot <= ARRAYSIZE(keyboard)) - vs->key = keyboard[slot - 1]; + if (_game.platform == Common::kPlatformNES) { + static const char keyboard[] = { + 'q','w','e','r', + 'a','s','d','f', + 'z','x','c','v' + }; + if (1 <= slot && slot <= ARRAYSIZE(keyboard)) + vs->key = keyboard[slot - 1]; + } else { + static const char keyboard[] = { + 'q','w','e','r','t', + 'a','s','d','f','g', + 'z','x','c','v','b' + }; + if (1 <= slot && slot <= ARRAYSIZE(keyboard)) + vs->key = keyboard[slot - 1]; + } // It follows the verb name loadPtrToResource(rtVerb, slot, NULL); -- cgit v1.2.3