1
0
Fork 0
mirror of https://codeberg.org/noisytoot/notnotdnethack.git synced 2025-07-26 23:32:25 +01:00

Merge branch 'compat-3.12.3' of https://github.com/Chris-plus-alphanumericgibberish/dNAO.git into compat-3.12.3

This commit is contained in:
Chris-plus-alphanumericgibberish 2016-05-31 15:06:05 -04:00
commit b65c55d57c
3 changed files with 34 additions and 18 deletions

View file

@ -179,7 +179,7 @@ magic_map_background(x, y, show)
if (!cansee(x,y) && !lev->waslit) {
/* Floor spaces are dark if unlit. Corridors are dark if unlit. */
if (lev->typ == ROOM && glyph == cmap_to_glyph(S_litroom))
glyph = cmap_to_glyph(S_stone);
glyph = cmap_to_glyph(S_drkroom);
else if (lev->typ == CORR && glyph == cmap_to_glyph(S_litcorr))
glyph = cmap_to_glyph(S_corr);
}
@ -307,7 +307,7 @@ unmap_object(x, y)
/* turn remembered dark room squares dark */
if (!lev->waslit && lev->glyph == cmap_to_glyph(S_litroom) &&
lev->typ == ROOM)
lev->glyph = cmap_to_glyph(S_stone);
lev->glyph = cmap_to_glyph(S_drkroom);
} else
levl[x][y].glyph = cmap_to_glyph(S_stone); /* default val */
}
@ -564,15 +564,14 @@ feel_location(x, y)
if (lev->typ != ROOM && lev->seenv) {
map_background(x, y, 1);
} else {
lev->glyph = lev->waslit ? cmap_to_glyph(S_litroom) :
cmap_to_glyph(S_stone);
lev->glyph = (!lev->waslit) ? cmap_to_glyph(S_drkroom) : cmap_to_glyph(S_litroom);
show_glyph(x,y,lev->glyph);
}
} else if ((lev->glyph >= cmap_to_glyph(S_stone) &&
lev->glyph < cmap_to_glyph(S_litroom)) ||
lev->glyph < cmap_to_glyph(S_drkroom)) ||
glyph_is_invisible(levl[x][y].glyph)) {
lev->glyph = lev->waslit ? cmap_to_glyph(S_litroom) :
cmap_to_glyph(S_stone);
lev->glyph = (!cansee(x,y) && !lev->waslit) ? cmap_to_glyph(S_drkroom) :
cmap_to_glyph(S_litroom);
show_glyph(x,y,lev->glyph);
}
} else {
@ -612,7 +611,7 @@ feel_location(x, y)
/* Floor spaces are dark if unlit. Corridors are dark if unlit. */
if (lev->typ == ROOM &&
lev->glyph == cmap_to_glyph(S_litroom) && !lev->waslit)
show_glyph(x,y, lev->glyph = cmap_to_glyph(S_stone));
show_glyph(x,y, lev->glyph = cmap_to_glyph(S_drkroom));
else if (lev->typ == CORR &&
lev->glyph == cmap_to_glyph(S_litcorr) && !lev->waslit)
show_glyph(x,y, lev->glyph = cmap_to_glyph(S_corr));
@ -669,8 +668,8 @@ newsym(x,y)
* Perhaps ALL areas should revert to their "unlit" look when
* out of sight.
*/
lev->waslit = Race_if(PM_DROW) ? 0 : (lev->lit!=0); /* remember lit condition */
/* lev->waslit = Race_if(PM_DROW) ? 0 : (lev->lit!=0); */ /* remember lit condition */
lev->waslit = 0; /* hack? */
if (reg != NULL && ACCESSIBLE(lev->typ)) {
show_region(reg,x,y);
return;
@ -760,7 +759,7 @@ newsym(x,y)
if (lev->glyph == cmap_to_glyph(S_litcorr) && lev->typ == CORR)
show_glyph(x, y, lev->glyph = cmap_to_glyph(S_corr));
else if (lev->glyph == cmap_to_glyph(S_litroom) && lev->typ == ROOM)
show_glyph(x, y, lev->glyph = cmap_to_glyph(S_stone));
show_glyph(x, y, lev->glyph = cmap_to_glyph(S_drkroom));
else
goto show_mem;
} else {
@ -1534,7 +1533,9 @@ back_to_glyph(x,y)
case STONE:
idx = level.flags.arboreal ? S_tree : S_stone;
break;
case ROOM: idx = S_litroom; break;
case ROOM:
idx = (!cansee(x,y) && !ptr->waslit) ? S_drkroom : S_litroom;
break;
case CORR:
idx = (ptr->waslit || flags.lit_corridor) ? S_litcorr : S_corr;
break;
@ -1592,11 +1593,11 @@ back_to_glyph(x,y)
case DB_MOAT: idx = S_pool; break;
case DB_LAVA: idx = S_lava; break;
case DB_ICE: idx = S_ice; break;
case DB_FLOOR: idx = S_litroom; break;
case DB_FLOOR: idx = (!cansee(x,y) && !ptr->waslit) ? S_drkroom : S_litroom; break;
default:
impossible("Strange db-under: %d",
ptr->drawbridgemask & DB_UNDER);
idx = S_litroom; /* something is better than nothing */
idx = (!cansee(x,y) && !ptr->waslit) ? S_drkroom : S_litroom; /* something is better than nothing */
break;
}
break;
@ -1605,7 +1606,7 @@ back_to_glyph(x,y)
break;
default:
impossible("back_to_glyph: unknown level type [ = %d ]",ptr->typ);
idx = S_litroom;
idx = (!cansee(x,y) && !ptr->waslit) ? S_drkroom : S_litroom;
break;
}

View file

@ -419,6 +419,9 @@ unsigned *ospecial;
if(artifact_door(x, y)){
color = CLR_MAGENTA;
}
if (offset == S_drkroom)
color = CLR_BLACK;
}
if (color == NO_COLOR) cmap_color(offset);
} else if ((offset = (glyph - GLYPH_OBJ_OFF)) >= 0) { /* object */

View file

@ -730,7 +730,12 @@ initoptions()
/* as a named (or default) fruit. Wishing for "fruit" will */
/* result in the player's preferred fruit [better than "\033"]. */
obj_descr[SLIME_MOLD].oc_name = "fruit";
if (flags.lit_corridor && iflags.use_color) {
showsyms[S_drkroom]=showsyms[S_litroom];
} else {
showsyms[S_drkroom]=showsyms[S_stone];
}
return;
}
@ -3071,6 +3076,7 @@ goodfruit:
*/
vision_recalc(2); /* shut down vision */
vision_full_recalc = 1; /* delayed recalc */
if (iflags.use_color) need_redraw = TRUE; /* darkroom refresh */
}
else if ((boolopt[i].addr) == &iflags.use_inverse ||
(boolopt[i].addr) == &iflags.showrace ||
@ -3386,8 +3392,14 @@ doset()
}
destroy_nhwindow(tmpwin);
if (need_redraw)
(void) doredraw();
if (need_redraw) {
if (flags.lit_corridor && iflags.use_color) {
showsyms[S_drkroom]=showsyms[S_litroom];
} else {
showsyms[S_drkroom]=showsyms[S_stone];
}
(void) doredraw();
}
return 0;
}