Mercurial > hg > early-roguelike
comparison xrogue/bolt.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 | 7c1cb43f346e |
| children |
comparison
equal
deleted
inserted
replaced
| 303:e06ebc407615 | 304:e52a8a7ad4c5 |
|---|---|
| 51 change = FALSE; | 51 change = FALSE; |
| 52 | 52 |
| 53 bounces = 0; /* No bounces yet */ | 53 bounces = 0; /* No bounces yet */ |
| 54 nofont(cw); | 54 nofont(cw); |
| 55 for (y = 0; y < BOLT_LENGTH && !used; y++) { | 55 for (y = 0; y < BOLT_LENGTH && !used; y++) { |
| 56 ch = winat(pos.y, pos.x); | 56 ch = winat(pos.y, pos.x) & A_CHARTEXT; |
| 57 spotpos[y].place = pos; | 57 spotpos[y].place = pos; |
| 58 spotpos[y].oldch = mvwinch(cw, pos.y, pos.x); | 58 spotpos[y].oldch = mvwinch(cw, pos.y, pos.x) & A_CHARTEXT; |
| 59 | 59 |
| 60 /* Are we at hero? */ | 60 /* Are we at hero? */ |
| 61 if (ce(pos, hero)) goto at_hero; | 61 if (ce(pos, hero)) goto at_hero; |
| 62 | 62 |
| 63 switch (ch) { | 63 switch (ch) { |
| 68 if (dirch == '-' || dirch == '|') { | 68 if (dirch == '-' || dirch == '|') { |
| 69 dir.y = -dir.y; | 69 dir.y = -dir.y; |
| 70 dir.x = -dir.x; | 70 dir.x = -dir.x; |
| 71 } | 71 } |
| 72 else { | 72 else { |
| 73 unsigned char chx = mvinch(pos.y-dir.y, pos.x), | 73 unsigned char chx = mvinch(pos.y-dir.y, pos.x) & A_CHARTEXT, |
| 74 chy = mvinch(pos.y, pos.x-dir.x); | 74 chy = mvinch(pos.y, pos.x-dir.x) & A_CHARTEXT; |
| 75 bool anychange = FALSE; /* Did we change anthing */ | 75 bool anychange = FALSE; /* Did we change anthing */ |
| 76 | 76 |
| 77 if (chy == WALL || chy == SECRETDOOR || | 77 if (chy == WALL || chy == SECRETDOOR || |
| 78 chy == HORZWALL || chy == VERTWALL) { | 78 chy == HORZWALL || chy == VERTWALL) { |
| 79 dir.y = -dir.y; | 79 dir.y = -dir.y; |
