2 * $Logfile: /Freespace2/code/Network/MultiTeamSelect.h $
7 * Multiplayer Team Selection Code header
10 * Revision 1.1 2002/05/03 03:28:12 root
14 * 3 11/05/98 5:55p Dave
15 * Big pass at reducing #includes
17 * 2 10/07/98 10:53a Dave
20 * 1 10/07/98 10:50a Dave
22 * 22 5/19/98 8:35p Dave
23 * Revamp PXO channel listing system. Send campaign goals/events to
24 * clients for evaluation. Made lock button pressable on all screens.
26 * 21 5/18/98 12:41a Allender
27 * fixed subsystem problems on clients (i.e. not reporting properly on
28 * damage indicator). Fixed ingame join problem with respawns. minor
31 * 20 5/10/98 7:06p Dave
32 * Fix endgame sequencing ESC key. Changed how host options warning popups
33 * are done. Fixed pause/message scrollback/options screen problems in mp.
34 * Make sure observer HUD doesn't try to lock weapons.
36 * 19 5/06/98 8:06p Dave
37 * Made standalone reset properly under weird conditions. Tweak
38 * optionsmulti screen. Upped MAX_WEAPONS to 350. Put in new launch
39 * countdown anim. Minro ui fixes/tweaks.
41 * 18 4/22/98 7:24p Dave
42 * Made sure the "player/ships" locked button for multiplayer appears on
43 * all briefing screens.
45 * 17 4/20/98 4:56p Allender
46 * allow AI ships to respawn as many times as there are respawns in the
49 * 16 4/01/98 11:19p Dave
50 * Put in auto-loading of xferred pilot pic files. Grey out background
51 * behind pinfo popup. Put a chatbox message in when players are kicked.
52 * Moved mission title down in briefing. Other ui fixes.
54 * 15 3/26/98 6:01p Dave
55 * Put in file checksumming routine in cfile. Made pilot pic xferring more
56 * robust. Cut header size of voice data packets in half. Put in
57 * restricted game host query system.
59 * 14 3/10/98 10:56a Dave
60 * Put support for deleting ships from starting wings back in.
62 * 13 3/09/98 5:55p Dave
63 * Fixed stats to take asteroid hits into account. Polished up UI stuff in
64 * team select. Finished up pilot info popup. Tracked down and fixed
67 * 12 3/05/98 5:03p Dave
68 * More work on team vs. team support for multiplayer. Need to fix bugs in
71 * 11 3/01/98 3:26p Dave
72 * Fixed a few team select bugs. Put in multiplayer intertface sounds.
73 * Corrected how ships are disabled/enabled in team select/weapon select
76 * 10 2/23/98 11:09p Dave
77 * Finished up multiplayer campaign support. Seems bug-free.
79 * 9 2/19/98 6:26p Dave
80 * Fixed a few file xfer bugs. Tweaked mp team select screen. Put in
81 * initial support for player data uploading.
83 * 8 2/18/98 3:56p Dave
84 * Several bugs fixed for mp team select screen. Put in standalone packet
85 * routing for team select.
87 * 7 2/17/98 6:08p Dave
88 * Tore out old multiplayer team select screen, installed new one.
90 * 6 10/16/97 4:58p Dave
91 * Finsihed up server side respawning issues. Knocked off a bunch of
94 * 5 10/10/97 4:42p Dave
95 * Fixed up server transfer bugs.
97 * 4 10/09/97 4:58p Lawrance
98 * get short_callsign from player struct
100 * 3 10/03/97 4:58p Dave
101 * Put in client-side mimicing of host team selection changes. Some more
104 * 2 9/19/97 4:24p Allender
105 * start of team selection screen.
107 * 1 9/18/97 11:45a Allender
111 #ifndef _MULTITEAMSELECT_H
112 #define _MULTITEAMSELECT_H
114 // ------------------------------------------------------------------------------------------------------
115 // TEAM SELECT DEFINES/VARS
120 // should be initialize to 0 inside of multi_vars_init
121 extern int Multi_ts_inited;
123 #define MULTI_TS_MAX_TEAMS 2 // 2 teams max for now
124 #define MULTI_TS_NUM_SHIP_SLOTS 12 // # of ship slots in non team vs. team mode
126 // deleted ship objnums
127 extern int Multi_ts_deleted_objnums[MULTI_TS_MAX_TEAMS * MULTI_TS_NUM_SHIP_SLOTS];
128 extern int Multi_ts_num_deleted;
130 // ------------------------------------------------------------------------------------------------------
131 // TEAM SELECT FUNCTIONS
134 // initialize the team select screen (always call, even when switching between weapon select, etc)
135 void multi_ts_init();
137 // initialize all critical internal data structures
138 void multi_ts_common_init();
140 // do frame for team select
143 // close the team select screen (always call, even when switching between weapon select, etc)
144 void multi_ts_close();
146 // drop a carried icon
147 void multi_ts_drop(int from_type,int from_index,int to_type,int to_index,int ship_class,int player_index = -1);
149 // assign all players to appropriate default wings/slots
150 void multi_ts_assign_players_all();
152 // is the given slot disabled for the specified player
153 int multi_ts_disabled_slot(int slot_index,int player_index = -1);
155 // is the given slot disabled for the specified player, _and_ it is his ship as well
156 int multi_ts_disabled_high_slot(int slot_index,int player_index = -1);
158 // delete ships which have been removed from the game, tidy things
159 void multi_ts_create_wings();
161 // resynch all display/interface elements based upon all the ship/weapon pool values
162 void multi_ts_sync_interface();
164 // do any necessary processing for players who have left the game
165 void multi_ts_handle_player_drop();
167 // handle all details when the commit button is pressed (including possibly reporting errors/popups)
168 void multi_ts_commit_pressed();
170 // get the team # of the given ship
171 int multi_ts_get_team(char *ship_name);
173 // function to get the team and slot of a particular ship
174 void multi_ts_get_team_and_slot(char *ship_name,int *team_index,int *slot_index);
176 // function to return the shipname of the ship belonging in slot N
177 char *multi_ts_get_shipname( int team, int slot_index );
179 // blit the proper "locked" button - used for weapon select and briefing screens
180 void multi_ts_blit_locked_button();
182 // the "lock" button has been pressed
183 void multi_ts_lock_pressed();
186 int multi_ts_is_locked();
188 // show a popup saying "only host and team captains can modify, etc, etc"
189 void multi_ts_maybe_host_only_popup();
191 // ------------------------------------------------------------------------------------------------------
192 // TEAM SELECT PACKET HANDLERS
195 // send a player slot position update
196 void send_pslot_update_packet(int team,int code,int sound = -1);
198 // process a player slot position update
199 void process_pslot_update_packet(ubyte *data, header *hinfo);
203 // ------------------------------------------------------------------------------------------------------
204 // TEAM SELECT STUBBED FUNCTIONS