MestreLion / roguepc

Port of original PC-DOS Epyx Rogue to modern platforms
27 stars 6 forks source link

fakedos() should exit on non-ASCII keys (F1...F12, directional keys, etc) #4

Open MestreLion opened 9 years ago

MestreLion commented 9 years ago

Currently the only way to exit fakedos() is to type a fake rogue command, but the original also returned to game on any non-ASCII key press. The culprit is that now getinfo() ignores non-ASCII keys instead of aborting entry, which is suitable for all other text entries like Rogue's Name on title screen, naming potions and scrolls, etc, but it breaks fakedos() original functionality.

A possible solution is to split getinfo() in 2 methods: one for "regular" text entries, possibly a thin wrapper to curse's getnstr(), and another one dedicated to fakedos, reverted to original behavior.