Mercurial > hg > early-roguelike
comparison srogue/move.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 |
comparison
equal
deleted
inserted
replaced
303:e06ebc407615 | 304:e52a8a7ad4c5 |
---|---|
201 ch = player.t_oldch; | 201 ch = player.t_oldch; |
202 mvwaddch(cw, hero.y, hero.x, ch); | 202 mvwaddch(cw, hero.y, hero.x, ch); |
203 mvwaddch(cw, nh.y, nh.x, PLAYER); | 203 mvwaddch(cw, nh.y, nh.x, PLAYER); |
204 hero = nh; | 204 hero = nh; |
205 player.t_room = rp; | 205 player.t_room = rp; |
206 player.t_oldch = mvinch(hero.y, hero.x); | 206 player.t_oldch = mvinch(hero.y, hero.x) & A_CHARTEXT; |
207 } | 207 } |
208 | 208 |
209 /* | 209 /* |
210 * Called to illuminate a room. | 210 * Called to illuminate a room. |
211 * If it is dark, remove anything that might move. | 211 * If it is dark, remove anything that might move. |
261 } | 261 } |
262 else { | 262 else { |
263 mit = THINGPTR(item); | 263 mit = THINGPTR(item); |
264 if (mit->t_oldch == ' ') | 264 if (mit->t_oldch == ' ') |
265 if (!rf_on(rp,ISDARK)) | 265 if (!rf_on(rp,ISDARK)) |
266 mit->t_oldch = mvinch(y, x); | 266 mit->t_oldch = mvinch(y, x) & A_CHARTEXT; |
267 if (levtype == MAZELEV) | 267 if (levtype == MAZELEV) |
268 ch = mvinch(y, x); | 268 ch = mvinch(y, x) & A_CHARTEXT; |
269 } | 269 } |
270 } | 270 } |
271 if (rf_on(rp,ISDARK)) { | 271 if (rf_on(rp,ISDARK)) { |
272 rch = mvwinch(cw, y, x); | 272 rch = mvwinch(cw, y, x) & A_CHARTEXT; |
273 if (isatrap(rch)) { | 273 if (isatrap(rch)) { |
274 ch = rch; /* if its a trap */ | 274 ch = rch; /* if its a trap */ |
275 } | 275 } |
276 else { /* try other things */ | 276 else { /* try other things */ |
277 switch (rch) { | 277 switch (rch) { |
318 ch = tp->t_disguise; | 318 ch = tp->t_disguise; |
319 else if (pl_off(CANSEE)) { | 319 else if (pl_off(CANSEE)) { |
320 if (ch == 's') | 320 if (ch == 's') |
321 ch = ' '; /* shadows show as a blank */ | 321 ch = ' '; /* shadows show as a blank */ |
322 else | 322 else |
323 ch = mvinch(y, x); /* hide invisibles */ | 323 ch = mvinch(y, x) & A_CHARTEXT; /* hide invisibles */ |
324 } | 324 } |
325 } | 325 } |
326 } | 326 } |
327 return ch; | 327 return ch; |
328 } | 328 } |
334 int | 334 int |
335 be_trapped(struct coord *tc, struct thing *th) | 335 be_trapped(struct coord *tc, struct thing *th) |
336 { | 336 { |
337 reg struct trap *trp; | 337 reg struct trap *trp; |
338 reg int ch, ishero; | 338 reg int ch, ishero; |
339 struct linked_list *mon; | |
340 char stuckee[35], seeit, sayso; | 339 char stuckee[35], seeit, sayso; |
341 | 340 |
342 if ((trp = trap_at(tc->y, tc->x)) == NULL) | 341 if ((trp = trap_at(tc->y, tc->x)) == NULL) |
343 return 0; | 342 return 0; |
344 ishero = (th == &player); | 343 ishero = (th == &player); |