Mercurial > hg > early-roguelike
comparison rogue4/rooms.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 | 1b73a8641b37 |
| children |
comparison
equal
deleted
inserted
replaced
| 303:e06ebc407615 | 304:e52a8a7ad4c5 |
|---|---|
| 233 rp = proom; | 233 rp = proom; |
| 234 proom = &passages[flat(cp->y, cp->x) & F_PNUM]; | 234 proom = &passages[flat(cp->y, cp->x) & F_PNUM]; |
| 235 floor = ((rp->r_flags & ISDARK) && !on(player, ISBLIND)) ? ' ' : FLOOR; | 235 floor = ((rp->r_flags & ISDARK) && !on(player, ISBLIND)) ? ' ' : FLOOR; |
| 236 for (y = rp->r_pos.y + 1; y < rp->r_max.y + rp->r_pos.y - 1; y++) | 236 for (y = rp->r_pos.y + 1; y < rp->r_max.y + rp->r_pos.y - 1; y++) |
| 237 for (x = rp->r_pos.x + 1; x < rp->r_max.x + rp->r_pos.x - 1; x++) | 237 for (x = rp->r_pos.x + 1; x < rp->r_max.x + rp->r_pos.x - 1; x++) |
| 238 switch (ch = mvinch(y, x)) | 238 switch (ch = mvinch(y, x) & A_CHARTEXT) |
| 239 { | 239 { |
| 240 case ' ': | 240 case ' ': |
| 241 case TRAP: | 241 case TRAP: |
| 242 case STAIRS: | 242 case STAIRS: |
| 243 break; | 243 break; |
| 249 /* | 249 /* |
| 250 * to check for monster, we have to strip out | 250 * to check for monster, we have to strip out |
| 251 * standout bit | 251 * standout bit |
| 252 */ | 252 */ |
| 253 if (isupper(toascii(ch))) | 253 if (isupper(toascii(ch))) |
| 254 { | |
| 254 if (on(player, SEEMONST)) | 255 if (on(player, SEEMONST)) |
| 255 { | 256 { |
| 256 standout(); | 257 standout(); |
| 257 addch(ch); | 258 addch(ch); |
| 258 standend(); | 259 standend(); |
| 268 #ifdef WIZARD | 269 #ifdef WIZARD |
| 269 else | 270 else |
| 270 msg("couldn't find monster in leave_room at (%d,%d)", y, x); | 271 msg("couldn't find monster in leave_room at (%d,%d)", y, x); |
| 271 #endif | 272 #endif |
| 272 } | 273 } |
| 274 } | |
| 273 | 275 |
| 274 addch(floor); | 276 addch(floor); |
| 275 } | 277 } |
| 276 door_open(rp); | 278 door_open(rp); |
| 277 } | 279 } |
