Conversation
|
I keep wondering if we are going to see keymapper support for individual Ags games that use custom keyboard keys to control, or worse, a combined keyboard and mouse setup. examples are gemini rue (keyboard only shooting segments), qfg2 remake (keyboard optional combat segments, admittedly not as important) graceward and stormwater (combined keyboard for movement and mouse for aiming setup - this has no good solution in android scummvm besides using keyboard+mouse even if the right keycodes were supported because the virtual gamepad touch zones occupy all the screen so you can use both at once, and very few physical gamepads have a touch zone), all of stranga games games (only keyboard, would make sense mapping to virtual gamepad, but you can't because the keycodes on the 'right side'' are marked as generic scummvm action and don't match), probably a lot I'm forgetting. I kind of wish for a 'advanced' escape hatch to map any keyboard keycode to any virtual controller key, that is, select both sides, not just map them to 'actions' (that are actually keycodes) that can often be wrong for engines with so many games. I shudder to think what would happen if a RPG maker engine reimplementation was added. |
What does that AGS request have to do with this pull request on the ACCESS engine? |
|
Well, I've seen key remapping being done for multiple engines this last few months but I didn't see it for individual games in a engine that have different keycodes used. I was wondering if that is at all going to be a concern in this multi engine effort, because if hypothetically a Ags PR (or really, any widely used engine) is being worked on, I don't want anyone involved being unware about this issue where the games that most need usable remaps (because they're fully keyboard controlled for example)... don't get them. Or get them with names like 'skip' (for opening options, esc keycode) because well, it's skip in scumm. I also don't think this is only a issue for AGS, it's simply the game library I know more of so I could give examples. I would expect it to happen regularly in game engines with a lot of games of PC origin. I think director probably has some, and maybe wintermute. |
|
Please. don't hijack PRs for feature requests for other engines, especially considering this is a GSoC PR. |
engines/access/events.cpp
Outdated
| _keyCode = keycode; | ||
| } | ||
|
|
||
| void EventsManager::ActionControl(Common::CustomEventType action, bool isKeyDown) { |
There was a problem hiding this comment.
This must be renamed to conform to our naming conventions
engines/access/room.cpp
Outdated
| handleCommand(keyState.keycode - Common::KEYCODE_F1); | ||
| } else if (_vm->_events->getAction(action)) { | ||
| if (action >= kActionLook && action <= kActionPause) | ||
| handleCommand(action - kActionLook + 1); |
There was a problem hiding this comment.
This looks very dangerous. Why not create a mapping table or a hashmap instead?
73fe36b to
c8eb79b
Compare
engines/access/metaengine.cpp
Outdated
| act = new Action("PAUSE", _("General Main Menu")); | ||
| act->setCustomEngineActionEvent(kActionPause); | ||
| act->addDefaultInputMapping("F10"); | ||
| act->addDefaultInputMapping("JOY_START"); |
There was a problem hiding this comment.
This clashes with the Global Main Menu action.
| @@ -1 +1,2 @@ | |||
| engines/access/resources.cpp | |||
| engines/access/metaengine.cpp | |||
engines/access/metaengine.cpp
Outdated
| act->addDefaultInputMapping("JOY_START"); | ||
| engineKeyMap->addAction(act); | ||
|
|
||
| act = new Action("SKIP", _("Skip Movie")); |
There was a problem hiding this comment.
I had an impression that we already fixed all to the Sentence Case, no? Why are you reintroducing Title Case over all of these actions...
c8eb79b to
ee0484a
Compare
engines/access/access.h
Outdated
|
|
||
| struct AccessActionCode { | ||
| ACCESSActions _action; | ||
| int _code; |
There was a problem hiding this comment.
could be int8 - which would reduce the size on some systems.
| int checkMouseBox1(Common::Array<Common::Rect> &rects); | ||
|
|
||
| bool isKeyMousePressed(); | ||
| bool isKeyActionMousePressed(); |
There was a problem hiding this comment.
a few of these changed methods could be const
There was a problem hiding this comment.
had a look and didn't notice any which could be const. could you please specifiy which ones? Thank you
|
This looks pretty good to me at this point. |
ee0484a to
f1c233b
Compare
|
Thank you! |
No description provided.