FS2_Open
Open source remastering of the Freespace 2 engine
missionweaponchoice.h File Reference

Go to the source code of this file.

Macros

#define ICON_PRIMARY_0   28
 
#define ICON_PRIMARY_1   29
 
#define ICON_PRIMARY_2   30
 
#define ICON_PRIMARY_3   31
 
#define ICON_SECONDARY_0   10
 
#define ICON_SECONDARY_1   11
 
#define ICON_SECONDARY_2   12
 
#define ICON_SECONDARY_3   13
 
#define ICON_SHIP_PRIMARY_0   32
 
#define ICON_SHIP_PRIMARY_1   33
 
#define ICON_SHIP_PRIMARY_2   34
 
#define ICON_SHIP_SECONDARY_0   35
 
#define ICON_SHIP_SECONDARY_1   36
 
#define ICON_SHIP_SECONDARY_2   37
 
#define ICON_SHIP_SECONDARY_3   38
 

Functions

void weapon_select_init ()
 
void weapon_select_common_init ()
 
void weapon_select_do (float frametime)
 
void weapon_select_close ()
 
void weapon_select_close_team ()
 
void wl_update_parse_object_weapons (p_object *pobjp, wss_unit *slot)
 
int wl_update_ship_weapons (int objnum, wss_unit *slot)
 
void wl_bash_ship_weapons (ship_weapon *swp, wss_unit *slot)
 
void wl_set_default_weapons (int index, int ship_class)
 
void wl_reset_to_defaults ()
 
void wl_reset_selected_slot ()
 
void wl_remove_weps_from_pool (int *wep, int *wep_count, int ship_class)
 
void wl_get_ship_class_weapons (int ship_class, int *wep, int *wep_count)
 
void wl_get_default_weapons (int ship_class, int slot_num, int *wep, int *wep_count)
 
void wl_synch_interface ()
 
int wl_apply (int mode, int from_bank, int from_list, int to_bank, int to_list, int ship_slot, int player_index=-1, bool dont_play_sound=false)
 
int wl_drop (int from_bank, int from_list, int to_bank, int to_list, int ship_slot, int player_index=-1, bool dont_play_sound=false)
 

Variables

int Weapon_select_overlay_id
 

Macro Definition Documentation

#define ICON_PRIMARY_0   28

Definition at line 20 of file missionweaponchoice.h.

#define ICON_PRIMARY_1   29

Definition at line 21 of file missionweaponchoice.h.

#define ICON_PRIMARY_2   30

Definition at line 22 of file missionweaponchoice.h.

#define ICON_PRIMARY_3   31

Definition at line 23 of file missionweaponchoice.h.

#define ICON_SECONDARY_0   10

Definition at line 24 of file missionweaponchoice.h.

#define ICON_SECONDARY_1   11

Definition at line 25 of file missionweaponchoice.h.

#define ICON_SECONDARY_2   12

Definition at line 26 of file missionweaponchoice.h.

#define ICON_SECONDARY_3   13

Definition at line 27 of file missionweaponchoice.h.

#define ICON_SHIP_PRIMARY_0   32

Definition at line 30 of file missionweaponchoice.h.

#define ICON_SHIP_PRIMARY_1   33

Definition at line 31 of file missionweaponchoice.h.

#define ICON_SHIP_PRIMARY_2   34

Definition at line 32 of file missionweaponchoice.h.

#define ICON_SHIP_SECONDARY_0   35

Definition at line 33 of file missionweaponchoice.h.

#define ICON_SHIP_SECONDARY_1   36

Definition at line 34 of file missionweaponchoice.h.

#define ICON_SHIP_SECONDARY_2   37

Definition at line 35 of file missionweaponchoice.h.

#define ICON_SHIP_SECONDARY_3   38

Definition at line 36 of file missionweaponchoice.h.

Function Documentation

void weapon_select_close ( )

Free the bitmap slot and memory that was allocated to store the mask bitmap.

Note
Weapon_select_open is cleared when this function completes.

Definition at line 2860 of file missionweaponchoice.cpp.

void weapon_select_close_team ( )

Close out what weapon_select_init_team() set up but only when we are not acutally in the weapon select screen - taylor

Definition at line 1918 of file missionweaponchoice.cpp.

void weapon_select_common_init ( )

This init is called even before the weapons loadout screen is entered. It is called when the briefing state is entered.

Definition at line 1931 of file missionweaponchoice.cpp.

void weapon_select_do ( float  frametime)

Calls to common_ functions are made for those functions which are common to the ship select and briefing screens.

Definition at line 2449 of file missionweaponchoice.cpp.

void weapon_select_init ( )

Called to load the bitmaps and set up the mask regions for the weapon loadout screen. common_select_init() is called to load the animations and bitmaps which are in common with the ship select and briefing screens.

Note
The Weapon_select_open flag is set to 1 when weapon_select_init() completes successfully

Definition at line 1960 of file missionweaponchoice.cpp.

int wl_apply ( int  mode,
int  from_bank,
int  from_list,
int  to_bank,
int  to_list,
int  ship_slot,
int  player_index = -1,
bool  dont_play_sound = false 
)

Definition at line 3856 of file missionweaponchoice.cpp.

void wl_bash_ship_weapons ( ship_weapon swp,
wss_unit slot 
)

Bash ship weapons, based on what is stored in the stored weapons loadout

Note
Wss_slots[] is assumed to be correctly set

Definition at line 3397 of file missionweaponchoice.cpp.

int wl_drop ( int  from_bank,
int  from_list,
int  to_bank,
int  to_list,
int  ship_slot,
int  player_index = -1,
bool  dont_play_sound = false 
)

Definition at line 3918 of file missionweaponchoice.cpp.

void wl_get_default_weapons ( int  ship_class,
int  slot_num,
int wep,
int wep_count 
)

Get the weapons info that should be on ship by default

Definition at line 1665 of file missionweaponchoice.cpp.

void wl_get_ship_class_weapons ( int  ship_class,
int wep,
int wep_count 
)

Fill out the weapons for this ship_class

Definition at line 1531 of file missionweaponchoice.cpp.

void wl_remove_weps_from_pool ( int wep,
int wep_count,
int  ship_class 
)

Remove the weapons specified by wep[] and wep_count[] from Wl_pool[].

Definition at line 1736 of file missionweaponchoice.cpp.

void wl_reset_selected_slot ( )

Set selected slot to first placed ship

Definition at line 1394 of file missionweaponchoice.cpp.

void wl_reset_to_defaults ( )

Reset the weapons loadout to the defaults in the mission

Definition at line 3378 of file missionweaponchoice.cpp.

void wl_set_default_weapons ( int  index,
int  ship_class 
)
void wl_synch_interface ( )

Update any interface data that may be dependent on Wss_slots[]

Todo:
Implement

Definition at line 3852 of file missionweaponchoice.cpp.

void wl_update_parse_object_weapons ( p_object pobjp,
wss_unit slot 
)

Set the Pilot subsystem of a parse_object to the weapons that are setup for the wing_block,wing_slot ship

Parameters
pobjpPointer to parse object that references Pilot subsystem
slotPointer to slot object

Definition at line 3258 of file missionweaponchoice.cpp.

int wl_update_ship_weapons ( int  objnum,
wss_unit slot 
)

Change a ship's weapons based on the information contained in the Weapon_data[] structure that is filled in during weapon loadout

Returns
-1 if the player ship has no weapons
0 if function finished without errors

Definition at line 3231 of file missionweaponchoice.cpp.

Variable Documentation

int Weapon_select_overlay_id

Definition at line 98 of file missionweaponchoice.cpp.