GrimSqueaker / remc2

Recode Binary code of game Magic Carpet2 to C/C++ language(remake MC2 for any platform)
6 stars 0 forks source link

Additional keymappings/functions and documentation #63

Open GrimSqueaker opened 3 years ago

GrimSqueaker commented 3 years ago

Hi,

I have prepared a branch https://github.com/GrimSqueaker/remc2/tree/keymappings with two new keyboard shortcuts and one of which slightly modifies the keymapping.

SDL Window Grab: Via CTRL-F10 window grabbing can be enabled and disabled. I wanted this in the first place, because when playing in window mode the cursor can leave the window and playing is really hard. But the problem then on my box is, that when the game crashes Visual Studio code does not get back a mouse cursor and I cannot debug properly. This way I can now disable the grab. This is actually the same shortcut as DOSBOX uses for mouse grabbing.

WASD keys: In the past the default keymap did not bother me. But nowadays WASD is the default. So I map WASD to the arrow keys and to make it a bit easier I also map LSHIFT to RCTRL. This is disabled by default and can be enabled via CTRL-F11.

Do you have other ideas for improvements?

I know that the current implementation is sub-optimal. For one, the WASD mapping probably does not allow to use these letters in save game names. If you think that the WASD mapping makes sense, I would try to improve the implementation. I think I would like to avoid a freely configurable keymapping via config files, because it is not worth the effort. But at least it would make sense to document the keymappings (not just the new mappings). Maybe in the README.md or another .md? Or should we start writing some proper documentation? Doxygen or something similar?

Cheers, Sebastian

turican0 commented 3 years ago

Hi Seb, you're right, WASD is batter than arrows, some this this keys may be used.

D Options panel S Toggle stereo mode on/off

When saving I did not notice that the mapped keys could not be used. So far I would only deal with readme.md, oxyfen may be later. We can start from the readme in the project and from the original manual, Tom.

https://www.abandonwaredos.com/docs.php?sf=magiccarpet2readme.txt&st=manual&sg=Magic+Carpet+2%3A+The+Netherworlds&idg=2966

turican0 commented 3 years ago

Before anything changes keymapping please read code in procedure sub_17190, and etc. Tom.

GrimSqueaker commented 3 years ago

I will take a look and try to come up with a better solution. For the moment it is anyhow not the default.