comparison xrogue/options.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 e940e6c00751
children 827441d05b3e
comparison
equal deleted inserted replaced
303:e06ebc407615 304:e52a8a7ad4c5
257 sp = buf; 257 sp = buf;
258 wmove(win, oy, ox); 258 wmove(win, oy, ox);
259 continue; 259 continue;
260 } 260 }
261 else if (sp == buf) 261 else if (sp == buf)
262 {
262 if (c == '-' && win == hw) /* To move back a line in hw */ 263 if (c == '-' && win == hw) /* To move back a line in hw */
263 break; 264 break;
264 else if (c == '~') 265 else if (c == '~')
265 { 266 {
266 strcpy(buf, home); 267 strcpy(buf, home);
267 waddstr(win, home); 268 waddstr(win, home);
268 sp += strlen(home); 269 sp += strlen(home);
269 continue; 270 continue;
270 } 271 }
272 }
271 *sp++ = c; 273 *sp++ = c;
272 waddstr(win, unctrl(c)); 274 waddstr(win, unctrl(c));
273 } 275 }
274 *sp = '\0'; 276 *sp = '\0';
275 if (sp > buf) /* only change option if something has been typed */ 277 if (sp > buf) /* only change option if something has been typed */
318 waddstr(hw, op->o_prompt); 320 waddstr(hw, op->o_prompt);
319 321
320 retval = (*op->o_getfunc)(op->o_opt, hw); 322 retval = (*op->o_getfunc)(op->o_opt, hw);
321 323
322 if (retval) 324 if (retval)
325 {
323 if (retval == QUIT) 326 if (retval == QUIT)
324 break; 327 break;
325 else if (op > optlist) { /* MINUS */ 328 else if (op > optlist) { /* MINUS */
326 wmove(hw, (op - optlist) - 1, 0); 329 wmove(hw, (op - optlist) - 1, 0);
327 op -= 2; 330 op -= 2;
330 { 333 {
331 putchar('\007'); 334 putchar('\007');
332 wmove(hw, 0, 0); 335 wmove(hw, 0, 0);
333 op--; 336 op--;
334 } 337 }
338 }
335 } 339 }
336 /* 340 /*
337 * Switch back to original screen 341 * Switch back to original screen
338 */ 342 */
339 mvwaddstr(hw, lines-1, 0, spacemsg); 343 mvwaddstr(hw, lines-1, 0, spacemsg);