Skip to content

SLUDGE: Add keymapper support #6693

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

Merged
merged 2 commits into from
Jun 15, 2025
Merged

Conversation

aunnoman1
Copy link
Contributor

No description provided.

@OMGPizzaGuy OMGPizzaGuy added the GSoC Part of a Google Summer of Code project label Jun 5, 2025
act = new Action(kStandardActionPause, _("Pause"));
act->setKeyEvent(KeyState(KEYCODE_ESCAPE, ASCII_ESCAPE));
act->addDefaultInputMapping("ESCAPE");
act->addDefaultInputMapping("JOY_START");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JOY_START and JOY_BACK are reserved for the Global Main Menu and Virtual Keyboard respectively, so should be avoided in game-specific keymaps.

act = new Action("SHOWFLOOR", _("DEBUG: Show floor"));
act->setKeyEvent(KeyState(KEYCODE_f, 'f'));
act->addDefaultInputMapping("f");
act->addDefaultInputMapping("JOY_RIGHT");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It shouldn't be necessary to add default joystick bindings for debug actions.


Keymap *gameKeyMap = new Keymap(Keymap::kKeymapTypeGame, gameId, gameDescr);
Keymap *debugKeyMap = new Keymap(Keymap::kKeymapTypeGame, "debug", _("Debug keymap"));
Keymap *controllerKeymap = new Keymap(Keymap::kKeymapTypeGame, "controller", _("Controller keymap for menus"));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you clarify what "controller" means in this context?

act->addDefaultInputMapping("JOY_X");
gameKeyMap->addAction(act);

} else if (gameId == "tgttpoacs") {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a minigame located in the Arcade called "Wizard Warble" that uses some additional keys that aren't currently listed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You also need to press Enter to start the minigame where you look for the contact lens in the changing rooms.

@aunnoman1 aunnoman1 force-pushed the sludge-keymapper branch 2 times, most recently from 1994781 to fee2422 Compare June 11, 2025 22:48
Copy link
Member

@sev- sev- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be rebased. Please pay attention, that we added verbcoin2 as a new target

@@ -0,0 +1,2 @@
engines/sludge/detection_tables.h
engines/sludge/keymapper_tables.h
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing newline

Copy link
Member

@sev- sev- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added one small wish.


} else {
// Default keymap for other games
act = new Action(kStandardActionLeftClick, _("Left Click"));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add here something like

warning("Game-specific keymap is not defined. Using default SLUDGE engine keymap");

@sev-
Copy link
Member

sev- commented Jun 15, 2025

Thank you!

@sev- sev- merged commit 4f3db68 into scummvm:master Jun 15, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GSoC Part of a Google Summer of Code project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants