Mercurial > hg > early-roguelike
comparison xrogue/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 | 2236ef808bcb |
children | 2f0eb38da609 |
comparison
equal
deleted
inserted
replaced
303:e06ebc407615 | 304:e52a8a7ad4c5 |
---|---|
267 if (isalpha(mvwinch(cw, y, x))) | 267 if (isalpha(mvwinch(cw, y, x))) |
268 mvwaddch(cw, y, x, tp->t_oldch); | 268 mvwaddch(cw, y, x, tp->t_oldch); |
269 mvwaddch(mw, y, x, ' '); | 269 mvwaddch(mw, y, x, ' '); |
270 mvwaddch(mw, tp->t_pos.y, tp->t_pos.x, tp->t_type); | 270 mvwaddch(mw, tp->t_pos.y, tp->t_pos.x, tp->t_type); |
271 if (tp->t_pos.y != y || tp->t_pos.x != x) | 271 if (tp->t_pos.y != y || tp->t_pos.x != x) |
272 tp->t_oldch = mvwinch(cw, tp->t_pos.y, tp->t_pos.x); | 272 tp->t_oldch = mvwinch(cw, tp->t_pos.y, tp->t_pos.x) & A_CHARTEXT; |
273 /* | 273 /* |
274 * check to see if room that creature appears in should | 274 * check to see if room that creature appears in should |
275 * light up | 275 * light up |
276 */ | 276 */ |
277 if (on(*tp, HASFIRE)) { | 277 if (on(*tp, HASFIRE)) { |
339 register unsigned char ch; | 339 register unsigned char ch; |
340 struct object strike; /* don't want to change sticks attributes */ | 340 struct object strike; /* don't want to change sticks attributes */ |
341 | 341 |
342 direction->y += hero.y; | 342 direction->y += hero.y; |
343 direction->x += hero.x; | 343 direction->x += hero.x; |
344 ch = winat(direction->y, direction->x); | 344 ch = winat(direction->y, direction->x) & A_CHARTEXT; |
345 if (isalpha(ch)) | 345 if (isalpha(ch)) |
346 { | 346 { |
347 strike = *obj; | 347 strike = *obj; |
348 strike.o_hplus = 7; | 348 strike.o_hplus = 7; |
349 if (EQUAL(ws_type[which], "staff")) | 349 if (EQUAL(ws_type[which], "staff")) |
548 } | 548 } |
549 for (m1=tp->t_pos.x-1 ; m1 <= tp->t_pos.x+1 ; m1++) { | 549 for (m1=tp->t_pos.x-1 ; m1 <= tp->t_pos.x+1 ; m1++) { |
550 for(m2=tp->t_pos.y-1 ; m2<=tp->t_pos.y+1 ; m2++) { | 550 for(m2=tp->t_pos.y-1 ; m2<=tp->t_pos.y+1 ; m2++) { |
551 if (m1 == hero.x && m2 == hero.y) | 551 if (m1 == hero.x && m2 == hero.y) |
552 continue; | 552 continue; |
553 ch = winat(m2,m1); | 553 ch = winat(m2,m1) & A_CHARTEXT; |
554 if (shoot_ok(ch)) { | 554 if (shoot_ok(ch)) { |
555 mp.x = m1; /* create it */ | 555 mp.x = m1; /* create it */ |
556 mp.y = m2; | 556 mp.y = m2; |
557 titem = new_item(sizeof(struct thing)); | 557 titem = new_item(sizeof(struct thing)); |
558 new_monster(titem,(short)tp->t_index,&mp,FALSE); | 558 new_monster(titem,(short)tp->t_index,&mp,FALSE); |