Mercurial > hg > early-roguelike
comparison srogue/scrolls.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 |
---|---|
30 reg struct object *obj; | 30 reg struct object *obj; |
31 reg struct linked_list *item; | 31 reg struct linked_list *item; |
32 reg int i, j, wh; | 32 reg int i, j, wh; |
33 reg char ch, nch; | 33 reg char ch, nch; |
34 struct room *rp; | 34 struct room *rp; |
35 struct linked_list *titem; | |
36 char buf[LINLEN]; | 35 char buf[LINLEN]; |
37 bool bless, curse; | 36 bool bless, curse; |
38 | 37 |
39 if ((item = get_item("read", SCROLL)) == NULL) | 38 if ((item = get_item("read", SCROLL)) == NULL) |
40 return; | 39 return; |
159 addmsg("map on it."); | 158 addmsg("map on it."); |
160 endmsg(); | 159 endmsg(); |
161 overwrite(stdscr, hw); | 160 overwrite(stdscr, hw); |
162 for (i = 1; i < LINES - 2; i++) { | 161 for (i = 1; i < LINES - 2; i++) { |
163 for (j = 0; j < COLS; j++) { | 162 for (j = 0; j < COLS; j++) { |
164 switch (nch = ch = mvwinch(hw, i, j)) { | 163 switch (nch = ch = mvwinch(hw, i, j) & A_CHARTEXT) { |
165 case SECRETDOOR: | 164 case SECRETDOOR: |
166 nch = DOOR; | 165 nch = DOOR; |
167 mvaddch(i, j, nch); | 166 mvaddch(i, j, nch); |
168 case '-': | 167 case '-': |
169 case '|': | 168 case '|': |