comparison xrogue/command.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 32bc72dcbf4f
comparison
equal deleted inserted replaced
303:e06ebc407615 304:e52a8a7ad4c5
109 char scratch; 109 char scratch;
110 110
111 /* If in a corridor or maze, if we are at a turn with 111 /* If in a corridor or maze, if we are at a turn with
112 * only one way to go, turn that way. 112 * only one way to go, turn that way.
113 */ 113 */
114 scratch = winat(hero.y, hero.x); 114 scratch = winat(hero.y, hero.x) & A_CHARTEXT;
115 if ((scratch==PASSAGE||scratch==DOOR||levtype==MAZELEV) && 115 if ((scratch==PASSAGE||scratch==DOOR||levtype==MAZELEV) &&
116 off(player, ISHUH) && 116 off(player, ISHUH) &&
117 off(player, ISBLIND)) { 117 off(player, ISBLIND)) {
118 int y, x; 118 int y, x;
119 if (getdelta(runch, &y, &x) == TRUE) { 119 if (getdelta(runch, &y, &x) == TRUE) {
250 } 250 }
251 when A_PICKUP: 251 when A_PICKUP:
252 player.t_action = A_NIL; 252 player.t_action = A_NIL;
253 if (add_pack((struct linked_list *)NULL, FALSE)) { 253 if (add_pack((struct linked_list *)NULL, FALSE)) {
254 char tch; 254 char tch;
255 tch = mvwinch(stdscr, hero.y, hero.x); 255 tch = mvwinch(stdscr, hero.y, hero.x) & A_CHARTEXT;
256 if (tch != FLOOR && tch != PASSAGE) { 256 if (tch != FLOOR && tch != PASSAGE) {
257 player.t_action = A_PICKUP; /*get more */ 257 player.t_action = A_PICKUP; /*get more */
258 player.t_no_move += 2 * movement(&player); 258 player.t_no_move += 2 * movement(&player);
259 } 259 }
260 } 260 }
781 781
782 if (x < 0 || y < 0 || x >= cols || y >= lines) 782 if (x < 0 || y < 0 || x >= cols || y >= lines)
783 continue; 783 continue;
784 784
785 /* Mch and ch will be the same unless there is a monster here */ 785 /* Mch and ch will be the same unless there is a monster here */
786 mch = winat(y, x); 786 mch = winat(y, x) & A_CHARTEXT;
787 ch = mvwinch(stdscr, y, x); 787 ch = mvwinch(stdscr, y, x) & A_CHARTEXT;
788 sch = mvwinch(cw, y, x); /* What's on the screen */ 788 sch = mvwinch(cw, y, x) & A_CHARTEXT; /* What's on the screen */
789 789
790 if (door_chime == FALSE && isatrap(ch)) { 790 if (door_chime == FALSE && isatrap(ch)) {
791 register struct trap *tp; 791 register struct trap *tp;
792 792
793 /* Is there a monster on the trap? */ 793 /* Is there a monster on the trap? */
872 872
873 void 873 void
874 d_level(void) 874 d_level(void)
875 { 875 {
876 bool no_phase=FALSE; 876 bool no_phase=FALSE;
877 char position = winat(hero.y, hero.x); 877 char position = winat(hero.y, hero.x) & A_CHARTEXT;
878 int au; 878 int au;
879 879
880 880
881 /* If we are on a trading post, go to a trading post level. */ 881 /* If we are on a trading post, go to a trading post level. */
882 if (position == POST) { 882 if (position == POST) {
975 void 975 void
976 u_level(void) 976 u_level(void)
977 { 977 {
978 bool no_phase = FALSE; 978 bool no_phase = FALSE;
979 register struct linked_list *item; 979 register struct linked_list *item;
980 char position = winat(hero.y, hero.x); 980 char position = winat(hero.y, hero.x) & A_CHARTEXT;
981 struct thing *tp; 981 struct thing *tp;
982 struct object *obj; 982 struct object *obj;
983 983
984 /* You can go up into the outside if standing on top of a worm hole */ 984 /* You can go up into the outside if standing on top of a worm hole */
985 if (position == WORMHOLE) { 985 if (position == WORMHOLE) {
1164 msg("You can't call that anything."); 1164 msg("You can't call that anything.");
1165 return; 1165 return;
1166 } 1166 }
1167 else know = (bool *) 0; 1167 else know = (bool *) 0;
1168 } 1168 }
1169 if ((obj->o_flags & ISPOST) || (know && know[obj->o_which]) && !mark) { 1169 if ((obj->o_flags & ISPOST) || (know && know[obj->o_which] && !mark)) {
1170 msg("That has already been identified."); 1170 msg("That has already been identified.");
1171 return; 1171 return;
1172 } 1172 }
1173 if (mark) { 1173 if (mark) {
1174 if (obj->o_mark[0]) { 1174 if (obj->o_mark[0]) {