diff -NwrdBU 4 --exclude-from=exclude-these nethack-3.4.3-orig/include/display.h nethack-3.4.3/include/display.h --- nethack-3.4.3-orig/include/display.h 2003-12-07 17:39:14.000000000 -0600 +++ nethack-3.4.3/include/display.h 2004-02-24 07:58:50.000000000 -0600 @@ -179,9 +179,11 @@ #define DISP_ALWAYS (-3) /* Like flash, but still displayed if not visible. */ #define DISP_CHANGE (-4) /* Change glyph. */ #define DISP_END (-5) /* Clean up. */ #define DISP_FREEMEM (-6) /* Free all memory during exit only. */ - +#ifdef WEBB_SEE_LIGHT +#define DISP_ILLUM (-7) /* sets tmp visibility for glyphs */ +#endif /* Total number of cmap indices in the sheild_static[] array. */ #define SHIELD_COUNT 21 diff -NwrdBU 4 --exclude-from=exclude-these nethack-3.4.3-orig/src/display.c nethack-3.4.3/src/display.c --- nethack-3.4.3-orig/src/display.c 2003-12-07 17:39:14.000000000 -0600 +++ nethack-3.4.3/src/display.c 2004-02-24 08:28:00.000000000 -0600 @@ -815,14 +815,24 @@ * DISP_FLASH - Display the given glyph at each location, but erase the * previous location's glyph. * DISP_ALWAYS- Like DISP_FLASH, but vision is not taken into account. */ +#ifdef WEBB_SEE_LIGHT + /* + * (DISP_ILLUM, 0) show glyphs even in dark room. + * called directly after one of the initializing tmp_at calls. + * this makes it so that the glyphs are seen even in the darkness + */ +#endif static struct tmp_glyph { coord saved[COLNO]; /* previously updated positions */ int sidx; /* index of next unused slot in saved[] */ int style; /* either DISP_BEAM or DISP_FLASH or DISP_ALWAYS */ int glyph; /* glyph to use when printing */ +#ifdef WEBB_SEE_LIGHT + int illuminating; +#endif struct tmp_glyph *prev; } tgfirst; void @@ -844,11 +892,19 @@ tglyph = tmp; tglyph->sidx = 0; tglyph->style = x; tglyph->glyph = y; +#ifdef WEBB_SEE_LIGHT + tglyph->illuminating = 0; +#endif flush_screen(0); /* flush buffered glyphs */ return; +#ifdef WEBB_SEE_LIGHT + case DISP_ILLUM: + tglyph->illuminating = 1; + return; +#endif case DISP_FREEMEM: /* in case game ends with tmp_at() in progress */ while (tglyph) { tmp = tglyph->prev; if (tglyph != &tgfirst) free((genericptr_t)tglyph); @@ -885,8 +941,13 @@ break; default: /* do it */ if (tglyph->style == DISP_BEAM) { +#ifdef WEBB_SEE_LIGHT + if (tglyph->illuminating){ + if (!couldsee(x,y)) break; + } else +#endif if (!cansee(x,y)) break; /* save pos for later erasing */ tglyph->saved[tglyph->sidx].x = x; tglyph->saved[tglyph->sidx].y = y; @@ -895,8 +956,13 @@ if (tglyph->sidx) { /* not first call, so reset previous pos */ newsym(tglyph->saved[0].x, tglyph->saved[0].y); tglyph->sidx = 0; /* display is presently up to date */ } +#ifdef WEBB_SEE_LIGHT + if (tglyph->illuminating){ + if (!couldsee(x,y) && tglyph->style != DISP_ALWAYS) break; + } else +#endif if (!cansee(x,y) && tglyph->style != DISP_ALWAYS) break; tglyph->saved[0].x = x; tglyph->saved[0].y = y; tglyph->sidx = 1; diff -NwrdBU 4 --exclude-from=exclude-these nethack-3.4.3-orig/src/explode.c nethack-3.4.3/src/explode.c --- nethack-3.4.3-orig/src/explode.c 2003-12-07 17:39:14.000000000 -0600 +++ nethack-3.4.3/src/explode.c 2004-02-24 09:58:16.000000000 -0600 @@ -40,8 +40,13 @@ int explmask[3][3]; /* 0=normal explosion, 1=do shieldeff, 2=do nothing */ boolean shopdamage = FALSE; boolean generic = FALSE; +#ifdef WEBB_SEE_LIGHT + int abstyp = abs(type)%10; + int illuminating = !Blind && + (abstyp == AD_FIRE - 1 || abstyp == AD_ELEC - 1); +#endif if (olet == WAND_CLASS) /* retributive strike */ switch (Role_switch) { case PM_PRIEST: @@ -172,9 +177,14 @@ else if (!mtmp && glyph_is_invisible(levl[i+x-1][j+y-1].glyph)) { unmap_object(i+x-1, j+y-1); newsym(i+x-1, j+y-1); } +#ifdef WEBB_SEE_LIGHT + if (cansee(i+x-1, j+y-1) || + (couldsee(i+x-1, j+y-1) && illuminating) ) visible = TRUE; +#else if (cansee(i+x-1, j+y-1)) visible = TRUE; +#endif if (explmask[i][j] == 1) any_shield = TRUE; } if (visible) { @@ -182,8 +192,12 @@ for (i=0; i<3; i++) for (j=0; j<3; j++) { if (explmask[i][j] == 2) continue; tmp_at(starting ? DISP_BEAM : DISP_CHANGE, explosion_to_glyph(expltype,expl[i][j])); +#ifdef WEBB_SEE_LIGHT + if (starting && illuminating) + tmp_at(DISP_ILLUM,0); +#endif tmp_at(i+x-1, j+y-1); starting = 0; } curs_on_u(); /* will flush screen and output */ diff -NwrdBU 4 --exclude-from=exclude-these nethack-3.4.3-orig/src/photo.c nethack-3.4.3/src/photo.c --- nethack-3.4.3-orig/src/photo.c 1969-12-31 18:00:00.000000000 -0600 +++ nethack-3.4.3/src/photo.c 2004-02-24 11:49:38.000000000 -0600 @@ -1528,8 +1528,12 @@ bhitpos.x = sx; bhitpos.y = sy; tmp_at(DISP_BEAM, cmap_to_glyph(S_flashbeam)); +#ifdef WEBB_SEE_LIGHT + if (!Blind) + tmp_at(DISP_ILLUM, 0); +#endif while(range-- > 0) { int x,y; diff -NwrdBU 4 --exclude-from=exclude-these nethack-3.4.3-orig/src/zap.c nethack-3.4.3/src/zap.c --- nethack-3.4.3-orig/src/zap.c 2003-12-07 17:39:14.000000000 -0600 +++ nethack-3.4.3/src/zap.c 2004-02-24 09:27:12.000000000 -0600 @@ -2639,8 +2742,13 @@ if (weapon == FLASHED_LIGHT) { tmp_at(DISP_BEAM, cmap_to_glyph(S_flashbeam)); } else if (weapon != ZAPPED_WAND && weapon != INVIS_BEAM) tmp_at(DISP_FLASH, obj_to_glyph(obj)); +#ifdef WEBB_SEE_LIGHT + if (!Blind && ( weapon == FLASHED_LIGHT || ( obj->lamplit && + (weapon == THROWN_WEAPON || weapon == KICKED_WEAPON)))) + tmp_at(DISP_ILLUM, 0); +#endif while(range-- > 0) { int x,y; @@ -3283,8 +3405,11 @@ boolean shopdamage = FALSE; register const char *fltxt; struct obj *otmp; int spell_type; +#ifdef WEBB_SEE_LIGHT + int illuminating; +#endif /* if its a Hero Spell then get its SPE_TYPE */ spell_type = is_hero_spell(type) ? SPE_MAGIC_MISSILE + abstype : 0; @@ -3309,22 +3434,37 @@ if(dx == 0 && dy == 0) range = 1; save_bhitpos = bhitpos; tmp_at(DISP_BEAM, zapdir_to_glyph(dx, dy, abstype)); +#ifdef WEBB_SEE_LIGHT + illuminating = !Blind && (abstype == ZT_FIRE || abstype == ZT_LIGHTNING); + if (illuminating) + tmp_at(DISP_ILLUM,0); +#endif + while(range-- > 0) { lsx = sx; sx += dx; lsy = sy; sy += dy; if(isok(sx,sy) && (lev = &levl[sx][sy])->typ) { mon = m_at(sx, sy); +#ifdef WEBB_SEE_LIGHT + if((illuminating && couldsee(sx,sy)) || cansee(sx,sy)) { +#else if(cansee(sx,sy)) { +#endif /* reveal/unreveal invisible monsters before tmp_at() */ if (mon && !canspotmon(mon)) map_invisible(sx, sy); else if (!mon && glyph_is_invisible(levl[sx][sy].glyph)) { unmap_object(sx, sy); newsym(sx, sy); } +#ifdef WEBB_SEE_LIGHT + if(ZAP_POS(lev->typ) || cansee(lsx,lsy) || + (illuminating && couldsee(lsx,lsy)) ) +#else if(ZAP_POS(lev->typ) || cansee(lsx,lsy)) +#endif tmp_at(sx,sy); delay_output(); /* wait a little */ } } else