add an mgflags parameter to mapglyph() to alter how it behaves internally
avoid a recent save-value,call,restore-value kludge by adding an mgflags parameter to mapglyph() to control its behavior Changes to be committed: modified: doc/window.doc modified: include/extern.h modified: include/hack.h modified: src/detect.c modified: src/mapglyph.c modified: src/pager.c modified: sys/amiga/winfuncs.c modified: sys/wince/mhmap.c modified: win/Qt/qt_win.cpp modified: win/Qt4/qt4map.cpp modified: win/X11/winmap.c modified: win/curses/cursdial.c modified: win/curses/cursinvt.c modified: win/curses/cursmain.c modified: win/gem/wingem.c modified: win/tty/wintty.c modified: win/win32/mhmap.c modified: win/win32/mswproc.c
This commit is contained in:
17
src/pager.c
17
src/pager.c
@@ -826,7 +826,7 @@ struct permonst **for_supplement;
|
||||
|
||||
glyph = glyph_at(cc.x, cc.y);
|
||||
/* Convert glyph at selected position to a symbol for use below. */
|
||||
(void) mapglyph(glyph, &sym, &oc, &os, cc.x, cc.y);
|
||||
(void) mapglyph(glyph, &sym, &oc, &os, cc.x, cc.y, 0);
|
||||
|
||||
Sprintf(prefix, "%s ", encglyph(glyph));
|
||||
} else
|
||||
@@ -1055,21 +1055,10 @@ struct permonst **for_supplement;
|
||||
if (looked) {
|
||||
int oc = 0, idx = SYM_PET_OVERRIDE + SYM_OFF_X;
|
||||
unsigned os = 0;
|
||||
nhsym save_override;
|
||||
|
||||
if (Is_rogue_level(&u.uz)) {
|
||||
save_override = ov_rogue_syms[idx];
|
||||
ov_rogue_syms[idx] = 0;
|
||||
} else {
|
||||
save_override = ov_primary_syms[idx];
|
||||
ov_primary_syms[idx] = 0;
|
||||
}
|
||||
/* convert to symbol without override in effect */
|
||||
(void) mapglyph(glyph, &sym, &oc, &os, cc.x, cc.y);
|
||||
if (Is_rogue_level(&u.uz))
|
||||
ov_rogue_syms[idx] = save_override;
|
||||
else
|
||||
ov_primary_syms[idx] = save_override;
|
||||
(void) mapglyph(glyph, &sym, &oc, &os,
|
||||
cc.x, cc.y, MG_FLAG_NOOVERRIDE);
|
||||
goto check_monsters;
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user