Mercurial > hg > early-roguelike
comparison arogue7/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 | e1cd27c5464f |
| children |
comparison
equal
deleted
inserted
replaced
| 303:e06ebc407615 | 304:e52a8a7ad4c5 |
|---|---|
| 841 void | 841 void |
| 842 use_mm(int which) | 842 use_mm(int which) |
| 843 { | 843 { |
| 844 register struct object *obj = NULL; | 844 register struct object *obj = NULL; |
| 845 register struct linked_list *item = NULL; | 845 register struct linked_list *item = NULL; |
| 846 bool cursed, blessed, is_mm; | 846 bool is_mm; |
| 847 | 847 |
| 848 cursed = FALSE; | |
| 849 is_mm = FALSE; | 848 is_mm = FALSE; |
| 850 | 849 |
| 851 if (which < 0) { /* A real miscellaneous magic item */ | 850 if (which < 0) { /* A real miscellaneous magic item */ |
| 852 /* This is miscellaneous magic. It takes 3 movement periods to use */ | 851 /* This is miscellaneous magic. It takes 3 movement periods to use */ |
| 853 if (player.t_action != C_USE) { | 852 if (player.t_action != C_USE) { |
| 876 player.t_action = A_NIL; | 875 player.t_action = A_NIL; |
| 877 | 876 |
| 878 is_mm = TRUE; | 877 is_mm = TRUE; |
| 879 | 878 |
| 880 obj = OBJPTR(item); | 879 obj = OBJPTR(item); |
| 881 cursed = (obj->o_flags & ISCURSED) != 0; | |
| 882 blessed = (obj->o_flags & ISBLESSED) != 0; | |
| 883 which = obj->o_which; | 880 which = obj->o_which; |
| 884 } | 881 } |
| 885 | 882 |
| 886 if (obj->o_type == POTION) { /* An potion */ | 883 if (obj->o_type == POTION) { /* An potion */ |
| 887 is_mm = FALSE; | 884 is_mm = FALSE; |
