Make REINCARNATION unconditional.
There is a lot of code affected by this, and Pat Rankin correctly observes that it would be better to store roguelike as a level flag rather than just using Is_rogue_level. A note for the future.
This commit is contained in:
@@ -1644,12 +1644,7 @@ void NetHackQtMapWindow::paintEvent(QPaintEvent* event)
|
||||
|
||||
painter.begin(this);
|
||||
|
||||
if (
|
||||
#ifdef REINCARNATION
|
||||
Is_rogue_level(&u.uz) ||
|
||||
#endif
|
||||
iflags.wc_ascii_map
|
||||
)
|
||||
if (Is_rogue_level(&u.uz) || iflags.wc_ascii_map)
|
||||
{
|
||||
// You enter a VERY primitive world!
|
||||
|
||||
@@ -1730,7 +1725,6 @@ void NetHackQtMapWindow::paintEvent(QPaintEvent* event)
|
||||
}
|
||||
|
||||
if (garea.contains(cursor)) {
|
||||
#ifdef REINCARNATION
|
||||
if (Is_rogue_level(&u.uz)) {
|
||||
#ifdef TEXTCOLOR
|
||||
painter.setPen( white );
|
||||
@@ -1738,7 +1732,6 @@ void NetHackQtMapWindow::paintEvent(QPaintEvent* event)
|
||||
painter.setPen( green ); // REALLY primitive
|
||||
#endif
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
int hp100;
|
||||
if (u.mtimedone) {
|
||||
|
||||
@@ -839,10 +839,7 @@ display_map_window(wp)
|
||||
register int row;
|
||||
struct map_info_t *map_info = wp->map_information;
|
||||
|
||||
if ((
|
||||
#ifdef REINCARNATION
|
||||
Is_rogue_level(&u.uz) ? map_info->is_tile :
|
||||
#endif
|
||||
if ((Is_rogue_level(&u.uz) ? map_info->is_tile :
|
||||
(map_info->is_tile != iflags.wc_tiled_map)) &&
|
||||
map_info->tile_map.image_width) {
|
||||
/* changed map display mode, re-display the full map */
|
||||
@@ -850,11 +847,7 @@ display_map_window(wp)
|
||||
sizeof(map_info->t_start));
|
||||
(void) memset((genericptr_t) map_info->t_stop, (char) COLNO-1,
|
||||
sizeof(map_info->t_stop));
|
||||
map_info->is_tile = iflags.wc_tiled_map
|
||||
#ifdef REINCARNATION
|
||||
&& !Is_rogue_level(&u.uz)
|
||||
#endif
|
||||
;
|
||||
map_info->is_tile = iflags.wc_tiled_map && !Is_rogue_level(&u.uz);
|
||||
XClearWindow(XtDisplay(wp->w), XtWindow(wp->w));
|
||||
set_map_size(wp, COLNO, ROWNO);
|
||||
check_cursor_visibility(wp);
|
||||
|
||||
@@ -911,9 +911,7 @@ int x, y;
|
||||
|
||||
void mar_print_gl_char(winid,xchar,xchar,int);
|
||||
|
||||
#ifdef REINCARNATION
|
||||
extern int mar_set_rogue(int);
|
||||
#endif
|
||||
|
||||
extern void mar_add_pet_sign(winid,int,int);
|
||||
|
||||
@@ -926,9 +924,7 @@ Gem_print_glyph(window, x, y, glyph)
|
||||
/* Move the cursor. */
|
||||
Gem_curs(window, x,y);
|
||||
|
||||
# ifdef REINCARNATION
|
||||
mar_set_rogue(Is_rogue_level(&u.uz) ? TRUE : FALSE);
|
||||
# endif
|
||||
mar_set_rogue(Is_rogue_level(&u.uz) ? TRUE : FALSE);
|
||||
|
||||
x--; /* MAR -- because x ranges from 1 to COLNO */
|
||||
if(mar_set_tile_mode(-1)){
|
||||
@@ -960,9 +956,7 @@ void mar_print_gl_char(window, x, y, glyph)
|
||||
|
||||
#ifdef TEXTCOLOR
|
||||
/* Turn off color if rogue level. */
|
||||
# ifdef REINCARNATION
|
||||
if (Is_rogue_level(&u.uz)) color = NO_COLOR;
|
||||
# endif
|
||||
#endif /* TEXTCOLOR */
|
||||
|
||||
mar_print_char(window,x,y,ch,color);
|
||||
|
||||
@@ -1043,9 +1043,7 @@ void mswin_select_map_mode(int mode)
|
||||
data = (PNHMainWindow)GetWindowLongPtr(GetNHApp()->hMainWnd, GWLP_USERDATA);
|
||||
|
||||
/* override for Rogue level */
|
||||
#ifdef REINCARNATION
|
||||
if( Is_rogue_level(&u.uz) && !IS_MAP_ASCII(mode) ) return;
|
||||
#endif
|
||||
|
||||
/* set map mode menu mark */
|
||||
if( IS_MAP_ASCII(mode) ) {
|
||||
|
||||
@@ -603,12 +603,8 @@ void onPaint(HWND hWnd)
|
||||
paint_rt.right = min(data->xPos + (ps.rcPaint.right - data->map_orig.x)/data->xScrTile+1, COLNO);
|
||||
paint_rt.bottom = min(data->yPos + (ps.rcPaint.bottom - data->map_orig.y)/data->yScrTile+1, ROWNO);
|
||||
|
||||
if( data->bAsciiMode
|
||||
#ifdef REINCARNATION
|
||||
|| Is_rogue_level(&u.uz)
|
||||
if( data->bAsciiMode || Is_rogue_level(&u.uz) ) {
|
||||
/* You enter a VERY primitive world! */
|
||||
#endif
|
||||
) {
|
||||
HGDIOBJ oldFont;
|
||||
|
||||
oldFont = SelectObject(hDC, data->hMapFont);
|
||||
|
||||
@@ -802,14 +802,12 @@ void mswin_clear_nhwindow(winid wid)
|
||||
(wid < MAXWINDOWS) &&
|
||||
(GetNHApp()->windowlist[wid].win != NULL))
|
||||
{
|
||||
#ifdef REINCARNATION
|
||||
if( GetNHApp()->windowlist[wid].type == NHW_MAP ) {
|
||||
if( Is_rogue_level(&u.uz) )
|
||||
mswin_map_mode(mswin_hwnd_from_winid(WIN_MAP), ROGUE_LEVEL_MAP_MODE);
|
||||
else
|
||||
mswin_map_mode(mswin_hwnd_from_winid(WIN_MAP), iflags.wc_map_mode);
|
||||
}
|
||||
#endif
|
||||
|
||||
SendMessage(
|
||||
GetNHApp()->windowlist[wid].win,
|
||||
|
||||
Reference in New Issue
Block a user