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.
This commit is contained in:
parent
6f21b5b88a
commit
6c3cd116ff
122 changed files with 374 additions and 280 deletions
|
|
@ -319,7 +319,7 @@ be_trapped(struct thing *th, coord *tc)
|
|||
|
||||
/* Put it there */
|
||||
mvwaddch(mw, th->t_pos.y, th->t_pos.x, th->t_type);
|
||||
th->t_oldch = mvwinch(cw, th->t_pos.y, th->t_pos.x);
|
||||
th->t_oldch = mvwinch(cw, th->t_pos.y, th->t_pos.x) & A_CHARTEXT;
|
||||
/*
|
||||
* check to see if room that creature appears in should
|
||||
* light up
|
||||
|
|
@ -885,7 +885,7 @@ do_move(int dy, int dx)
|
|||
}
|
||||
if (running && ce(hero, move_nh))
|
||||
after = running = FALSE;
|
||||
ch = winat(move_nh.y, move_nh.x);
|
||||
ch = winat(move_nh.y, move_nh.x) & A_CHARTEXT;
|
||||
|
||||
/* Take care of hero trying to move close to something frightening */
|
||||
if (on(player, ISFLEE)) {
|
||||
|
|
@ -969,7 +969,7 @@ do_move(int dy, int dx)
|
|||
/* Did we succeed? */
|
||||
if (ce(tp->t_pos, current)) {
|
||||
/* Reset our idea of what ch is */
|
||||
ch = winat(move_nh.y, move_nh.x);
|
||||
ch = winat(move_nh.y, move_nh.x) & A_CHARTEXT;
|
||||
|
||||
/* Let it be known that we made the switch */
|
||||
changed = TRUE;
|
||||
|
|
@ -1140,22 +1140,22 @@ do_move(int dy, int dx)
|
|||
case 'h':
|
||||
case 'l':
|
||||
if (old_hero.y + 1 < lines - 2) {
|
||||
wall_check = winat(old_hero.y + 1, old_hero.x);
|
||||
wall_check = winat(old_hero.y + 1, old_hero.x) & A_CHARTEXT;
|
||||
if (!isrock(wall_check)) call_light = TRUE;
|
||||
}
|
||||
if (old_hero.y - 1 > 0) {
|
||||
wall_check = winat(old_hero.y - 1, old_hero.x);
|
||||
wall_check = winat(old_hero.y - 1, old_hero.x) & A_CHARTEXT;
|
||||
if (!isrock(wall_check)) call_light = TRUE;
|
||||
}
|
||||
break;
|
||||
case 'j':
|
||||
case 'k':
|
||||
if (old_hero.x + 1 < cols) {
|
||||
wall_check = winat(old_hero.y, old_hero.x + 1);
|
||||
wall_check = winat(old_hero.y, old_hero.x + 1) & A_CHARTEXT;
|
||||
if (!isrock(wall_check)) call_light = TRUE;
|
||||
}
|
||||
if (old_hero.x - 1 >= 0) {
|
||||
wall_check = winat(old_hero.y, old_hero.x - 1);
|
||||
wall_check = winat(old_hero.y, old_hero.x - 1) & A_CHARTEXT;
|
||||
if (!isrock(wall_check)) call_light = TRUE;
|
||||
}
|
||||
break;
|
||||
|
|
@ -1177,7 +1177,7 @@ do_move(int dy, int dx)
|
|||
if (rp->r_flags & ISTREAS)
|
||||
wake_room(rp);
|
||||
}
|
||||
ch = winat(old_hero.y, old_hero.x);
|
||||
ch = winat(old_hero.y, old_hero.x) & A_CHARTEXT;
|
||||
wmove(cw, unc(old_hero));
|
||||
waddch(cw, ch);
|
||||
wmove(cw, unc(hero));
|
||||
|
|
@ -1272,9 +1272,9 @@ light(coord *cp)
|
|||
|
||||
/* If we are looking at the hero in a rock, broaden our sights */
|
||||
if (&hero == cp || &player.t_oldpos == cp) {
|
||||
ch = winat(hero.y, hero.x);
|
||||
ch = winat(hero.y, hero.x) & A_CHARTEXT;
|
||||
if (isrock(ch)) see_radius = 2;
|
||||
ch = winat(player.t_oldpos.y, player.t_oldpos.x);
|
||||
ch = winat(player.t_oldpos.y, player.t_oldpos.x) & A_CHARTEXT;
|
||||
if (isrock(ch)) see_radius = 2;
|
||||
}
|
||||
|
||||
|
|
@ -1347,7 +1347,7 @@ light(coord *cp)
|
|||
|
||||
/* Previously not seen -- now can see it */
|
||||
if (tp->t_oldch == ' ' && cansee(tp->t_pos.y, tp->t_pos.x))
|
||||
tp->t_oldch = mvinch(y, x);
|
||||
tp->t_oldch = mvinch(y, x) & A_CHARTEXT;
|
||||
|
||||
/* Previously seen -- now can't see it */
|
||||
else if (!cansee(tp->t_pos.y, tp->t_pos.x) &&
|
||||
|
|
@ -1379,8 +1379,8 @@ light(coord *cp)
|
|||
on(player, ISBLIND) ||
|
||||
(rp->r_flags & FORCEDARK) ||
|
||||
(levtype == MAZELEV && !see_here && see_before)) {
|
||||
sch = mvwinch(cw, y, x); /* What's seen */
|
||||
rch = mvinch(y, x); /* What's really there */
|
||||
sch = mvwinch(cw, y, x) & A_CHARTEXT; /* What's seen */
|
||||
rch = mvinch(y, x) & A_CHARTEXT; /* What's really there */
|
||||
switch (rch) {
|
||||
case DOOR:
|
||||
case SECRETDOOR:
|
||||
|
|
@ -1598,7 +1598,7 @@ set_trap(struct thing *tp, int y, int x)
|
|||
return;
|
||||
}
|
||||
can_traps:
|
||||
switch (och = mvinch(y, x)) {
|
||||
switch (och = mvinch(y, x) & A_CHARTEXT) {
|
||||
case WALL:
|
||||
case FLOOR:
|
||||
case PASSAGE:
|
||||
|
|
@ -1775,7 +1775,7 @@ set_trap(struct thing *tp, int y, int x)
|
|||
char
|
||||
show(int y, int x)
|
||||
{
|
||||
register unsigned char ch = winat(y, x);
|
||||
register unsigned char ch = winat(y, x) & A_CHARTEXT;
|
||||
register struct linked_list *it;
|
||||
register struct thing *tp;
|
||||
|
||||
|
|
@ -1787,7 +1787,7 @@ show(int y, int x)
|
|||
else if (isalpha(ch)) {
|
||||
if ((it = find_mons(y, x)) == NULL) {
|
||||
msg("Show: Can't find monster in show (%d, %d)", y, x);
|
||||
return(mvwinch(stdscr, y, x));
|
||||
return(mvwinch(stdscr, y, x) & A_CHARTEXT);
|
||||
}
|
||||
tp = THINGPTR(it);
|
||||
|
||||
|
|
@ -1797,7 +1797,7 @@ show(int y, int x)
|
|||
else if (invisible(tp)) {
|
||||
/* We can't see surprise-type creatures through "see invisible" */
|
||||
if (off(player,CANSEE) || on(*tp,CANSURPRISE))
|
||||
ch = mvwinch(stdscr, y, x); /* Invisible */
|
||||
ch = mvwinch(stdscr, y, x) & A_CHARTEXT; /* Invisible */
|
||||
}
|
||||
else if (on(*tp, CANINWALL)) {
|
||||
if (isrock(mvwinch(stdscr, y, x))) ch = winch(stdscr); /* As Xorn */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue