comparison arogue7/util.c @ 304:e52a8a7ad4c5

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.
author John "Elwin" Edwards
date Wed, 14 Apr 2021 18:55:33 -0400
parents d71e5e1f49cf
children
comparison
equal deleted inserted replaced
303:e06ebc407615 304:e52a8a7ad4c5
581 } while (direction->y == 0 && direction->x == 0); 581 } while (direction->y == 0 && direction->x == 0);
582 } 582 }
583 else if (on(player, ISFLEE)) { 583 else if (on(player, ISFLEE)) {
584 y = hero.y; 584 y = hero.y;
585 x = hero.x; 585 x = hero.x;
586 while (shoot_ok(winat(y, x))) { 586 while (shoot_ok(CCHAR( winat(y, x) ))) {
587 y += direction->y; 587 y += direction->y;
588 x += direction->x; 588 x += direction->x;
589 } 589 }
590 if (isalpha(mvwinch(mw, y, x))) { 590 if (isalpha(mvwinch(mw, y, x))) {
591 if (y == player.t_dest->y && x == player.t_dest->x) { 591 if (y == player.t_dest->y && x == player.t_dest->x) {
819 * Don't show room walls if he is in a passage and 819 * Don't show room walls if he is in a passage and
820 * check for maze turns 820 * check for maze turns
821 */ 821 */
822 if (off(player, ISBLIND)) 822 if (off(player, ISBLIND))
823 { 823 {
824 if (y == hero.y && x == hero.x 824 if ((y == hero.y && x == hero.x)
825 || (inpass && (ch == '-' || ch == '|'))) 825 || (inpass && (ch == '-' || ch == '|')))
826 continue; 826 continue;
827 827
828 /* Did we come to a crossroads in a maze? */ 828 /* Did we come to a crossroads in a maze? */
829 if (levtype == MAZELEV && 829 if (levtype == MAZELEV &&
1148 cp.y = y; 1148 cp.y = y;
1149 cp.x = x; 1149 cp.x = x;
1150 cpp = &cp; 1150 cpp = &cp;
1151 for (rp = rooms, i = 0; i < MAXROOMS; rp++, i++) 1151 for (rp = rooms, i = 0; i < MAXROOMS; rp++, i++)
1152 if (inroom(rp, cpp)) 1152 if (inroom(rp, cpp))
1153 {
1153 if (y == rp->r_pos.y || y == rp->r_pos.y + rp->r_max.y - 1) 1154 if (y == rp->r_pos.y || y == rp->r_pos.y + rp->r_max.y - 1)
1154 return('-'); 1155 return('-');
1155 else 1156 else
1156 return('|'); 1157 return('|');
1158 }
1157 1159
1158 return('p'); 1160 return('p');
1159 } 1161 }
1160 1162
1161 /* 1163 /*