Mercurial > hg > early-roguelike
comparison rogue4/misc.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 | 0250220d8cdd |
children |
comparison
equal
deleted
inserted
replaced
303:e06ebc407615 | 304:e52a8a7ad4c5 |
---|---|
56 register struct room *rp; | 56 register struct room *rp; |
57 register int ey, ex; | 57 register int ey, ex; |
58 register int passcount = 0; | 58 register int passcount = 0; |
59 register char pfl, *fp, pch; | 59 register char pfl, *fp, pch; |
60 register int sy, sx, sumhero = 0, diffhero = 0; | 60 register int sy, sx, sumhero = 0, diffhero = 0; |
61 register int oldx, oldy; | 61 |
62 | |
63 getyx(stdscr, oldy, oldx); | |
64 rp = proom; | 62 rp = proom; |
65 if (!ce(oldpos, hero)) | 63 if (!ce(oldpos, hero)) |
66 { | 64 { |
67 if ((oldrp->r_flags & (ISGONE|ISDARK)) == ISDARK && !on(player,ISBLIND)) | 65 if ((oldrp->r_flags & (ISGONE|ISDARK)) == ISDARK && !on(player,ISBLIND)) |
68 { | 66 { |
113 * THIS MUST BE CHANGED ALSO | 111 * THIS MUST BE CHANGED ALSO |
114 */ | 112 */ |
115 fp = &_flags[index]; | 113 fp = &_flags[index]; |
116 ch = _level[index]; | 114 ch = _level[index]; |
117 if (pch != DOOR && ch != DOOR) | 115 if (pch != DOOR && ch != DOOR) |
116 { | |
118 if ((pfl & F_PASS) != (*fp & F_PASS)) | 117 if ((pfl & F_PASS) != (*fp & F_PASS)) |
119 continue; | 118 continue; |
120 else if ((*fp & F_PASS) && (*fp & F_PNUM) != (pfl & F_PNUM)) | 119 else if ((*fp & F_PASS) && (*fp & F_PNUM) != (pfl & F_PNUM)) |
121 continue; | 120 continue; |
121 } | |
122 | 122 |
123 if ((tp = _monst[index]) != NULL) | 123 if ((tp = _monst[index]) != NULL) |
124 { | |
124 if (on(player, SEEMONST) && on(*tp, ISINVIS)) | 125 if (on(player, SEEMONST) && on(*tp, ISINVIS)) |
125 { | 126 { |
126 if (door_stop && !firstmove) | 127 if (door_stop && !firstmove) |
127 running = FALSE; | 128 running = FALSE; |
128 continue; | 129 continue; |
135 (!(rp->r_flags & ISDARK) && !on(player, ISBLIND))) | 136 (!(rp->r_flags & ISDARK) && !on(player, ISBLIND))) |
136 tp->t_oldch = _level[index]; | 137 tp->t_oldch = _level[index]; |
137 if (see_monst(tp)) | 138 if (see_monst(tp)) |
138 ch = tp->t_disguise; | 139 ch = tp->t_disguise; |
139 } | 140 } |
141 } | |
140 | 142 |
141 move(y, x); | 143 move(y, x); |
142 if (ch != inch()) | 144 if (ch != inch()) |
143 addch(ch); | 145 addch(ch); |
144 | 146 |