M-HT / SR

A project to statically recompile following games to create Windows or Linux (x86 or arm) versions of the games - Albion, X-Com: UFO Defense (UFO: Enemy Unknown), X-Com: Terror from the Deep, Warcraft: Orcs & Humans, Septerra Core: Legacy of the Creator, Battle Isle 3: Shadow of the Emperor
305 stars 17 forks source link

Albion: Alt-keycodes #36

Closed IS4Code closed 2 years ago

IS4Code commented 2 years ago

This is a problem in non-English versions of the game where you have to input non-ASCII characters in dialogue, like "Porenöl" in the German version or, my favourite, "důkazy" in the Czech version. Typically this has been solved by using alt-128 and above to find the correct character.

Unfortunately this doesn't work in the port (but it did in DOSBox and DOS of course), so there's no way to input the characters in the port, as far as I know. Having this fixed would be a good improvement.

I was thinking about other improvements to character input like clipboard support, but since the game uses a non-standard character set anyway, it won't help much.

M-HT commented 2 years ago

Non-ASCII characters can be inputed in the SDL1 version, but not in the SDL2 version. Easiest way is to set your system keyboard layout to german/czech/french and input non-ASCII characters directly.

IS4Code commented 2 years ago

That is good to know, unfortunately the charset is not compatible at all. The German and French versions use a custom shared charset different from ANSI code pages, and other fan-made versions could be also varying.

Any way to fix it in SDL2?

M-HT commented 2 years ago

That is good to know, unfortunately the charset is not compatible at all. The German and French versions use a custom shared charset different from ANSI code pages, and other fan-made versions could be also varying.

Did you try it, before talking about incompatibilities?

You can check the code for yourself:

Any way to fix it in SDL2?

First of all, what's wrong with the SDL1 version ? And the only way to "fix" it in SDL2, would be to implement keyboard layouts (as they work in DOS). The functionality I'm using in SDL1 was removed in SDL2.

IS4Code commented 2 years ago

Sorry, I did not realize there is actually a new version with these updates. I have been only checking for new versions on the Pandora forum, not on GitHub. I wasn't aware of this mapping being in, and it's definitely really nice to have. It's not so urgent then, but it would still be useful in case of a new language or font. Maybe having it configurable could work?

I have checked the SDL1 version now, and it works fine but with one issue: when I type a character like ž for example using the ˇ and z keys, it produces "=ž". This affects all characters, so I have no way of typing ť, ď etc. For some reason, ´ and y creates "=y" and not "=ý" as I would expect. Again, a nuisance, but not game-breaking.

M-HT commented 2 years ago

I have checked the SDL1 version now, and it works fine but with one issue: when I type a character like ž for example using the ˇ and z keys, it produces "=ž". This affects all characters, so I have no way of typing ť, ď etc. For some reason, ´ and y creates "=y" and not "=ý" as I would expect. Again, a nuisance, but not game-breaking.

I never tried it on Windows, but it works in Linux. Does it work in DOS/DOSBox ? I tried it in Linux version of DOSBox and it doesn't work.

IS4Code commented 2 years ago

Yeah I am testing it on Windows; can't check on Linux at the moment.

In DOSBox with the normal version of the game, I can't output any of the non-ASCII characters normally on keyboard, only via alt-codes.

M-HT commented 2 years ago

I created a new release which contains the fix.