comparison arogue5/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 d3968e9cb98d
children 827441d05b3e
comparison
equal deleted inserted replaced
303:e06ebc407615 304:e52a8a7ad4c5
265 sp = buf; 265 sp = buf;
266 wmove(win, oy, ox); 266 wmove(win, oy, ox);
267 continue; 267 continue;
268 } 268 }
269 else if (sp == buf) 269 else if (sp == buf)
270 {
270 if (c == '-' && win == hw) /* To move back a line in hw */ 271 if (c == '-' && win == hw) /* To move back a line in hw */
271 break; 272 break;
272 else if (c == '~') 273 else if (c == '~')
273 { 274 {
274 strcpy(buf, home); 275 strcpy(buf, home);
275 waddstr(win, home); 276 waddstr(win, home);
276 sp += strlen(home); 277 sp += strlen(home);
277 continue; 278 continue;
278 } 279 }
280 }
279 *sp++ = c; 281 *sp++ = c;
280 waddstr(win, unctrl(c)); 282 waddstr(win, unctrl(c));
281 } 283 }
282 *sp = '\0'; 284 *sp = '\0';
283 if (sp > buf) /* only change option if something has been typed */ 285 if (sp > buf) /* only change option if something has been typed */
324 wmove(hw, 0, 0); 326 wmove(hw, 0, 0);
325 for (op = optlist; op <= &optlist[NUM_OPTS-1]; op++) 327 for (op = optlist; op <= &optlist[NUM_OPTS-1]; op++)
326 { 328 {
327 waddstr(hw, op->o_prompt); 329 waddstr(hw, op->o_prompt);
328 if ((retval = (*op->o_getfunc)(op->o_opt, hw))) 330 if ((retval = (*op->o_getfunc)(op->o_opt, hw)))
331 {
329 if (retval == QUIT) 332 if (retval == QUIT)
330 break; 333 break;
331 else if (op > optlist) { /* MINUS */ 334 else if (op > optlist) { /* MINUS */
332 wmove(hw, (int)(op - optlist) - 1, 0); 335 wmove(hw, (int)(op - optlist) - 1, 0);
333 op -= 2; 336 op -= 2;
336 { 339 {
337 putchar('\007'); 340 putchar('\007');
338 wmove(hw, 0, 0); 341 wmove(hw, 0, 0);
339 op--; 342 op--;
340 } 343 }
344 }
341 } 345 }
342 /* 346 /*
343 * Switch back to original screen 347 * Switch back to original screen
344 */ 348 */
345 mvwaddstr(hw, LINES-1, 0, spacemsg); 349 mvwaddstr(hw, LINES-1, 0, spacemsg);