From 70814e4479cc89bf71b3af33e2779795a5bdd6c6 Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Wed, 25 Nov 2009 16:49:55 +0100 Subject: Add option to dump zone index to dump_map. --- crawl-ref/source/chardump.cc | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'crawl-ref/source/chardump.cc') diff --git a/crawl-ref/source/chardump.cc b/crawl-ref/source/chardump.cc index a1effb544a..56d92419bf 100644 --- a/crawl-ref/source/chardump.cc +++ b/crawl-ref/source/chardump.cc @@ -1253,7 +1253,7 @@ static std::string morgue_directory() return (dir); } -void dump_map(FILE *fp, bool debug) +void dump_map(FILE *fp, bool debug, bool dist) { // Duplicate the screenshot() trick. FixedVector char_table_bk; @@ -1274,6 +1274,12 @@ void dump_map(FILE *fp, bool debug) fputc('@', fp); else if (grd[x][y] == DNGN_FLOOR_SPECIAL) fputc('?', fp); + else if (dist && grd[x][y] == DNGN_FLOOR + && travel_point_distance[x][y] > 0 + && travel_point_distance[x][y] < 10) + { + fputc('0' + travel_point_distance[x][y], fp); + } else fputc(get_feature_def(grd[x][y]).symbol, fp); } @@ -1308,13 +1314,13 @@ void dump_map(FILE *fp, bool debug) init_show_table(); } -void dump_map(const char* fname, bool debug) +void dump_map(const char* fname, bool debug, bool dist) { FILE* fp = fopen(fname, "w"); if (!fp) return; - dump_map(fp, debug); + dump_map(fp, debug, dist); fclose(fp); } -- cgit v1.2.3-54-g00ecf