Mercurial > hg > early-roguelike
comparison srogue/sticks.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 | 28e22fb35989 |
comparison
equal
deleted
inserted
replaced
303:e06ebc407615 | 304:e52a8a7ad4c5 |
---|---|
217 x = hero.x; | 217 x = hero.x; |
218 do { | 218 do { |
219 y += delta.y; | 219 y += delta.y; |
220 x += delta.x; | 220 x += delta.x; |
221 } while (step_ok(winat(y, x))); | 221 } while (step_ok(winat(y, x))); |
222 if (isalpha(monster = mvwinch(mw, y, x))) { | 222 if (isalpha(monster = mvwinch(mw, y, x) & A_CHARTEXT)) { |
223 int omonst; | 223 int omonst; |
224 | 224 |
225 if (wh != WS_MINVIS) | 225 if (wh != WS_MINVIS) |
226 unhold(monster); | 226 unhold(monster); |
227 item = find_mons(y, x); | 227 item = find_mons(y, x); |
269 mvwaddch(cw, y, x, tp->t_oldch); | 269 mvwaddch(cw, y, x, tp->t_oldch); |
270 tp->t_dest = &hero; | 270 tp->t_dest = &hero; |
271 tp->t_flags |= ISRUN; | 271 tp->t_flags |= ISRUN; |
272 mvwaddch(mw, y, x, ' '); | 272 mvwaddch(mw, y, x, ' '); |
273 mvwaddch(mw, tp->t_pos.y, tp->t_pos.x, monster); | 273 mvwaddch(mw, tp->t_pos.y, tp->t_pos.x, monster); |
274 tp->t_oldch = mvwinch(cw,tp->t_pos.y,tp->t_pos.x); | 274 tp->t_oldch = mvwinch(cw,tp->t_pos.y,tp->t_pos.x) & A_CHARTEXT; |
275 } | 275 } |
276 } | 276 } |
277 } | 277 } |
278 when WS_MISSILE: | 278 when WS_MISSILE: |
279 { | 279 { |