Mercurial > hg > early-roguelike
comparison arogue5/misc.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 |
|---|---|
| 445 void | 445 void |
| 446 use_mm(int which) | 446 use_mm(int which) |
| 447 { | 447 { |
| 448 register struct object *obj = NULL; | 448 register struct object *obj = NULL; |
| 449 register struct linked_list *item = NULL; | 449 register struct linked_list *item = NULL; |
| 450 bool cursed, blessed, is_mm; | 450 bool is_mm; |
| 451 char buf[LINELEN]; | 451 char buf[LINELEN]; |
| 452 | 452 |
| 453 cursed = FALSE; | |
| 454 is_mm = FALSE; | 453 is_mm = FALSE; |
| 455 | 454 |
| 456 if (which < 0) { /* A real miscellaneous magic item */ | 455 if (which < 0) { /* A real miscellaneous magic item */ |
| 457 is_mm = TRUE; | 456 is_mm = TRUE; |
| 458 item = get_item(pack, "use", USEABLE); | 457 item = get_item(pack, "use", USEABLE); |
| 461 */ | 460 */ |
| 462 if (item == NULL) | 461 if (item == NULL) |
| 463 return; | 462 return; |
| 464 | 463 |
| 465 obj = OBJPTR(item); | 464 obj = OBJPTR(item); |
| 466 cursed = (obj->o_flags & ISCURSED) != 0; | |
| 467 blessed = (obj->o_flags & ISBLESSED) != 0; | |
| 468 which = obj->o_which; | 465 which = obj->o_which; |
| 469 } | 466 } |
| 470 | 467 |
| 471 if (obj->o_type == RELIC) { /* An artifact */ | 468 if (obj->o_type == RELIC) { /* An artifact */ |
| 472 is_mm = FALSE; | 469 is_mm = FALSE; |
