Mark weapon related globals as const
This commit is contained in:
parent
e72a10a545
commit
ab3d0bd39f
|
@ -2439,7 +2439,6 @@ multi_send_player_explode(char type)
|
|||
multi_strip_robots(Player_num);
|
||||
}
|
||||
|
||||
extern ubyte Secondary_weapon_to_powerup[], Primary_weapon_to_powerup[];
|
||||
extern int Proximity_dropped;
|
||||
|
||||
/*
|
||||
|
|
|
@ -31,21 +31,21 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
|
|||
#include "playsave.h"
|
||||
|
||||
// Convert primary weapons to indices in Weapon_info array.
|
||||
ubyte Primary_weapon_to_weapon_info[MAX_PRIMARY_WEAPONS] = {0, 11, 12, 13, 14};
|
||||
ubyte Secondary_weapon_to_weapon_info[MAX_SECONDARY_WEAPONS] = {8, 15, 16, 17, 18};
|
||||
const ubyte Primary_weapon_to_weapon_info[MAX_PRIMARY_WEAPONS] = {0, 11, 12, 13, 14};
|
||||
const ubyte Secondary_weapon_to_weapon_info[MAX_SECONDARY_WEAPONS] = {8, 15, 16, 17, 18};
|
||||
//for each primary weapon, what kind of powerup gives weapon
|
||||
ubyte Primary_weapon_to_powerup[MAX_PRIMARY_WEAPONS] = {POW_LASER,POW_VULCAN_WEAPON,POW_SPREADFIRE_WEAPON,POW_PLASMA_WEAPON,POW_FUSION_WEAPON};
|
||||
const ubyte Primary_weapon_to_powerup[MAX_PRIMARY_WEAPONS] = {POW_LASER,POW_VULCAN_WEAPON,POW_SPREADFIRE_WEAPON,POW_PLASMA_WEAPON,POW_FUSION_WEAPON};
|
||||
//for each Secondary weapon, what kind of powerup gives weapon
|
||||
ubyte Secondary_weapon_to_powerup[MAX_SECONDARY_WEAPONS] = {POW_MISSILE_1,POW_HOMING_AMMO_1,POW_PROXIMITY_WEAPON,POW_SMARTBOMB_WEAPON,POW_MEGA_WEAPON};
|
||||
int Primary_ammo_max[MAX_PRIMARY_WEAPONS] = {0, VULCAN_AMMO_MAX, 0, 0, 0};
|
||||
ubyte Secondary_ammo_max[MAX_SECONDARY_WEAPONS] = {20, 10, 10, 5, 5};
|
||||
const ubyte Secondary_weapon_to_powerup[MAX_SECONDARY_WEAPONS] = {POW_MISSILE_1,POW_HOMING_AMMO_1,POW_PROXIMITY_WEAPON,POW_SMARTBOMB_WEAPON,POW_MEGA_WEAPON};
|
||||
const int Primary_ammo_max[MAX_PRIMARY_WEAPONS] = {0, VULCAN_AMMO_MAX, 0, 0, 0};
|
||||
const ubyte Secondary_ammo_max[MAX_SECONDARY_WEAPONS] = {20, 10, 10, 5, 5};
|
||||
weapon_info Weapon_info[MAX_WEAPON_TYPES];
|
||||
int N_weapon_types=0;
|
||||
sbyte Primary_weapon, Secondary_weapon;
|
||||
int POrderList (int num);
|
||||
int SOrderList (int num);
|
||||
ubyte DefaultPrimaryOrder[] = { 4, 3, 2, 1, 0, 255 };
|
||||
ubyte DefaultSecondaryOrder[] = { 4, 3, 1, 0, 255, 2 };
|
||||
static const ubyte DefaultPrimaryOrder[] = { 4, 3, 2, 1, 0, 255 };
|
||||
static const ubyte DefaultSecondaryOrder[] = { 4, 3, 1, 0, 255, 2 };
|
||||
extern ubyte MenuReordering;
|
||||
|
||||
// ------------------------------------------------------------------------------------
|
||||
|
|
|
@ -131,21 +131,17 @@ extern void do_weapon_select(int weapon_num, int secondary_flag);
|
|||
|
||||
extern sbyte Primary_weapon, Secondary_weapon;
|
||||
|
||||
extern ubyte Primary_weapon_to_weapon_info[MAX_PRIMARY_WEAPONS];
|
||||
extern ubyte Secondary_weapon_to_weapon_info[MAX_SECONDARY_WEAPONS];
|
||||
extern const ubyte Primary_weapon_to_weapon_info[MAX_PRIMARY_WEAPONS];
|
||||
extern const ubyte Secondary_weapon_to_weapon_info[MAX_SECONDARY_WEAPONS];
|
||||
//for each primary weapon, what kind of powerup gives weapon
|
||||
extern ubyte Primary_weapon_to_powerup[MAX_SECONDARY_WEAPONS];
|
||||
extern const ubyte Primary_weapon_to_powerup[MAX_SECONDARY_WEAPONS];
|
||||
//for each Secondary weapon, what kind of powerup gives weapon
|
||||
extern ubyte Secondary_weapon_to_powerup[MAX_SECONDARY_WEAPONS];
|
||||
extern const ubyte Secondary_weapon_to_powerup[MAX_SECONDARY_WEAPONS];
|
||||
extern void auto_select_weapon(int weapon_type); //parm is primary or secondary
|
||||
extern void select_weapon(int weapon_num, int secondary_flag, int print_message,int wait_for_rearm);
|
||||
|
||||
extern char *Primary_weapon_names_short[];
|
||||
extern char *Secondary_weapon_names_short[];
|
||||
extern char *Primary_weapon_names[];
|
||||
extern char *Secondary_weapon_names[];
|
||||
extern int Primary_ammo_max[MAX_PRIMARY_WEAPONS];
|
||||
extern ubyte Secondary_ammo_max[MAX_PRIMARY_WEAPONS];
|
||||
extern const int Primary_ammo_max[MAX_PRIMARY_WEAPONS];
|
||||
extern const ubyte Secondary_ammo_max[MAX_PRIMARY_WEAPONS];
|
||||
|
||||
#define HAS_WEAPON_FLAG 1
|
||||
#define HAS_ENERGY_FLAG 2
|
||||
|
|
Loading…
Reference in a new issue