TTY: Add compile-time option for tile data hinting
Several people have asked if 3.6.0 supports playing with tiles on a public server. Because there's no way for the user's end to know what that white @ is, this adds special console escape codes for tile hinting. The idea was originally a patch called TelnetTiles by Justin Hiltscher, but this expanded version comes via NAO, where it's been in use for years. This is basically an interim hack, which should go away when/if we support actual client-server model.
This commit is contained in:
@@ -439,6 +439,33 @@ typedef unsigned char uchar;
|
||||
* bugs left here.
|
||||
*/
|
||||
|
||||
/* TTY_TILES_ESCCODES: Enable output of special console escape codes
|
||||
* which act as hints for external programs such as EbonHack.
|
||||
*
|
||||
* Only for TTY_GRAPHICS.
|
||||
*
|
||||
* All of the escape codes are in the format ESC [ N z, where N can be
|
||||
* one or more positive integer values, separated by semicolons.
|
||||
* For example ESC [ 1 ; 0 ; 120 z
|
||||
*
|
||||
* Possible codes are:
|
||||
* ESC [ 1 ; 0 ; n ; m z Start a glyph (aka a tile) number n, with flags m
|
||||
* ESC [ 1 ; 1 z End a glyph.
|
||||
* ESC [ 1 ; 2 ; n z Select a window n to output to.
|
||||
* ESC [ 1 ; 3 z End of data. NetHack has finished sending data,
|
||||
* and is waiting for input.
|
||||
*
|
||||
* Whenever NetHack outputs anything, it will first output the "select window"
|
||||
* code. Whenever NetHack outputs a tile, it will first output the "start
|
||||
* glyph" code, then the escape codes for color and the glyph character
|
||||
* itself, and then the "end glyph" code.
|
||||
*
|
||||
* To compile NetHack with this, add tile.c to WINSRC and tile.o to WINOBJ
|
||||
* in the hints file or Makefile.
|
||||
* Set boolean option vt_tiledata in your config file to turn this on.
|
||||
* Note that gnome-terminal at least doesn't work with this. */
|
||||
/* #define TTY_TILES_ESCCODES */
|
||||
|
||||
/* #define STATUS_VIA_WINDOWPORT */ /* re-work of the status line
|
||||
updating process */
|
||||
/* #define STATUS_HILITES */ /* support hilites of status fields */
|
||||
@@ -459,6 +486,12 @@ typedef unsigned char uchar;
|
||||
|
||||
/* End of Section 4 */
|
||||
|
||||
#ifdef TTY_TILES_ESCCODES
|
||||
# ifndef USE_TILES
|
||||
# define USE_TILES
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include "global.h" /* Define everything else according to choices above */
|
||||
|
||||
#endif /* CONFIG_H */
|
||||
|
||||
@@ -259,6 +259,9 @@ struct instance_flags {
|
||||
#ifdef LAN_FEATURES
|
||||
boolean lan_mail; /* mail is initialized */
|
||||
boolean lan_mail_fetched; /* mail is awaiting display */
|
||||
#endif
|
||||
#ifdef TTY_TILES_ESCCODES
|
||||
boolean vt_tiledata; /* output console codes for tile support in TTY */
|
||||
#endif
|
||||
boolean wizweight; /* display weight of everything in wizard mode */
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user