@@ -1131,16 +1131,16 @@ void draw_fourpack_slots(short x, short y, ubyte fp)
11311131 draw_box_purple_list (x + 150 , y + 30 , 4u , 4u , 174 );
11321132}
11331133
1134- void show_weapon_slot (short scr_x , short scr_y , short weptype )
1134+ void show_weapon_slot (short scr_x , short scr_y , WeaponType wtype )
11351135{
11361136 ushort fp ;
11371137
11381138 lbDisplay .DrawColour = 174 ;
11391139 lbDisplay .DrawFlags = 0x8000 | Lb_TEXT_ONE_COLOR ;
1140- draw_sprite_purple_list (scr_x , scr_y , & unk1_sprites [weptype - 1 + 1 ]);
1140+ draw_sprite_purple_list (scr_x , scr_y , & unk1_sprites [wtype - 1 + 1 ]);
11411141 lbDisplay .DrawFlags &= ~0x8000 ;
11421142
1143- fp = weapon_fourpack_index (weptype );
1143+ fp = weapon_fourpack_index (wtype );
11441144 if (fp < WFRPK_COUNT ) {
11451145 draw_fourpack_slots (scr_x , scr_y , fp );
11461146 }
@@ -1151,7 +1151,7 @@ void show_weapon_slot(short scr_x, short scr_y, short weptype)
11511151 if (mouse_down_over_box_coords (scr_x , scr_y , scr_x + 181 , scr_y + 42 ))
11521152 {
11531153 lbDisplay .LeftButton = 0 ;
1154- mo_weapon = weptype - 1 ;
1154+ mo_weapon = ( int ) wtype - 1 ;
11551155 mo_from_agent = selected_agent ;
11561156 }
11571157 }
@@ -1160,11 +1160,11 @@ void show_weapon_slot(short scr_x, short scr_y, short weptype)
11601160 {
11611161 if (mouse_move_over_box_coords (scr_x , scr_y , scr_x + 181 , scr_y + 42 ))
11621162 {
1163- selected_weapon = weptype - 1 ;
1163+ selected_weapon = ( int ) wtype - 1 ;
11641164 switch_equip_offer_to_sell ();
11651165 equip_update_for_selected_weapon ();
11661166 }
1167- if (weptype - 1 >= mo_weapon ) {
1167+ if (( int ) wtype - 1 >= mo_weapon ) {
11681168 mo_weapon = -1 ;
11691169 }
11701170 }
@@ -1180,7 +1180,7 @@ ubyte show_weapon_slots(struct ScreenBox *p_box)
11801180#endif
11811181 short scr_x , scr_y ;
11821182 short slot ;
1183- short weptype ;
1183+ WeaponType wtype ;
11841184
11851185 scr_x = p_box -> X + 5 ;
11861186 if ((p_box -> Flags & GBxFlg_TextCopied ) == 0 )
@@ -1202,7 +1202,7 @@ ubyte show_weapon_slots(struct ScreenBox *p_box)
12021202
12031203 scr_y = p_box -> Y + 5 ;
12041204 slot = 0 ;
1205- for (weptype = 1 ; weptype < WEP_TYPES_COUNT ; weptype ++ )
1205+ for (wtype = WEP_NULL + 1 ; wtype < WEP_TYPES_COUNT ; wtype ++ )
12061206 {
12071207 TbBool has_weapon ;
12081208
@@ -1211,19 +1211,19 @@ ubyte show_weapon_slots(struct ScreenBox *p_box)
12111211
12121212 if (selected_agent == 4 )
12131213 {
1214- has_weapon = player_agent_has_weapon (local_player_no , 0 , weptype )
1215- && player_agent_has_weapon (local_player_no , 1 , weptype )
1216- && player_agent_has_weapon (local_player_no , 2 , weptype )
1217- && player_agent_has_weapon (local_player_no , 3 , weptype );
1214+ has_weapon = player_agent_has_weapon (local_player_no , 0 , wtype )
1215+ && player_agent_has_weapon (local_player_no , 1 , wtype )
1216+ && player_agent_has_weapon (local_player_no , 2 , wtype )
1217+ && player_agent_has_weapon (local_player_no , 3 , wtype );
12181218 }
12191219 else
12201220 {
1221- has_weapon = player_agent_has_weapon (local_player_no , selected_agent , weptype );
1221+ has_weapon = player_agent_has_weapon (local_player_no , selected_agent , wtype );
12221222 }
12231223
12241224 if (has_weapon )
12251225 {
1226- show_weapon_slot (scr_x , scr_y , weptype );
1226+ show_weapon_slot (scr_x , scr_y , wtype );
12271227 slot ++ ;
12281228 scr_y += 44 ;
12291229 }
0 commit comments