Files
nethack/dat/symbols
nethack.allison 7f0f43e6f9 add some unicode support (trunk only)
This patch attempts to add some levels of unicode support
to NetHack.

The master on/off switch for any Unicode support is
defining UNICODE_SUPPORT in config.h. Currently
there is code support for two subsets of unicode support:

UNICODE_DRAWING

If UNICODE_DRAWING is defined, then the data
structures used to house drawing symbols are expanded
to the size of wchar_t, big enough to hold unicode characters.
A typdef called `nhsym' is involved and if UNICODE_DRAWING
is defined, it is wchar_t, otherwise it is uchar.

UNICODE_WIDEWINPORT

If UNICODE_WIDEWINPORT is defined, then the data
structures inside the window port are expanded to the size of
wchar_t, big enough to hold unicode characters.  Both map
symbols and text within the window port are expanded, in order
for potential support for displaying multinational characters some
day, but this patch only provides viewing of map symbols.
A typdef called `nhwchar' is involved and if UNICODE_WIDEWINPORT
is defined, it is wchar_t, otherwise it is char.

The only window port with code support for UNICODE_WIDEWINPORT
currently is the TTY port.  Don't enable UNICODE_WIDEWINPORT
unless:
- it is a TTY port
- the underlying platform specific routines can
handle the larger data structures.

Don't enable UNICODE_SUPPORT unless:
- your compiler can handle wchar_t.
- your compiler can accept L'a' characters.
- your compiler can accept L"wide" strings.

Note that if your compiler can handle the above, you could
enable the larger data structures (currently if TTY) even if your
platform can't actually display unicode or UTF-8, by messing
with u_putch() in win/tty/wintty.c to only deal regular chars.
That should be the only function that actually pushes wide characters
out to the display.

If you enable UNICODE_SUPPORT, and your platform is capable
you will need to turn on the unicode run-time option to be able to
load unicode character sets from the symbol file, to be able to
push unicode characters to the display. You'll also want to load
a unicode symbol set once the unicode option is toggled on. In
a config file you would do that via these two lines:
OPTIONS=unicode
OPTIONS=symset:Unicode_non_US

The repository was stamped with NETHACK_PRE_UNICODE
prior to applying this patch, and stamped with
NETHACK_POST_UNICODE afterwards. The code differences
between those two tagged versions are this patch.
2006-10-17 23:55:42 +00:00

528 lines
15 KiB
Plaintext

