Skip to content

SHERLOCK: Add keymapper support#6825

Merged
sev- merged 1 commit intoscummvm:masterfrom
aunnoman1:sherlock-keymapper
Aug 21, 2025
Merged

SHERLOCK: Add keymapper support#6825
sev- merged 1 commit intoscummvm:masterfrom
aunnoman1:sherlock-keymapper

Conversation

@aunnoman1
Copy link
Contributor

No description provided.

@aunnoman1 aunnoman1 force-pushed the sherlock-keymapper branch from c36c655 to eb1863e Compare July 22, 2025 17:42
@sev- sev- added the GSoC Part of a Google Summer of Code project label Jul 24, 2025
@aunnoman1 aunnoman1 marked this pull request as draft July 25, 2025 23:23
@OMGPizzaGuy
Copy link
Member

Cool work. Considering the size of this I would like more eyes on it, but I think it's pretty good overall.

@sev- sev- requested a review from Strangerke August 10, 2025 08:05
@aunnoman1 aunnoman1 force-pushed the sherlock-keymapper branch 2 times, most recently from 8fd6df5 to fb9fad8 Compare August 10, 2025 16:13
@aunnoman1 aunnoman1 marked this pull request as ready for review August 10, 2025 16:16
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 my notes, mostly related to possible action variety reduction

act->addDefaultInputMapping("JOY_UP");
scalpelFilesKeymap->addAction(act);

act = new Action("DOWN", _("Scroll down"));
Copy link
Member

Choose a reason for hiding this comment

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

I am really wondering. Does it make sense to repeat these keys in every keymap? Perhaps move them to one, game level keymap?

act->addDefaultInputMapping("JOY_DOWN");
scalpelInvKeymap->addAction(act);

act = new Action("EXIT", _("Exit"));
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
act = new Action("EXIT", _("Exit"));
//
// INVENTORY KEYMAP
//
act = new Action("EXIT", _("Exit"));

So, there is a visual distinction between them. Do the same for other keymaps

String fileLabelPrefix = _("Save game slot");

for (int i = 0; i < 9; ++i) {
fileLabel[i] = fileLabelPrefix + String::format(" %d", i + 1);
Copy link
Member

Choose a reason for hiding this comment

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

Nope. not going to work for all languages. Rather, have the translatable label as "Save game slot %d". In some languages the number will be in the middle of the sentence

tattooFoolscapKeymap->addAction(act);

// I18N: (Game name: The Lost Files of Sherlock Holmes: The Case of the Rose Tattoo) cursor refers to the text cursor in the foolscap puzzle input field
act = new Action("UP", _("Move cursor Up"));
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't it be

Suggested change
act = new Action("UP", _("Move cursor Up"));
act = new Action("UP", _("Move cursor up"));

and below

tattooFilesNameKeymap->addAction(act);

// I18N: (Game name: The Lost Files of Sherlock Holmes: The Case of the Rose Tattoo) The game has a foolscap puzzle, where the player has to decode a hidden message on a piece of paper called a foolscap. this action is used to exit the puzzle
act = new Action("EXIT", _("Close foolscap puzzle"));
Copy link
Member

Choose a reason for hiding this comment

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

In general, does it matter which puzzle it is? Could it be just "Close puzzle"?

tattooPasswordKeymap->addAction(act);

// I18N: (Game name: The Lost Files of Sherlock Holmes: The Case of the Rose Tattoo) This action is used to go to the start of the password input field
act = new Action("GOSTART", _("Go to start of password"));
Copy link
Member

Choose a reason for hiding this comment

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

Similarly, could it be more generic, like "Go to the line start"? And then reused in other translatable strings?

act->addDefaultInputMapping("JOY_Y");
tattooTalkKeymap->addAction(act);

act = new Action("EXIT", _("Exit verb menu"));
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't it be generit "Exit" or "Close window"? So then we reduce number of translateable strings

@sev-
Copy link
Member

sev- commented Aug 21, 2025

Thank you!

@sev- sev- merged commit 369ef80 into scummvm:master Aug 21, 2025
10 checks passed
Keymap *animationKeymap = new Keymap(Keymap::kKeymapTypeGame, "animation", _("Animation keymappings"));
Keymap *scalpelScrollKeymap = new Keymap(Keymap::kKeymapTypeGame, "scalpel-scroll", _("Scroll keymappings"));
Keymap *scalpelKeymap = new Keymap(Keymap::kKeymapTypeGame, "scalpel", _("Main user interface keymappings"));
Keymap *scalpelDartsKeymap = new Keymap(Keymap::kKeymapTypeGame, "scalpel-darts", _("Darts minigame keymappings"));
Copy link
Member

Choose a reason for hiding this comment

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

scalpelDartsKeymap doesn't get added to keymaps, so this is unused and a memory leak

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