From 7333ca47053db192c321e5f1a36f9910e350a0ae Mon Sep 17 00:00:00 2001 From: "nethack.rankin" Date: Tue, 26 Jun 2007 03:10:39 +0000 Subject: [PATCH] couple of DUNGEON_OVERVIEW fixes (trunk only) New hero would remember part of old one's terrain discoveries (such as presence of fountains) for bones levels. Also, some topology changes (such as fountain destruction) can be detected by touch while blinded but dungeon overview continued to remember the old feature. Post-3.4.3 code. --- src/bones.c | 5 ++++- src/display.c | 17 ++++++++++++----- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/bones.c b/src/bones.c index 6d36beec7..619343ffb 100644 --- a/src/bones.c +++ b/src/bones.c @@ -1,4 +1,4 @@ -/* SCCS Id: @(#)bones.c 3.5 2007/03/01 */ +/* SCCS Id: @(#)bones.c 3.5 2007/06/25 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985,1993. */ /* NetHack may be freely redistributed. See license for details. */ @@ -371,6 +371,9 @@ struct obj *corpse; levl[x][y].seenv = 0; levl[x][y].waslit = 0; levl[x][y].glyph = cmap_to_glyph(S_stone); +#ifdef DUNGEON_OVERVIEW + levl[x][y].styp = 0; +#endif } fd = create_bonesfile(&u.uz, &bonesid, whynot); diff --git a/src/display.c b/src/display.c index 9a2686f3c..dcc951611 100644 --- a/src/display.c +++ b/src/display.c @@ -1,4 +1,4 @@ -/* SCCS Id: @(#)display.c 3.5 2007/01/26 */ +/* SCCS Id: @(#)display.c 3.5 2007/06/25 */ /* Copyright (c) Dean Luick, with acknowledgements to Kevin Darcy */ /* and Dave Cohrs, 1990. */ /* NetHack may be freely redistributed. See license for details. */ @@ -133,6 +133,12 @@ STATIC_DCL void FDECL(set_seenv, (struct rm *, int, int, int, int)); STATIC_DCL void FDECL(t_warn, (struct rm *)); STATIC_DCL int FDECL(wall_angle, (struct rm *)); +#ifdef DUNGEON_OVERVIEW +# define remember_topology(levp) ((levp)->styp = (levp)->typ) +#else +# define remember_topology(levp) /*empty*/ +#endif + #ifdef INVISIBLE_OBJECTS /* * vobj_at() @@ -185,9 +191,8 @@ magic_map_background(x, y, show) if (level.flags.hero_memory) lev->glyph = glyph; if (show) show_glyph(x,y, glyph); -#ifdef DUNGEON_OVERVIEW - lev->styp = lev->typ; -#endif /* DUNGEON_OVERVIEW */ + + remember_topology(lev); /* DUNGEON_OVERVIEW */ } /* @@ -343,6 +348,8 @@ unmap_object(x, y) map_trap(trap,show); \ else \ map_background(x,y,show); \ + \ + remember_topology(&levl[x][y]); /* DUNGEON_OVERVIEW */ \ } void @@ -523,7 +530,7 @@ feel_location(x, y) /* if the hero is levitating or not. */ set_seenv(lev, u.ux, u.uy, x, y); - if (Levitation && !Is_airlevel(&u.uz) && !Is_waterlevel(&u.uz)) { + if (!can_reach_floor(FALSE)) { /* * Levitation Rules. It is assumed that the hero can feel the state * of the walls around herself and can tell if she is in a corridor,