Skip to content

EFH: Add complete keymapper support#6814

Merged
sev- merged 1 commit intoscummvm:masterfrom
aunnoman1:efh-keymapper
Aug 18, 2025
Merged

EFH: Add complete keymapper support#6814
sev- merged 1 commit intoscummvm:masterfrom
aunnoman1:efh-keymapper

Conversation

@aunnoman1
Copy link
Contributor

No description provided.

@OMGPizzaGuy OMGPizzaGuy added the GSoC Part of a Google Summer of Code project label Jul 15, 2025
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.

I made a cursory review, and this PR changes way more than required. I explained how to avoid relying on global variables in the code, thus, it will lead to much smaller code changes.

I'll continue my review once this is addressed.

displayRawDataAtPos(winSeqSubFilesArray1[0], 0, 0);
input = getInput(32);
if (input != Common::KEYCODE_ESCAPE) {
getInput(32);
Copy link
Member

Choose a reason for hiding this comment

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

I do not like this function with side-effect, e.g. that it changes global state.

Instead, please keep it just as it was, e.g.:

intpu = getInput(32);

if (input != kActionSkipVideo)

etc.

Just keep it changing _customAction as it does now, but also return this value for code readability.


setKeymap(kKeymapMenu);

waitForKey();
Copy link
Member

Choose a reason for hiding this comment

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

Same here, make waitForKey() also returning _customAction, so you could write if (input == kActionYes). The current code is confusing.

@aunnoman1 aunnoman1 marked this pull request as draft July 21, 2025 12:59
@aunnoman1 aunnoman1 force-pushed the efh-keymapper branch 2 times, most recently from 513649f to a7cc63b Compare July 28, 2025 12:10
@aunnoman1 aunnoman1 marked this pull request as ready for review July 28, 2025 12:11
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.

Thank you! Much cleaner as you see.

However, now the PR requires rebasing

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

act = new Action("CHARACTER1", _("Select character 1"));
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("CHARACTER1", _("Select character 1"));
// Character is a hero in-game
act = new Action("CHARACTER1", _("Select character 1"));

E.g. it is not a symbol. And add similar message to the translators in other places, just copy/paste

@sev-
Copy link
Member

sev- commented Aug 18, 2025

Thank you!

@sev- sev- merged commit 01dcad9 into scummvm:master Aug 18, 2025
10 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.

3 participants