Mercurial > hg > early-roguelike
comparison srogue/armor.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 | 94a0d9dd5ce1 |
children |
comparison
equal
deleted
inserted
replaced
303:e06ebc407615 | 304:e52a8a7ad4c5 |
---|---|
73 */ | 73 */ |
74 void | 74 void |
75 initarmor(struct object *obj, int what) | 75 initarmor(struct object *obj, int what) |
76 { | 76 { |
77 struct init_armor *iwa; | 77 struct init_armor *iwa; |
78 struct magic_item *mi; | |
79 | 78 |
80 obj->o_type = ARMOR; | 79 obj->o_type = ARMOR; |
81 obj->o_which = what; | 80 obj->o_which = what; |
82 iwa = &armors[what]; | 81 iwa = &armors[what]; |
83 mi = &a_magic[what]; | |
84 obj->o_vol = iwa->a_vol; | 82 obj->o_vol = iwa->a_vol; |
85 obj->o_ac = iwa->a_class; | 83 obj->o_ac = iwa->a_class; |
86 obj->o_weight = iwa->a_wght; | 84 obj->o_weight = iwa->a_wght; |
87 obj->o_typname = things[TYP_ARMOR].mi_name; | 85 obj->o_typname = things[TYP_ARMOR].mi_name; |
88 } | 86 } |