Mercurial > hg > early-roguelike
comparison srogue/chase.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 | 94a0d9dd5ce1 |
children |
comparison
equal
deleted
inserted
replaced
303:e06ebc407615 | 304:e52a8a7ad4c5 |
---|---|
208 return((ch == GONER) ? -1 : 0); | 208 return((ch == GONER) ? -1 : 0); |
209 } | 209 } |
210 } | 210 } |
211 if (pl_off(ISBLIND)) | 211 if (pl_off(ISBLIND)) |
212 mvwaddch(cw,th->t_pos.y,th->t_pos.x,th->t_oldch); | 212 mvwaddch(cw,th->t_pos.y,th->t_pos.x,th->t_oldch); |
213 sch = mvwinch(cw, ch_ret.y, ch_ret.x); | 213 sch = mvwinch(cw, ch_ret.y, ch_ret.x) & A_CHARTEXT; |
214 if (rer != NULL && rf_on(rer,ISDARK) && sch == FLOOR && | 214 if (rer != NULL && rf_on(rer,ISDARK) && sch == FLOOR && |
215 DISTANCE(ch_ret.y,ch_ret.x,th->t_pos.y,th->t_pos.x) < 3 && | 215 DISTANCE(ch_ret.y,ch_ret.x,th->t_pos.y,th->t_pos.x) < 3 && |
216 pl_off(ISBLIND)) | 216 pl_off(ISBLIND)) |
217 th->t_oldch = ' '; | 217 th->t_oldch = ' '; |
218 else | 218 else |
450 bool | 450 bool |
451 diag_ok(struct coord *sp, struct coord *ep) | 451 diag_ok(struct coord *sp, struct coord *ep) |
452 { | 452 { |
453 if (ep->x == sp->x || ep->y == sp->y) | 453 if (ep->x == sp->x || ep->y == sp->y) |
454 return TRUE; | 454 return TRUE; |
455 if (step_ok(mvinch(ep->y,sp->x)) && step_ok(mvinch(sp->y,ep->x))) | 455 if (step_ok(mvinch(ep->y,sp->x) & A_CHARTEXT) && |
456 step_ok(mvinch(sp->y,ep->x) & A_CHARTEXT)) | |
456 return TRUE; | 457 return TRUE; |
457 return FALSE; | 458 return FALSE; |
458 } | 459 } |
459 | 460 |
460 | 461 |