Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SCUMM: Extend Ctrl handling to all the games on versions 3-7 #3331

Merged
merged 1 commit into from Sep 1, 2021

Conversation

@orgads
Copy link
Contributor

@orgads orgads commented Aug 31, 2021

Tested with Loom and The Dig. It seems to be consistent.

Sam&Max seems to have different mapping for Ctrl. The DOS version
has the following actions:

Ctrl-I: Rotates the current action
Ctrl-J: Switches to Joystick Mode
Ctrl-K: Shows memory stats
Ctrl-C: Prompts to quit
Ctrl-M: Switches to Mouse Mode

Anyway, since it doesn't break anything, I did not add an exclusion for it.

@eriktorbjorn
Copy link
Member

@eriktorbjorn eriktorbjorn commented Aug 31, 2021

Unless I messed up while testing, this makes it possible to switch between the three kids in Maniac Mansion with Ctrl+A, Ctrl+B and Ctrl+C. I can't do that when I run the original in DOSBox. There, it's F1, F2 and F3 instead, which already works in ScummVM even without this change.

As mentioned in my old pull request, outside of debug modes the games I could verify that use Ctrl+key for anything are:

  • Monkey Island 1 and 2 "ultimate talkies" use it for various settings.
  • Monkey Island 1 uses Ctrl+W for an instant win cheat. I've verified this with the DOS CD, DOS VGA and Macintosh versions. Presumably it's also in the DOS EGA version, but I don't have that. Note that the current code only checks GID_MONKEY, not GID_MONKEY_EGA and GID_MONKEY_VGA.
  • The EGA, VGA and FM Towns versions of Loom print version information on Ctrl+V. Apparently the Mac and PC-Engine versions don't?
  • The "Passport to Adventure" and Monkey Island 1 demos also print version information on Ctrl+V.

Maybe it should depend on SCUMM version? According to my earlier notes, these games span versions 3-5.

@orgads
Copy link
Contributor Author

@orgads orgads commented Aug 31, 2021

It worked for me on DOTT, CMI, FT, and The Dig, which are 6-8.

I just tested Maniac Mansion on Dosbox, and indeed Ctrl+Key doesn't do anything, except Ctrl+M, which acts like pressing Enter. So I'll limit it to _game.version >= 3.

@orgads
Copy link
Contributor Author

@orgads orgads commented Aug 31, 2021

hmmm... Actually Sam&Max seems to behave differently. On Dosbox Ctrl-I switches between actions, and I brings up the inventory... Also, Ctrl-K shows memory usage (Heap 414K, ems 2000K). These don't work with the current mapping. And some of the items I included in the comment are actually handled by ScummVM before reaching this point.

@orgads
Copy link
Contributor Author

@orgads orgads commented Aug 31, 2021

Wait before merging, needs more tests... And the commit message is wrong now.

Tested with Loom and The Dig. It seems to be consistent.

Sam&Max seems to have different mapping for Ctrl. The DOS version
has the following actions:

Ctrl-I: Rotates the current action
Ctrl-J: Switches to Joystick Mode
Ctrl-K: Shows memory stats
Ctrl-C: Prompts to quit
Ctrl-M: Switches to Mouse Mode

Anyway, since it doesn't break anything, I did not add an exclusion for it.
@orgads orgads changed the title SCUMM: Extend Ctrl handling to all the games SCUMM: Extend Ctrl handling to all the games on versions 3-7 Sep 1, 2021
@orgads
Copy link
Contributor Author

@orgads orgads commented Sep 1, 2021

Ready for review.

@bluegr
Copy link
Member

@bluegr bluegr commented Sep 1, 2021

Thanks! Clean implementation, which adds proper handling for control key combos in newer SCUMM versions. Thanks for testing this with all SCUMM games

Merging

@bluegr bluegr merged commit ec3681a into scummvm:master Sep 1, 2021
7 checks passed
@orgads orgads deleted the scumm-ctrl branch Sep 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants