Make getpos for doors also target drawbridges

This commit is contained in:
Pasi Kallinen
2016-05-27 18:47:56 +03:00
parent 49da8b87d8
commit d51db5a992
3 changed files with 7 additions and 8 deletions

View File

@@ -227,6 +227,10 @@
#define DARKROOMSYM (Is_rogue_level(&u.uz) ? S_stone : S_darkroom)
#define is_cmap_trap(i) ((i) >= S_arrow_trap && (i) <= S_polymorph_trap)
#define is_cmap_drawbridge(i) ((i) >= S_vodbridge && (i) <= S_hcdbridge)
#define is_cmap_door(i) ((i) >= S_vodoor && (i) <= S_hcdoor)
struct symdef {
uchar sym;
const char *explanation;

View File

@@ -137,11 +137,9 @@ int glyph, gloc;
&& glyph != objnum_to_glyph(BOULDER)
&& glyph != objnum_to_glyph(ROCK));
case GLOC_DOOR: return (glyph_is_cmap(glyph)
&& ((glyph_to_cmap(glyph) == S_hcdoor)
|| (glyph_to_cmap(glyph) == S_vcdoor)
|| (glyph_to_cmap(glyph) == S_hodoor)
|| (glyph_to_cmap(glyph) == S_vodoor)
|| (glyph_to_cmap(glyph) == S_ndoor)));
&& (is_cmap_door(glyph_to_cmap(glyph))
|| is_cmap_drawbridge(glyph_to_cmap(glyph))
|| glyph_to_cmap(glyph) == S_ndoor));
}
}

View File

@@ -775,9 +775,6 @@ const char **firstmatch;
}
}
#define is_cmap_trap(i) ((i) >= S_arrow_trap && (i) <= S_polymorph_trap)
#define is_cmap_drawbridge(i) ((i) >= S_vodbridge && (i) <= S_hcdbridge)
/* Now check for graphics symbols */
alt_i = (sym == (looked ? showsyms[0] : defsyms[0].sym)) ? 0 : (2 + 1);
for (hit_trap = FALSE, i = 0; i < MAXPCHARS; i++) {