(map, draw_map, MAP_HIGH): New map command flag `h' to highlight own
sectors; from Marc Olzheim.
This commit is contained in:
parent
727be2e126
commit
f841200923
4 changed files with 28 additions and 1 deletions
|
@ -259,6 +259,26 @@ draw_map(int bmap, s_char origin, int map_flags, struct nstr_sect *nsp,
|
|||
wmap[y][x] = (*lchr[(int)land.lnd_type].l_name) & ~0x20;
|
||||
}
|
||||
}
|
||||
if (map_flags & MAP_HIGH) {
|
||||
register s_char *ptr;
|
||||
struct sctstr sect;
|
||||
|
||||
snxtsct_rewind(nsp);
|
||||
if ((!player->god || country)) {
|
||||
memset(bitmap, 0, (WORLD_X * WORLD_Y) / 8);
|
||||
bitinit2(nsp, bitmap, country);
|
||||
}
|
||||
while (nxtsct(nsp, §) && !player->aborted) {
|
||||
if ((!player->god || country) &&
|
||||
!emp_getbit(nsp->x, nsp->y, bitmap)) {
|
||||
if (!player->god)
|
||||
continue;
|
||||
}
|
||||
ptr = &wmap[nsp->dy][nsp->dx];
|
||||
if (sect.sct_own == player->cnum)
|
||||
*ptr |= 0x80;
|
||||
}
|
||||
}
|
||||
if (origin)
|
||||
wmap[5][10] = origin & ~0x20;
|
||||
for (y = nsp->range.ly, i = 0; i < nsp->range.height; y++, i++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue