#define DISMOUNT_BYCHOICE 6
/* Special returns from mapglyph() */
-#define MG_CORPSE 0x01
-#define MG_INVIS 0x02
-#define MG_DETECT 0x04
-#define MG_PET 0x08
-#define MG_RIDDEN 0x10
-#define MG_STATUE 0x20
+#define MG_CORPSE 0x01
+#define MG_INVIS 0x02
+#define MG_DETECT 0x04
+#define MG_PET 0x08
+#define MG_RIDDEN 0x10
+#define MG_STATUE 0x20
#define MG_OBJPILE 0x40 /* more than one stack of objects */
+#define MG_BW_LAVA 0x80 /* 'black & white lava': highlight lava if it
+ can't be distringuished from water by color */
/* sellobj_state() states */
#define SELL_NORMAL (0)
} else if (!iflags.use_color && offset == S_lava
&& (showsyms[idx] == showsyms[S_pool + SYM_OFF_P]
|| showsyms[idx] == showsyms[S_water + SYM_OFF_P])) {
- /* temporary? hack; makes tty use inverse video if the
- corresponding boolean option is enabled */
- special |= MG_DETECT;
+ special |= MG_BW_LAVA;
} else {
cmap_color(offset);
}
}
#ifdef TEXTCOLOR
co_ptr = &map_info->text_map.colors[y][x];
- colordif = (((special & MG_PET) && iflags.hilite_pet)
- || ((special & MG_OBJPILE) && iflags.hilite_pile))
+ colordif = (((special & MG_PET) != 0 && iflags.hilite_pet)
+ || ((special & MG_OBJPILE) != 0 && iflags.hilite_pile)
+ || ((special & (MG_DETECT | MG_BW_LAVA)) != 0))
? CLR_MAX : 0;
if (*co_ptr != (uchar) (color + colordif)) {
*co_ptr = (uchar) (color + colordif);
/*
* Do the actual work of the putting characters onto our X window. This
* is called from the expose event routine, the display window (flush)
- * routine, and the display cursor routine. The later involves inverting
+ * routine, and the display cursor routine. The last involves inverting
* the foreground and background colors, which are also inverted when the
* position's color is above CLR_MAX.
*
struct text_map_info_t *text_map = &map_info->text_map;
#ifdef TEXTCOLOR
- if (iflags.use_color) {
+ {
register char *c_ptr;
char *t_ptr;
int cur_col, color, win_ystart;
}
XDrawImageString(XtDisplay(wp->w), XtWindow(wp->w),
- cur_inv ? text_map->inv_color_gcs[color]
- : text_map->color_gcs[color],
+ iflags.use_color
+ ? (cur_inv
+ ? text_map->inv_color_gcs[color]
+ : text_map->color_gcs[color])
+ : (cur_inv
+ ? text_map->inv_copy_gc
+ : text_map->copy_gc),
text_map->square_lbearing
+ (text_map->square_width * cur_col),
win_ystart, t_ptr, count);
cur_col += count;
} /* col loop */
} /* row loop */
- } else
-#endif /* TEXTCOLOR */
+ }
+#else /* !TEXTCOLOR */
{
int win_row, win_xstart;
count);
}
}
+#endif /* ?TEXTCOLOR */
}
}
/* must be after color check; term_end_color may turn off inverse too */
if (((special & MG_PET) && iflags.hilite_pet)
|| ((special & MG_OBJPILE) && iflags.hilite_pile)
- || ((special & MG_DETECT) && iflags.use_inverse)) {
+ || ((special & MG_DETECT) && iflags.use_inverse)
+ || ((special & MG_BW_LAVA) && iflags.use_inverse)) {
term_start_attr(ATR_INVERSE);
reverse_on = TRUE;
}