Fix many compiler warnings.

There should only be two changes in behavior:

arogue7/fight.c, arogue7/fight.c: a to-hit bonus is now correctly
applied to characters who are not monks instead of monks who are not
empty-handed.

urogue/fight.c: fixed an interaction with the "debug" macro that could
cause the wrong message to be displayed.
This commit is contained in:
John "Elwin" Edwards 2021-04-14 18:55:33 -04:00
parent 6f21b5b88a
commit 6c3cd116ff
122 changed files with 374 additions and 280 deletions

View file

@ -435,8 +435,8 @@ m_select(struct thing *th, bool flee)
* of the room, the monster would already be on the best door out;
* so he would never move.
*/
if ((sch = mvwinch(stdscr, th->t_pos.y, th->t_pos.x)) == DOOR ||
sch == SECRETDOOR || sch == PASSAGE) {
sch = mvwinch(stdscr, th->t_pos.y, th->t_pos.x) & A_CHARTEXT;
if (sch == DOOR || sch == SECRETDOOR || sch == PASSAGE) {
rer = NULL;
}
this = *th->t_dest;
@ -464,7 +464,8 @@ m_select(struct thing *th, bool flee)
char dch='\0'; /* Door character */
if ((th->t_doorgoal.x != -1) && (th->t_doorgoal.y != -1))
dch = mvwinch(stdscr, th->t_doorgoal.y, th->t_doorgoal.x);
dch = mvwinch(stdscr, th->t_doorgoal.y, th->t_doorgoal.x) &
A_CHARTEXT;
/* Do we have a valid goal? */
if ((dch == PASSAGE || dch == DOOR) && /* A real door */
@ -488,7 +489,7 @@ m_select(struct thing *th, bool flee)
exitx = exit->x;
/* Make sure it is a real door */
dch = mvwinch(stdscr, exity, exitx);
dch = mvwinch(stdscr, exity, exitx) & A_CHARTEXT;
if (dch == PASSAGE || dch == DOOR) {
/* Don't count a door if we are fleeing from someone and
* he is standing on it. Also, don't count it if he is