Add completely blank symbol set

The blank symbol set can be used with screen reader software
to prevent it from reading the map symbols.

Prevent a segfault when looking at the map and many symbols
share the same character. Don't list too many symbols when
looking at those, if many share the same character.
This commit is contained in:
Pasi Kallinen
2016-09-20 21:03:47 +03:00
parent 28e36b3136
commit e14120b282
2 changed files with 176 additions and 0 deletions

View File

@@ -386,6 +386,176 @@ start: NHAccess
S_explode9: \047
finish
# All symbols are spaces
start: Blank
Description: Completely blank symbols
S_air: \032
S_altar: \032
S_amulet: \032
S_angel: \032
S_ant: \032
S_anti_magic_trap: \032
S_armor: \032
S_armour: \032
S_arrow_trap: \032
S_ball: \032
S_bars: \032
S_bat: \032
S_bear_trap: \032
S_blcorn: \032
S_blob: \032
S_book: \032
S_boomleft: \032
S_boomright: \032
S_boulder: \032
S_brcorn: \032
S_centaur: \032
S_chain: \032
S_cloud: \032
S_cockatrice: \032
S_coin: \032
S_corr: \032
S_crwall: \032
S_dart_trap: \032
S_demon: \032
S_digbeam: \032
S_dnladder: \032
S_dnstair: \032
S_dog: \032
S_dragon: \032
S_eel: \032
S_elemental: \032
S_explode1: \032
S_explode2: \032
S_explode3: \032
S_explode4: \032
S_explode5: \032
S_explode6: \032
S_explode7: \032
S_explode8: \032
S_explode9: \032
S_eye: \032
S_falling_rock_trap: \032
S_feline: \032
S_fire_trap: \032
S_flashbeam: \032
S_food: \032
S_fountain: \032
S_fungus: \032
S_gem: \032
S_ghost: \032
S_giant: \032
S_gnome: \032
S_golem: \032
S_grave: \032
S_gremlin: \032
S_hbeam: \032
S_hcdbridge: \032
S_hcdoor: \032
S_hodoor: \032
S_hole: \032
S_human: \032
S_humanoid: \032
S_hwall: \032
S_imp: \032
S_jabberwock: \032
S_jelly: \032
S_kobold: \032
S_kop: \032
S_land_mine: \032
S_lava: \032
S_leprechaun: \032
S_level_teleporter: \032
S_lich: \032
S_light: \032
S_litcorr: \032
S_lizard: \032
S_lslant: \032
S_magic_portal: \032
S_magic_trap: \032
S_mimic: \032
S_mimic_def: \032
S_mummy: \032
S_naga: \032
S_nymph: \032
S_ogre: \032
S_orc: \032
S_piercer: \032
S_pit: \032
S_poisoncloud: \032
S_polymorph_trap: \032
S_pool: \032
S_potion: \032
S_pudding: \032
S_quadruped: \032
S_quantmech: \032
S_ring: \032
S_rock: \032
S_rodent: \032
S_rolling_boulder_trap: \032
S_rslant: \032
S_rust_trap: \032
S_rustmonst: \032
S_scroll: \032
S_sink: \032
S_sleeping_gas_trap: \032
S_snake: \032
S_spider: \032
S_spiked_pit: \032
S_squeaky_board: \032
S_ss1: \032
S_ss2: \032
S_ss3: \032
S_ss4: \032
S_statue_trap: \032
S_stone: \032
S_sw_bc: \032
S_sw_bl: \032
S_sw_br: \032
S_sw_ml: \032
S_sw_mr: \032
S_sw_tc: \032
S_sw_tl: \032
S_sw_tr: \032
S_tdwall: \032
S_teleportation_trap: \032
S_throne: \032
S_tlcorn: \032
S_tlwall: \032
S_tool: \032
S_trap_door: \032
S_trapper: \032
S_trcorn: \032
S_tree: \032
S_troll: \032
S_trwall: \032
S_tuwall: \032
S_umber: \032
S_unicorn: \032
S_upladder: \032
S_upstair: \032
S_vampire: \032
S_vbeam: \032
S_vcdbridge: \032
S_vcdoor: \032
S_vibrating_square: \032
S_vodoor: \032
S_vortex: \032
S_vwall: \032
S_wand: \032
S_water: \032
S_weapon: \032
S_web: \032
S_worm: \032
S_worm_tail: \032
S_wraith: \032
S_xan: \032
S_xorn: \032
S_yeti: \032
S_zombie: \032
S_zruty: \032
finish
start: plain
Description: Same as Default symbols, except '+' for corner walls
S_tlcorn: '+'

View File

@@ -53,6 +53,8 @@ const char *new_str;
return 0;
space_left = BUFSZ - strlen(buf) - 1;
if (space_left < 1)
return 0;
(void) strncat(buf, " or ", space_left);
(void) strncat(buf, new_str, space_left - 4);
return 1;
@@ -918,6 +920,10 @@ const char **firstmatch;
* If we are looking at the screen, follow multiple possibilities or
* an ambiguous explanation by something more detailed.
*/
if (found > 4)
Sprintf(out_str, "%s", "That can be many things");
didlook:
if (looked) {
if (found > 1 || need_to_look) {