comparison srogue/disply.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
28 for (rp = rooms; rp < &rooms[MAXROOMS]; rp++) 28 for (rp = rooms; rp < &rooms[MAXROOMS]; rp++)
29 rp->r_flags &= ~ISDARK; 29 rp->r_flags &= ~ISDARK;
30 30
31 for (i = 0; i < LINES - 2; i++) { 31 for (i = 0; i < LINES - 2; i++) {
32 for (j = 0; j < COLS - 1; j++) { 32 for (j = 0; j < COLS - 1; j++) {
33 ch = mvinch(i,j); 33 ch = mvinch(i,j) & A_CHARTEXT;
34 if (isatrap(ch)) { 34 if (isatrap(ch)) {
35 struct trap *what; 35 struct trap *what;
36 36
37 what = trap_at(i, j); 37 what = trap_at(i, j);
38 if (what != NULL) 38 if (what != NULL)
58 else { 58 else {
59 it = THINGPTR(what); 59 it = THINGPTR(what);
60 it->t_oldch = ch; 60 it->t_oldch = ch;
61 } 61 }
62 } 62 }
63 mch = mvwinch(cw, i, j); 63 mch = mvwinch(cw, i, j) & A_CHARTEXT;
64 if (isalpha(mch)) 64 if (isalpha(mch))
65 ch = mch; 65 ch = mch;
66 mvwaddch(cw, i, j, ch); 66 mvwaddch(cw, i, j, ch);
67 } 67 }
68 } 68 }
75 * Show monsters for wizard and potion 75 * Show monsters for wizard and potion
76 */ 76 */
77 void 77 void
78 dispmons(void) 78 dispmons(void)
79 { 79 {
80 reg int ch, y, x; 80 reg int y, x;
81 reg struct thing *it; 81 reg struct thing *it;
82 reg struct linked_list *item; 82 reg struct linked_list *item;
83 83
84 for (item = mlist; item != NULL; item = next(item)) { 84 for (item = mlist; item != NULL; item = next(item)) {
85 it = THINGPTR(item); 85 it = THINGPTR(item);
101 winat(int y, int x) 101 winat(int y, int x)
102 { 102 {
103 reg char ch; 103 reg char ch;
104 104
105 if (mvwinch(mw,y,x) == ' ') 105 if (mvwinch(mw,y,x) == ' ')
106 ch = mvinch(y, x); /* non-monsters */ 106 ch = mvinch(y, x) & A_CHARTEXT; /* non-monsters */
107 else 107 else
108 ch = winch(mw); /* monsters */ 108 ch = winch(mw); /* monsters */
109 return ch; 109 return ch;
110 } 110 }
111 111