# Symbol sets for use in NetHack's text-based display.
#
# IBMgraphics works by specifying special characters which reside
# outside the range of normal printable characters. It has subsets
# for use where the internal code page is different than the one
# used by US ASCII (437) and has some different special characters.
#
# DECgraphics works by switching back and forth between two fonts,
# where the alternate one substitutes special characters in place
# of ordinary printable characters in the lowercase letter range.
# NetHack encodes the request to use the alternate font here by
# having the high bit set (in hexadecimal, \x80 is combined with
# a character code between \x60 and \x7f).
start: DECgraphics
Handling: DEC
S_vwall: \xf8 # meta-x, vertical rule
S_hwall: \xf1 # meta-q, horizontal rule
S_tlcorn: \xec # meta-l, top left corner
S_trcorn: \xeb # meta-k, top right corner
S_blcorn: \xed # meta-m, bottom left
S_brcorn: \xea # meta-j, bottom right
S_crwall: \xee # meta-n, cross
S_tuwall: \xf6 # meta-v, T up
S_tdwall: \xf7 # meta-w, T down
S_tlwall: \xf5 # meta-u, T left
S_trwall: \xf4 # meta-t, T right
S_ndoor: \xfe # meta-~, centered dot
S_vodoor: \xe1 # meta-a, solid block
S_hodoor: \xe1 # meta-a, solid block
S_bars: \xfb # meta-{, small pi
S_tree: \xe7 # meta-g, plus-or-minus
S_room: \xfe # meta-~, centered dot
S_upladder: \xf9 # meta-y, greater-than-or-equals
S_dnladder: \xfa # meta-z, less-than-or-equals
S_pool: \xe0 # meta-\, diamond
S_ice: \xfe # meta-~, centered dot
S_lava: \xe0 # meta-\, diamond
S_vodbridge: \xfe # meta-~, centered dot
S_hodbridge: \xfe # meta-~, centered dot
S_water: \xe0 # meta-\, diamond
S_vbeam: \xf8 # meta-x, vertical rule
S_hbeam: \xf1 # meta-q, horizontal rule
S_sw_tc: \xef # meta-o, high horizontal line
S_sw_ml: \xf8 # meta-x, vertical rule
S_sw_mr: \xf8 # meta-x, vertical rule
S_sw_bc: \xf3 # meta-s, low horizontal line
S_explode2: \xef # meta-o, high horizontal line
S_explode4: \xf8 # meta-x, vertical rule
S_explode6: \xf8 # meta-x, vertical rule
S_explode8: \xf3 # meta-s, low horizontal line
finish
start: IBMgraphics
Handling: IBM
S_vwall: \xb3 # meta-3, vertical rule
S_hwall: \xc4 # meta-D, horizontal rule
S_tlcorn: \xda # meta-Z, top left corner
S_trcorn: \xbf # meta-?, top right corner
S_blcorn: \xc0 # meta-@, bottom left
S_brcorn: \xd9 # meta-Y, bottom right
S_crwall: \xc5 # meta-E, cross
S_tuwall: \xc1 # meta-A, T up
S_tdwall: \xc2 # meta-B, T down
S_tlwall: \xb4 # meta-4, T left
S_trwall: \xc3 # meta-C, T right
S_ndoor: \xfa # meta-z, centered dot
S_vodoor: \xfe # meta-~, small centered square
S_hodoor: \xfe # meta-~, small centered square
S_bars: \xf0 # equivalence symbol
S_tree: \xf1 # plus or minus symbol
S_room: \xfa # meta-z, centered dot
S_corr: \xb0 # meta-0, light shading
S_litcorr: \xb1 # meta-1, medium shading
S_fountain: \xf4 # meta-t, integral top half
S_pool: \xf7 # meta-w, approx. equals
S_ice: \xfa # meta-z, centered dot
S_lava: \xf7 # meta-w, approx. equals
S_vodbridge: \xfa # meta-z, centered dot
S_hodbridge: \xfa # meta-z, centered dot
S_water: \xf7 # meta-w, approx. equals
S_vbeam: \xb3 # meta-3, vertical rule
S_hbeam: \xc4 # meta-D, horizontal rule
S_sw_ml: \xb3 # meta-3, vertical rule
S_sw_mr: \xb3 # meta-3, vertical rule
S_explode4: \xb3 # meta-3, vertical rule
S_explode6: \xb3 # meta-3, vertical rule
finish
start: IBMGraphics_1
Handling: IBM
S_vwall: \xb3 # meta-3, vertical rule
S_hwall: \xc4 # meta-D, horizontal rule
S_tlcorn: \xda # meta-Z, top left corner
S_trcorn: \xbf # meta-?, top right corner
S_blcorn: \xc0 # meta-@, bottom left
S_brcorn: \xd9 # meta-Y, bottom right
S_crwall: \xc5 # meta-E, cross
S_tuwall: \xc1 # meta-A, T up
S_tdwall: \xc2 # meta-B, T down
S_tlwall: \xb4 # meta-4, T left
S_trwall: \xc3 # meta-C, T right
S_vbeam: \xb3 # meta-3, vertical rule
S_hbeam: \xc4 # meta-D, horizontal rule
S_sw_ml: \xb3 # meta-3, vertical rule
S_sw_mr: \xb3 # meta-3, vertical rule
S_explode4: \xb3 # meta-3, vertical rule
S_explode6: \xb3 # meta-3, vertical rule
finish
start: IBMGraphics_2
Handling: IBM
S_vwall: \xb3 # meta-3, vertical rule
S_hwall: \xc4 # meta-D, horizontal rule
S_tlcorn: \xda # meta-Z, top left corner
S_trcorn: \xbf # meta-?, top right corner
S_blcorn: \xc0 # meta-@, bottom left
S_brcorn: \xd9 # meta-Y, bottom right
S_crwall: \xc5 # meta-E, cross
S_tuwall: \xc1 # meta-A, T up
S_tdwall: \xc2 # meta-B, T down
S_tlwall: \xb4 # meta-4, T left
S_trwall: \xc3 # meta-C, T right
S_vodoor: \xfe # meta-~, small centered square
S_hodoor: \xfe # meta-~, small centered square
S_corr: \xb0 # meta-0, light shading
S_litcorr: \xb1 # meta-1, medium shading
S_vbeam: \xb3 # meta-3, vertical rule
S_hbeam: \xc4 # meta-D, horizontal rule
S_sw_ml: \xb3 # meta-3, vertical rule
S_sw_mr: \xb3 # meta-3, vertical rule
S_explode4: \xb3 # meta-3, vertical rule
S_explode6: \xb3 # meta-3, vertical rule
finish
start: MACgraphics
Handling: MAC
S_vwall: \xba
S_hwall: \xcd
S_tlcorn: \xc9
S_trcorn: \xbb
S_blcorn: \xc8
S_brcorn: \xbc
S_crwall: \xce
S_tuwall: \xca
S_tdwall: \xcb
S_tlwall: \xb9
S_trwall: \xcc
S_ndoor: \xb0
S_vodoor: \xee
S_hodoor: \xee
S_vcdoor: \xef
S_hcdoor: \xef
S_bars: \xf0 # equivalency symbol
S_tree: \xf1 # plus-or-minus
S_corr: \xb0
S_grave: \xef # same as open door
S_pool: \xe0
finish
start: RogueIBM
Handling: IBM
Restrictions: rogue
S_weapon: \x29
S_amulet: \x2c
S_food: \x3a
S_potion: \xad
S_scroll: \x3f
S_book: \x2b
S_wand: \xe7
S_vwall: \xba # all walls now use
S_hwall: \xcd # double line graphics
S_tlcorn: \xc9
S_trcorn: \xbb
S_blcorn: \xc8
S_brcorn: \xbc
S_crwall: \xce
S_tuwall: \xca
S_tdwall: \xcb
S_tlwall: \xb9
S_trwall: \xcc
S_ndoor: \xce
S_vodoor: \xce
S_hodoor: \xce
S_room: \xfa # centered dot
S_corr: \xb1
S_litcorr: \xb2
S_upstair: \xf0 # Greek Xi
S_dnstair: \xf0
finish
start: RogueEpyx
Description: Rogue level color symbol set like Epyx Rogue
Restrictions: rogue
Handling: IBM
Color: Yes
S_weapon: \x18 # up arrow
S_armor: \x0a # Vert rect with o
S_ring: \x09 # circle with arrow
S_amulet: \x0c # "female" symbol
S_food: \x05 # club (as in cards)
S_potion: \xad # upside down '!'
S_scroll: \x0e # musical note
# S_armor: \x5b
# S_ring: \x3d
# S_amulet: \x0c
# S_tool: \x28
S_wand: \xe7 # greek tau
S_coin: \x0f # yes it's the same as gems
S_gem: \x0f # fancy '*'
S_rock: \x60
S_ball: \x30
S_chain: \x5f
S_venom: \x2e
S_vwall: \xba # all walls now use
S_hwall: \xcd # double line graphics
S_tlcorn: \xc9
S_trcorn: \xbb
S_blcorn: \xc8
S_brcorn: \xbc
S_crwall: \xce
S_tuwall: \xca
S_tdwall: \xcb
S_tlwall: \xb9
S_trwall: \xcc
S_ndoor: \xce
S_vodoor: \xce
S_hodoor: \xce
S_room: \xfa # centered dot
S_corr: \xb1
S_litcorr: \xb2
S_upstair: \xf0 # Greek Xi
S_dnstair: \xf0
S_arrow_trap: \x04 # diamond (cards)
S_dart_trap: \x04
S_falling_rock_trap: \x04
S_squeaky_board: \x04
S_bear_trap: \x04
S_land_mine: \x04
S_rolling_boulder_trap: \x04
S_sleeping_gas_trap: \x04
S_rust_trap: \x04
S_fire_trap: \x04
S_pit: \x04
S_spiked_pit: \x04
S_hole: \x04
S_trap_door: \x04
S_teleportation_trap: \x04
S_level_teleporter: \x04
S_magic_portal: \x04
S_web: \x04
S_statue_trap: \x04
S_magic_trap: \x04
S_anti_magic_trap: \x04
S_polymorph_trap: \x04
S_weapon: \x18
S_armor: \x5b
S_ring: \x3d
S_amulet: \xc
S_tool: \x28
S_food: \x5
S_potion: \xad
S_scroll: \xe
S_book: \x2b
S_wand: \xe7
S_coin: \xf
S_gem: \xf
S_rock: \x60
S_ball: \x30
S_chain: \x5f
S_venom: \x2e
S_human: \x01
finish
start: RogueWindows
Restrictions: rogue
Handling: IBM
S_weapon: \x29
S_amulet: \x2c
S_food: \x3a
S_potion: \xad
S_scroll: \x3f
S_book: \x2b
S_wand: \xe7
S_vwall: \xba # all walls now use
S_hwall: \xcd # double line graphics
S_tlcorn: \xc9
S_trcorn: \xbb
S_blcorn: \xc8
S_brcorn: \xbc
S_crwall: \xce
S_tuwall: \xca
S_tdwall: \xcb
S_tlwall: \xb9
S_trwall: \xcc
S_ndoor: \xce
S_vodoor: \xce
S_hodoor: \xce
S_room: \xfa # centered dot
S_corr: \xb1
S_litcorr: \xb2
S_upstair: \xf0 # Greek Xi
S_dnstair: \xf0
finish
# Recommended symset for blind players
# courtesy Michael Feir
start: NHAccess
S_stone: \032
S_vwall: \124
S_hwall: \045
S_tlcorn: \124
S_trcorn: \124
S_blcorn: \124
S_brcorn: \124
S_crwall: \045
S_tuwall: \045
S_tdwall: \045
S_tlwall: \124
S_trwall: \124
S_ndoor: \046
S_vodoor: \045
S_hodoor: \124
S_vcdoor: \043
S_hcdoor: \043
S_bars: \046
S_tree: \035
S_room: \035
S_corr: \060
S_litcorr: \062
S_upstair: \060
S_dnstair: \062
S_upladder: \095
S_dnladder: \092
S_altar: \035
S_grave: \126
S_throne: \126
S_sink: \126
S_fountain: \126
S_pool: \042
S_ice: \042
S_lava: \035
S_vodbridge: \035
S_hodbridge: \032
S_vcdbridge: \035
S_hcdbridge: \126
S_arrow_trap: \094
S_dart_trap: \094
S_falling_rock_trap: \094
S_squeaky_board: \094
S_bear_trap: \094
S_land_mine: \094
S_rolling_boulder_trap: \094
S_sleeping_gas_trap: \094
S_rust_trap: \094
S_fire_trap: \094
S_pit: \094
S_spiked_pit: \094
S_hole: \094
S_trap_door: \094
S_teleportation_trap: \094
S_level_teleporter: \094
S_magic_portal: \094
S_web: \094
S_statue_trap: \094
S_magic_trap: \094
S_anti_magic_trap: \094
S_polymorph_trap: \094
S_vbeam: \124
S_hbeam: \095
S_lslant: \092
S_rslant: \047
S_digbeam: \042
S_flashbeam: \033
S_boomleft: \041
S_boomright: \040
S_ss1: \048
S_ss2: \035
S_ss3: \064
S_ss4: \042
S_sw_tl: \047
S_sw_tc: \045
S_sw_tr: \092
S_sw_ml: \058
S_sw_mr: \058
S_sw_bl: \092
S_sw_bc: \045
S_sw_br: \047
S_explode1: \047
S_explode2: \045
S_explode3: \092
S_explode4: \058
S_explode5: \032
S_explode6: \058
S_explode7: \092
S_explode8: \045
S_explode9: \047
finish
start: Unicode_US
Description: Unicode symbols similar to code page 437
Restrictions: Unicode
S_vwall: U+2502 # box drawings light vertical
S_hwall: U+2500 # box drawings light horizontal
S_tlcorn: U+250C # box drawings light down and right
S_trcorn: U+2510 # box drawings light down and left
S_blcorn: U+2514 # box drawings light up and right
S_brcorn: U+2518 # box drawings light up and left
S_crwall: U+253C # box drawings light up and left
S_tuwall: U+2534 # box drawings light up and horizontal
S_tdwall: U+252C # box drawings light down and horizontal
S_tlwall: U+2524 # box drawings light vertical and left
S_trwall: U+251C # box drawings light vertical and right
S_ndoor: U+2556 # box drawings down double and left single
S_vodoor: U+25A0 # black square
S_hodoor: U+25A0 # black square
S_bars: U+2261 # identical to
S_tree: U+00B1 # plus-minus sign
S_room: U+00B7 # middle dot
S_corr: U+2591 # light shade
S_litcorr: U+2592 # medium shade
S_fountain: U+2320 # top half integral
S_pool: U+2248 # almost equal to
S_ice: U+00B7 # middle dot
S_lava: U+2248 # almost equal to
S_vodbridge: U+00B7 # middle dot
S_hodbridge: U+00B7 # middle dot
S_water: U+2248 # almost equal to
S_vbeam: U+2502 # box drawings light vertical
S_hbeam: U+2500 # box drawings light horizontal
S_sw_ml: U+2502 # box drawings light vertical
S_sw_mr: U+2502 # box drawings light vertical
S_explode4: U+2502 # box drawings light vertical
S_explode6: U+2502 # box drawings light vertical
finish
start: Unicode_non_US
Description: If default OEM CP for non-Unicode programs is not 437 or 850
Restrictions: Unicode
S_vwall: U+2502 # box drawings light vertical
S_hwall: U+2500 # box drawings light horizontal
S_tlcorn: U+250C # box drawings light down and right
S_trcorn: U+2510 # box drawings light down and left
S_blcorn: U+2514 # box drawings light up and right
S_brcorn: U+2518 # box drawings light up and left
S_crwall: U+253C # box drawings light up and left
S_tuwall: U+2534 # box drawings light up and horizontal
S_tdwall: U+252C # box drawings light down and horizontal
S_tlwall: U+2524 # box drawings light vertical and left
S_trwall: U+251C # box drawings light vertical and right
S_vodoor: U+25A0 # black square
S_hodoor: U+25A0 # black square
S_corr: U+2591 # light shade
S_litcorr: U+2592 # medium shade
S_vbeam: U+2502 # box drawings light vertical
S_hbeam: U+2500 # box drawings light horizontal
S_sw_ml: U+2502 # box drawings light vertical
S_sw_mr: U+2502 # box drawings light vertical
S_explode4: U+2502 # box drawings light vertical
S_explode6: U+2502 # box drawings light vertical
S_coin: U+20AC # euro
finish
start: UnicodeRogueEpyx
Description: Unicode Rogue level symbols
Restrictions: Unicode
Restrictions: Rogue
Color: Yes
S_weapon: U+2191 # up arrow
S_armor: U+25d9 # Vert rect with o
S_ring: U+2642 # circle with arrow
S_amulet: U+2640 # "female" symbol
S_food: U+2663 # club (as in cards)
S_potion: U+00a1 # upside down '!'
S_scroll: U+266a # musical note
S_wand: U+03c4 # greek tau
S_coin: U+263c # yes it's the same as gems
S_gem: U+263c # fancy '*'
S_rock: U+0060 # grave accent
S_ball: U+0030 # digit 0
S_chain: U+005f # low line
S_venom: U+002e # full stop
S_book: U+002b # + sign
S_vwall: U+2551 # all walls now use
S_hwall: U+2550 # double line graphics
S_tlcorn: U+2554 # box drawing double down and right
S_trcorn: U+2557 # box drawing double down and left
S_blcorn: U+255a # box drawing double up and right
S_brcorn: U+255d # box drawing double up and left
S_crwall: U+256c # box drawing double vertical and horizontal
S_tuwall: U+2569 # box drawing double up and horizontal
S_tdwall: U+2566 # box drawing double down and horizontal
S_tlwall: U+2563 # box drawing double vertical and left
S_trwall: U+2560 # box drawing double vertical and right
S_ndoor: U+256c # box drawing double vertical and horizontal
S_vodoor: U+256c # box drawing double vertical and horizontal
S_hodoor: U+256c # box drawing double vertical and horizontal
S_room: U+00b7 # centered dot
S_corr: U+2592 # medium shade
S_litcorr: U+2593 # dark shade
S_upstair: U+001e # Greek Xi
S_dnstair: U+001f
S_arrow_trap: U+2666 # diamond (cards)
S_dart_trap: U+2666
S_falling_rock_trap: U+2666
S_squeaky_board: U+2666
S_bear_trap: U+2666
S_land_mine: U+2666
S_rolling_boulder_trap: U+2666
S_sleeping_gas_trap: U+2666
S_rust_trap: U+2666
S_fire_trap: U+2666
S_pit: U+2666
S_spiked_pit: U+2666
S_hole: U+2666
S_trap_door: U+2666
S_teleportation_trap: U+2666
S_level_teleporter: U+2666
S_magic_portal: U+2666
S_web: U+2666
S_statue_trap: U+2666
S_magic_trap: U+2666
S_anti_magic_trap: U+2666
S_polymorph_trap: U+2666
S_human: U+263a # face
finish