Mercurial > hg > batmud > maputils
changeset 2203:16a01a429f1d
Fix invis location handling after previous changes.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sun, 13 Oct 2019 03:26:28 +0300 |
parents | b8e8d0b111d3 |
children | ed347117195c |
files | mkcitymap.c |
diffstat | 1 files changed, 11 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/mkcitymap.c Sun Oct 13 03:19:44 2019 +0300 +++ b/mkcitymap.c Sun Oct 13 03:26:28 2019 +0300 @@ -267,8 +267,7 @@ const unsigned char *dp = map->data + (map->scansize * yc); for (int xc = 0; xc < map->width; xc++) { - if ((n = locFindByCoords(locs, xc, yc, TRUE)) >= 0 && - (locs->locations[n]->flags & LOCF_INVIS) == 0) + if ((n = locFindByCoords(locs, xc, yc, TRUE)) >= 0) { LocMarker *marker = locs->locations[n]; if (span) fprintf(outFile, "</span>"); @@ -280,8 +279,16 @@ color = 0; fprintf(outFile, - "<span class=\"%c\">%c</span>", - 'a' + color, *dp); + "<span class=\"%c\">%c</span>", + 'a' + color, *dp); + } + else + if (marker->flags & LOCF_INVIS) + { + int color = muGetMapPieceColor(*dp, optUseOldFormat, TRUE); + fprintf(outFile, + "<span class=\"%c\">%c</span>", + 'a' + color, *dp); } else {