MCPcopy Create free account
hub / github.com/NetHack/NetHack / update_lastseentyp

Function update_lastseentyp

src/dungeon.c:2926–2938  ·  view source on GitHub ↗

update the lastseentyp at x,y */

Source from the content-addressed store, hash-verified

2924
2925/* update the lastseentyp at x,y */
2926void
2927update_lastseentyp(coordxy x, coordxy y)
2928{
2929 struct monst *mtmp;
2930 int ltyp = levl[x][y].typ;
2931
2932 if (ltyp == DRAWBRIDGE_UP)
2933 ltyp = db_under_typ(levl[x][y].drawbridgemask);
2934 if ((mtmp = m_at(x, y)) != 0
2935 && M_AP_TYPE(mtmp) == M_AP_FURNITURE && canseemon(mtmp))
2936 ltyp = cmap_to_type(mtmp->mappearance);
2937 svl.lastseentyp[x][y] = ltyp;
2938}
2939
2940/* for some cases where deferred update needs to be done immediately;
2941 hide details from caller */

Callers 3

recalc_mapseenFunction · 0.85
magic_map_backgroundFunction · 0.85
rescued_from_terrainFunction · 0.85

Calls 3

db_under_typFunction · 0.85
canseemonFunction · 0.85
cmap_to_typeFunction · 0.85

Tested by

no test coverage detected