AltGr-4 and alternate tiles in menus - trunk only (from <Someone>)
On Mon, 03 Jan 2005 12:04:29 +0000, <email deleted> wrote: > Dear NetHack win32 developers, > > This bug does not affect the win32 binaries that you distribute but it > does affect NetHack 3.4.3 if I build it from source. The difference may > be due to different compilers or whatever. I'm using mingw32-gcc v3.2 > > I don't quite understand what's going on (I never was much good at > win32 programming), but it appears that the WM_KEYDOWN message for > AltGr-4 is being translated into a WM_CHAR message with a wParam of > 128. I don't understand why that should be, but anyway. The problem > then occurs when NetHack casts wParam to char which, since char is > signed, gives -128. onListChar() then passes -128 to isdigit() which > causes the crash. The fix appears to be to simply drop the cast: Also > <email deleted> > Newsgroups: rec.games.roguelike.nethack > Subject: Changing tile set for item list? > Date: 1 Jan 2005 20:03:08 -0800 > <email deleted> > > I'm using the windows interface for Nethack 3.4, and I've successfully > changed the tileset used by changing defaults.nh. The only problem is, > the item list (i.e. The list that comes up when I press "i") still uses > the old tiles. Is there any way to change the list so it uses the new > tiles? I've searched the guidebook to no avail. I'm debating if it is > even possible. > > Thanks for the help, > -Zmann trunk patch: - menu: display custom tiles if map is not ASCII - menu: display '-'/'+'/'#' in place of a tile if map is ASCII - fix isdigit() crash on AltGr-4 with mingw It looks kinda weird with huge tiles (e.g. absurd96) but that could be just me. Comments/suggestions are welcome. -<Someone>
This commit is contained in:
@@ -86,6 +86,8 @@ win32gui: fixed copy/paste error in read registry settings function
|
||||
win32gui: improved calculation of the size of the menu window
|
||||
win32gui: made auto-arrange windows on/off option (it was reset automatically
|
||||
which was unintuitive and in some cases annoying
|
||||
win32gui: fix a possible crash with AltGr-4 WM_KEYDOWN handling
|
||||
win32gui: use whatever alternate tile set is loaded in the menus
|
||||
platforms that support hangup: SAFERHANGUP to avoid losing objects in transit
|
||||
between lists when hangup occurs, and also avoid cheats due to
|
||||
well-timed hangups to stop a long melee
|
||||
|
||||
Reference in New Issue
Block a user