Files
nethack/win/gnome
nethack.allison 8fc01eb6b1 window port change - putmixed() (trunk only)
Add putmixed() to the window port. It allows map symbols to
be included in the string by encoding them in a unique fashion.
This was done because Unicode symbols, for instance, could be
longer than the size of a char.

The encoding of the map symbols in this patch is done by
prefixing a glyph value with \GXXXX, where XXXX is a
random value for the current game. The reason for the random
prefix is to minimize the possibility that a player can trigger
the escape sequence processing within text under their control
(dog names, etc.) the way they could if the sequence was fixed
in the source code. The random prefix remains the same throughout
the lifetime of a game because message window strings are
saved in the save file.

(There was actually a bug present because of the embedded
character even before the recent symbol changes, because if
someone was using a  different set of characters between games,
the saved messages would reflect the original characters, rather
than the current. That bug was introduced with the ability to
save messages to the savefile.)

A window port does not have to supply an XXX_putmixed() routine,
it can use genl_putmixed() which uses the old behavior of
embedding the sequence as a character within the string
and calling putstr(). genl_putmixed() takes care of the decoding
of the escape sequence.

This also #ifdef's out code in pager.c for converting a glyph
to a character, and uses mapglyph() to do that instead. Does
anyone see a problem with doing that through mapglyph instead
of repeating similar code within pager.c?
2006-10-17 23:06:31 +00:00
..
2005-11-26 02:34:23 +00:00
2002-01-05 21:06:01 +00:00
2002-01-05 21:06:01 +00:00

This directory contains the windowing code written for GnomeHack. The NetHack
devteam is in the process of making it part of the normal distribution.  
It should be noted that this is still work in progress and that there are
still problems with this code.  So use at your own risk.  Of course any
contributions, especially bug fixes, are more than welcome!

These files are based on the files from GnomeHack 1.0.5 by Erik Andersen.
Some files have been renamed to fit into 8.3 name constraints (yuk!).
These are:

	GnomeHack.h			gnomeprv.h
	GnomeHackAskStringDialog.c	gnaskstr.c
	GnomeHackAskStringDialog.h	gnaskstr.h
	GnomeHackBind.c			gnbind.c
	GnomeHackBind.h			gnbind.h
	GnomeHackGlyph.c		gnglyph.c
	GnomeHackGlyph.h		gnglyph.h
	GnomeHackMainWindow.c		gnmain.c
	GnomeHackMainWindow.h		gnmain.h
	GnomeHackMapWindow.c		gnmap.c
	GnomeHackMapWindow.h		gnmap.h
	GnomeHackMenuWindow.c		gnmenu.c
	GnomeHackMenuWindow.h		gnmenu.h
	GnomeHackMessageWindow.c	gnmesg.c
	GnomeHackMessageWindow.h	gnmesg.h
	GnomeHackPlayerSelDialog.c	gnplayer.c
	GnomeHackPlayerSelDialog.h	gnplayer.h
	GnomeHackSettings.c		gnopts.c
	GnomeHackSettings.h		gnopts.h
	GnomeHackSignals.c		gnsignal.c
	GnomeHackSignals.h		gnsignal.h
	GnomeHackStatusWindow.c		gnstatus.c
	GnomeHackStatusWindow.h		gnstatus.h
	GnomeHackTextWindow.c		gntext.c
	GnomeHackTextWindow.h		gntext.h
	GnomeHackYesNoDialog.c		gnyesno.c
	GnomeHackYesNoDialog.h		gnyesno.h

Other files have been removed because we don't or can't use them (yet).

	Makefile.am
	Makefile.in
	gnomehack.desktop
	gnomehack.desktop.in

NetHack currently doesn't use autoconf, so the setup for that has not
made the translation.

Note:  All loss in style, elegance, and readability is entirely our fault
and not Erik's.