Skip to content

BURIED: Add keymapper support#6793

Merged
sev- merged 1 commit intoscummvm:masterfrom
aunnoman1:buried-keymapper
Jul 21, 2025
Merged

BURIED: Add keymapper support#6793
sev- merged 1 commit intoscummvm:masterfrom
aunnoman1:buried-keymapper

Conversation

@aunnoman1
Copy link
Contributor

No description provided.

@OMGPizzaGuy OMGPizzaGuy added the GSoC Part of a Google Summer of Code project label Jul 5, 2025
_vm->_sound->timerCallback();
delete video;

keymapper->getKeymap("cutscene")->setEnabled(false);
Copy link
Member

Choose a reason for hiding this comment

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

Would it make sense to create a helper function that enables and disables keymaps using an enum?

Copy link
Member

Choose a reason for hiding this comment

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

Indeed, something like

void enableCutSceneKeymap(bool enable) {
     keymapper->getKeymap("cutscene")->setEnabled(enable);
     keymapper->getKeymap("buried-default")->setEnabled(!enable);
     ...

And then you call here enableCutSceneKeymap(false)

act->addDefaultInputMapping("JOY_A");
engineKeyMap->addAction(act);

// I18N: This action refers to the control key.
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
// I18N: This action refers to the control key.
// I18N: This action refers to the control key on the keyboard.

act->addDefaultInputMapping("JOY_A");
inventoryKeyMap->addAction(act);

// I18N: The game has an inventory with a list of biochips. This action is used to switch the equiped biochip to AI biochip.
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
// I18N: The game has an inventory with a list of biochips. This action is used to switch the equiped biochip to AI biochip.
// I18N: The game has an inventory with a list of biochips. This action is used to switch the equipped biochip to the AI biochip.

Ditto for the other biochip actions.

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
// I18N: The game has an inventory with a list of biochips. This action is used to switch the equiped biochip to AI biochip.
// I18N: The game has an inventory with a list of biochips. This action is used to switch the equipped biochip to the Artificial Intelligence biochip.

act = new Action("SAVE", _("Save game"));
act->setCustomEngineActionEvent(kActionSave);
act->addDefaultInputMapping("C+s");
act->addDefaultInputMapping("JOY_LEFT");
Copy link
Member

Choose a reason for hiding this comment

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

This clashes with the movement actions.

act->setCustomEngineActionEvent(kActionLoad);
act->addDefaultInputMapping("C+l");
act->addDefaultInputMapping("C+o");
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.

This clashes with the movement actions.

act = new Action("AICOMMENTS", _("Replay last AI comment"));
act->setCustomEngineActionEvent(kActionAIComment);
act->addDefaultInputMapping("SPACE");
act->addDefaultInputMapping("JOY_A");
Copy link
Member

Choose a reason for hiding this comment

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

This clashes with the left click action.

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.

_vm->_sound->timerCallback();
delete video;

keymapper->getKeymap("cutscene")->setEnabled(false);
Copy link
Member

Choose a reason for hiding this comment

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

Indeed, something like

void enableCutSceneKeymap(bool enable) {
     keymapper->getKeymap("cutscene")->setEnabled(enable);
     keymapper->getKeymap("buried-default")->setEnabled(!enable);
     ...

And then you call here enableCutSceneKeymap(false)

act->addDefaultInputMapping("C+q");
gameKeyMap->addAction(act);

act = new Action("AICOMMENTS", _("Replay last AI comment"));
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("AICOMMENTS", _("Replay last AI comment"));
// AI is Artificial Intelligence
act = new Action("AICOMMENTS", _("Replay last AI comment"));

act->addDefaultInputMapping("JOY_A");
inventoryKeyMap->addAction(act);

// I18N: The game has an inventory with a list of biochips. This action is used to switch the equiped biochip to AI biochip.
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
// I18N: The game has an inventory with a list of biochips. This action is used to switch the equiped biochip to AI biochip.
// I18N: The game has an inventory with a list of biochips. This action is used to switch the equipped biochip to the Artificial Intelligence biochip.

@aunnoman1 aunnoman1 force-pushed the buried-keymapper branch 4 times, most recently from 07970ed to b9960d4 Compare July 10, 2025 21:37
@aunnoman1 aunnoman1 marked this pull request as ready for review July 10, 2025 21:41
@aunnoman1 aunnoman1 requested review from ccawley2011 and sev- July 10, 2025 21:41
Copy link
Member

@OMGPizzaGuy OMGPizzaGuy left a comment

Choose a reason for hiding this comment

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

Looks good to me

@sev-
Copy link
Member

sev- commented Jul 21, 2025

Thank you!

@sev- sev- merged commit 965027b into scummvm:master Jul 21, 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