comparison arogue5/sticks.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 56e748983fa8
children
comparison
equal deleted inserted replaced
303:e06ebc407615 304:e52a8a7ad4c5
152 register char monster, oldch; 152 register char monster, oldch;
153 register int rm; 153 register int rm;
154 154
155 y = hero.y; 155 y = hero.y;
156 x = hero.x; 156 x = hero.x;
157 while (shoot_ok(winat(y, x))) { 157 while (shoot_ok(CCHAR( winat(y, x) ))) {
158 y += delta.y; 158 y += delta.y;
159 x += delta.x; 159 x += delta.x;
160 } 160 }
161 if (isalpha(monster = CCHAR( mvwinch(mw, y, x) ))) { 161 if (isalpha(monster = CCHAR( mvwinch(mw, y, x) ))) {
162 register struct room *rp; 162 register struct room *rp;
329 } 329 }
330 } 330 }
331 case WS_SLOW_M: 331 case WS_SLOW_M:
332 y = hero.y; 332 y = hero.y;
333 x = hero.x; 333 x = hero.x;
334 while (shoot_ok(winat(y, x))) { 334 while (shoot_ok(CCHAR( winat(y, x) ))) {
335 y += delta.y; 335 y += delta.y;
336 x += delta.x; 336 x += delta.x;
337 } 337 }
338 if (isalpha(mvwinch(mw, y, x))) { 338 if (isalpha(mvwinch(mw, y, x))) {
339 item = find_mons(y, x); 339 item = find_mons(y, x);
451 else msg("You feel dizzy for a moment, but it quickly passes."); 451 else msg("You feel dizzy for a moment, but it quickly passes.");
452 } 452 }
453 else { 453 else {
454 y = hero.y; 454 y = hero.y;
455 x = hero.x; 455 x = hero.x;
456 while (shoot_ok(winat(y, x))) 456 while (shoot_ok(CCHAR( winat(y, x) )))
457 { 457 {
458 y += delta.y; 458 y += delta.y;
459 x += delta.x; 459 x += delta.x;
460 } 460 }
461 if (isalpha(mvwinch(mw, y, x))) 461 if (isalpha(mvwinch(mw, y, x)))
475 msg("You can't move."); 475 msg("You can't move.");
476 } 476 }
477 else { 477 else {
478 y = hero.y; 478 y = hero.y;
479 x = hero.x; 479 x = hero.x;
480 while (shoot_ok(winat(y, x))) 480 while (shoot_ok(CCHAR( winat(y, x) )))
481 { 481 {
482 y += delta.y; 482 y += delta.y;
483 x += delta.x; 483 x += delta.x;
484 } 484 }
485 if (isalpha(mvwinch(mw, y, x))) 485 if (isalpha(mvwinch(mw, y, x)))
495 } 495 }
496 } 496 }
497 when WS_FEAR: 497 when WS_FEAR:
498 y = hero.y; 498 y = hero.y;
499 x = hero.x; 499 x = hero.x;
500 while (shoot_ok(winat(y, x))) 500 while (shoot_ok(CCHAR( winat(y, x) )))
501 { 501 {
502 y += delta.y; 502 y += delta.y;
503 x += delta.x; 503 x += delta.x;
504 } 504 }
505 if (isalpha(mvwinch(mw, y, x))) 505 if (isalpha(mvwinch(mw, y, x)))
528 } 528 }
529 } 529 }
530 when WS_MDEG: 530 when WS_MDEG:
531 y = hero.y; 531 y = hero.y;
532 x = hero.x; 532 x = hero.x;
533 while (shoot_ok(winat(y, x))) 533 while (shoot_ok(CCHAR( winat(y, x) )))
534 { 534 {
535 y += delta.y; 535 y += delta.y;
536 x += delta.x; 536 x += delta.x;
537 } 537 }
538 if (isalpha(mvwinch(mw, y, x))) 538 if (isalpha(mvwinch(mw, y, x)))
556 killed(item, TRUE, TRUE); 556 killed(item, TRUE, TRUE);
557 } 557 }
558 when WS_DISINTEGRATE: 558 when WS_DISINTEGRATE:
559 y = hero.y; 559 y = hero.y;
560 x = hero.x; 560 x = hero.x;
561 while (shoot_ok(winat(y, x))) { 561 while (shoot_ok(CCHAR( winat(y, x) ))) {
562 y += delta.y; 562 y += delta.y;
563 x += delta.x; 563 x += delta.x;
564 } 564 }
565 if (isalpha(mvwinch(mw, y, x))) { 565 if (isalpha(mvwinch(mw, y, x))) {
566 item = find_mons(y, x); 566 item = find_mons(y, x);