diff --git a/include/extern.h b/include/extern.h index c53de5ebe..9977353a8 100644 --- a/include/extern.h +++ b/include/extern.h @@ -828,6 +828,7 @@ extern int dooverview(void); extern void show_overview(int, int); extern void rm_mapseen(int); extern void init_mapseen(d_level *) NONNULLARG1; +extern void update_lastseentyp(coordxy, coordxy); extern void recalc_mapseen(void); extern void mapseen_temple(struct monst *); extern void room_discovered(int); diff --git a/src/display.c b/src/display.c index 77ae79964..cf86206ed 100644 --- a/src/display.c +++ b/src/display.c @@ -152,7 +152,6 @@ static void set_seenv(struct rm *, coordxy, coordxy, coordxy, coordxy); static void t_warn(struct rm *); static int wall_angle(struct rm *); -#define remember_topology(x, y) (gl.lastseentyp[x][y] = levl[x][y].typ) #define _glyph_at(x, y) gg.gbuf[y][x].glyphinfo.glyph /* @@ -256,7 +255,7 @@ magic_map_background(coordxy x, coordxy y, int show) if (show) show_glyph(x, y, glyph); - remember_topology(x, y); + update_lastseentyp(x, y); } /* @@ -461,7 +460,7 @@ unmap_object(register coordxy x, register coordxy y) else \ map_background(x, y, show); \ \ - remember_topology(x, y); \ + update_lastseentyp(x, y); \ } void @@ -3670,7 +3669,6 @@ fn_cmap_to_glyph(int cmap) /* for 'onefile' processing where end of this file isn't necessarily the end of the source code seen by the compiler (there are lots of other macros defined above...) */ -#undef remember_topology #undef _glyph_at #undef DETECTED #undef PHYSICALLY_SEEN diff --git a/src/dungeon.c b/src/dungeon.c index 5f5b07a23..22f0c2a24 100644 --- a/src/dungeon.c +++ b/src/dungeon.c @@ -64,7 +64,6 @@ static mapseen *find_mapseen(d_level *); static mapseen *find_mapseen_by_str(const char *); static void print_mapseen(winid, mapseen *, int, int, boolean); static boolean interest_mapseen(mapseen *); -static void update_lastseentyp(coordxy, coordxy); static void count_feat_lastseentyp(mapseen *, coordxy, coordxy); static void traverse_mapseenchn(int, winid, int, int, int *); static const char *seen_string(xint16, const char *); @@ -3062,7 +3061,7 @@ interest_mapseen(mapseen *mptr) } /* update the lastseentyp at x,y */ -static void +void update_lastseentyp(coordxy x, coordxy y) { struct monst *mtmp; @@ -3312,10 +3311,11 @@ recalc_mapseen(void) * the ability to have non-dungeon glyphs float above the last known * dungeon glyph (i.e. items on fountains). */ + if (!Levitation) + update_lastseentyp(u.ux, u.uy); + for (x = 1; x < COLNO; x++) { for (y = 0; y < ROWNO; y++) { - if (cansee(x, y) || (u_at(x, y) && !Levitation)) - update_lastseentyp(x, y); count_feat_lastseentyp(mptr, x, y); } } diff --git a/src/vision.c b/src/vision.c index d670c3a38..546061c80 100644 --- a/src/vision.c +++ b/src/vision.c @@ -838,8 +838,6 @@ vision_recalc(int control) /* Set the new min and max pointers. */ gv.viz_rmin = next_rmin; gv.viz_rmax = next_rmax; - - recalc_mapseen(); } /*