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:
nethack.allison
2005-01-09 23:35:52 +00:00
parent 64fe2e5af4
commit ee7064746f
4 changed files with 107 additions and 55 deletions
+8 -1
View File
@@ -217,5 +217,12 @@ extern COLORREF message_fg_color;
#define NH_A2W(a, w, cb) (strncpy((w), (a), (cb)))
#endif
#endif /* WINmswin_H */
/* map mode macros */
#define IS_MAP_FIT_TO_SCREEN(mode) ((mode)==MAP_MODE_ASCII_FIT_TO_SCREEN || \
(mode)==MAP_MODE_TILES_FIT_TO_SCREEN )
#define IS_MAP_ASCII(mode) ((mode)!=MAP_MODE_TILES && (mode)!=MAP_MODE_TILES_FIT_TO_SCREEN)
#endif /* WINMS_H */