comparison xrogue/n_level.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 f54901b9c39b
children
comparison
equal deleted inserted replaced
303:e06ebc407615 304:e52a8a7ad4c5
98 else top = FALSE; 98 else top = FALSE;
99 for (i=0; i<TERRASAVE; i++) { 99 for (i=0; i<TERRASAVE; i++) {
100 if (vert) 100 if (vert)
101 for (j=1; j<cols-1; j++) { 101 for (j=1; j<cols-1; j++) {
102 if (top) { 102 if (top) {
103 cch = mvinch(i+2, j); 103 cch = mvinch(i+2, j) & A_CHARTEXT;
104 mvaddch(lines-6+i, j, cch); 104 mvaddch(lines-6+i, j, cch);
105 } 105 }
106 else { 106 else {
107 cch = mvinch(lines-4-i, j); 107 cch = mvinch(lines-4-i, j) & A_CHARTEXT;
108 mvaddch(4-i, j, cch); 108 mvaddch(4-i, j, cch);
109 } 109 }
110 } 110 }
111 else 111 else
112 for (j=2; j<lines-3; j++) { 112 for (j=2; j<lines-3; j++) {
113 if (top) { 113 if (top) {
114 cch = mvinch(j, i+1); 114 cch = mvinch(j, i+1) & A_CHARTEXT;
115 mvaddch(j, cols-4+i, cch); 115 mvaddch(j, cols-4+i, cch);
116 } 116 }
117 else { 117 else {
118 cch = mvinch(j, cols-2-i); 118 cch = mvinch(j, cols-2-i) & A_CHARTEXT;
119 mvaddch(j, 3-i, cch); 119 mvaddch(j, 3-i, cch);
120 } 120 }
121 } 121 }
122 } 122 }
123 123
308 do { 308 do {
309 rm = rnd_room(); 309 rm = rnd_room();
310 rnd_pos(&rooms[rm], &tp->t_pos); 310 rnd_pos(&rooms[rm], &tp->t_pos);
311 } until (cnt++ > 2500 || winat(tp->t_pos.y, tp->t_pos.x) == FLOOR); 311 } until (cnt++ > 2500 || winat(tp->t_pos.y, tp->t_pos.x) == FLOOR);
312 mvwaddch(mw, tp->t_pos.y, tp->t_pos.x, tp->t_type); 312 mvwaddch(mw, tp->t_pos.y, tp->t_pos.x, tp->t_type);
313 tp->t_oldch = mvwinch(cw, tp->t_pos.y, tp->t_pos.x); 313 tp->t_oldch = mvwinch(cw, tp->t_pos.y, tp->t_pos.x) & A_CHARTEXT;
314 314
315 /* 315 /*
316 * If it has a fire, mark it 316 * If it has a fire, mark it
317 */ 317 */
318 if (on(*tp, HASFIRE)) { 318 if (on(*tp, HASFIRE)) {
333 /* Restore any saved monsters */ 333 /* Restore any saved monsters */
334 for (item = savmonst; item != NULL; item = nitem) { 334 for (item = savmonst; item != NULL; item = nitem) {
335 nitem = next(item); 335 nitem = next(item);
336 tp = THINGPTR(item); 336 tp = THINGPTR(item);
337 mvwaddch(mw, tp->t_pos.y, tp->t_pos.x, tp->t_type); 337 mvwaddch(mw, tp->t_pos.y, tp->t_pos.x, tp->t_type);
338 tp->t_oldch = mvwinch(cw, tp->t_pos.y, tp->t_pos.x); 338 tp->t_oldch = mvwinch(cw, tp->t_pos.y, tp->t_pos.x) & A_CHARTEXT;
339 339
340 /* 340 /*
341 * If it has a fire, mark it 341 * If it has a fire, mark it
342 */ 342 */
343 if (on(*tp, HASFIRE)) { 343 if (on(*tp, HASFIRE)) {