]> icculus.org git repositories - taylor/freespace2.git/blob - include/multiteamselect.h
rendering functions mostly done; more complete shader setup
[taylor/freespace2.git] / include / multiteamselect.h
1 /*
2  * Copyright (C) Volition, Inc. 1999.  All rights reserved.
3  *
4  * All source code herein is the property of Volition, Inc. You may not sell 
5  * or otherwise commercially exploit the source or things you created based on
6  * the source.
7  */
8
9 /*
10  * $Logfile: /Freespace2/code/Network/MultiTeamSelect.h $
11  * $Revision$
12  * $Date$
13  * $Author$
14  *
15  * Multiplayer Team Selection Code header
16  *
17  * $Log$
18  * Revision 1.3  2002/06/09 04:41:14  relnev
19  * added copyright header
20  *
21  * Revision 1.2  2002/05/26 20:49:54  theoddone33
22  * More progress
23  *
24  * Revision 1.1.1.1  2002/05/03 03:28:12  root
25  * Initial import.
26  *
27  * 
28  * 3     11/05/98 5:55p Dave
29  * Big pass at reducing #includes
30  * 
31  * 2     10/07/98 10:53a Dave
32  * Initial checkin.
33  * 
34  * 1     10/07/98 10:50a Dave
35  * 
36  * 22    5/19/98 8:35p Dave
37  * Revamp PXO channel listing system. Send campaign goals/events to
38  * clients for evaluation. Made lock button pressable on all screens. 
39  * 
40  * 21    5/18/98 12:41a Allender
41  * fixed subsystem problems on clients (i.e. not reporting properly on
42  * damage indicator).  Fixed ingame join problem with respawns.  minor
43  * comm menu stuff
44  * 
45  * 20    5/10/98 7:06p Dave
46  * Fix endgame sequencing ESC key. Changed how host options warning popups
47  * are done. Fixed pause/message scrollback/options screen problems in mp.
48  * Make sure observer HUD doesn't try to lock weapons.
49  * 
50  * 19    5/06/98 8:06p Dave
51  * Made standalone reset properly under weird conditions. Tweak
52  * optionsmulti screen. Upped MAX_WEAPONS to 350. Put in new launch
53  * countdown anim. Minro ui fixes/tweaks.
54  * 
55  * 18    4/22/98 7:24p Dave
56  * Made sure the "player/ships" locked button for multiplayer appears on
57  * all briefing screens.
58  * 
59  * 17    4/20/98 4:56p Allender
60  * allow AI ships to respawn as many times as there are respawns in the
61  * mission.  
62  * 
63  * 16    4/01/98 11:19p Dave
64  * Put in auto-loading of xferred pilot pic files. Grey out background
65  * behind pinfo popup. Put a chatbox message in when players are kicked.
66  * Moved mission title down in briefing. Other ui fixes.
67  * 
68  * 15    3/26/98 6:01p Dave
69  * Put in file checksumming routine in cfile. Made pilot pic xferring more
70  * robust. Cut header size of voice data packets in half. Put in
71  * restricted game host query system.
72  * 
73  * 14    3/10/98 10:56a Dave
74  * Put support for deleting ships from starting wings back in.
75  * 
76  * 13    3/09/98 5:55p Dave
77  * Fixed stats to take asteroid hits into account. Polished up UI stuff in
78  * team select. Finished up pilot info popup. Tracked down and fixed
79  * double click bug.
80  * 
81  * 12    3/05/98 5:03p Dave
82  * More work on team vs. team support for multiplayer. Need to fix bugs in
83  * weapon select.
84  * 
85  * 11    3/01/98 3:26p Dave
86  * Fixed a few team select bugs. Put in multiplayer intertface sounds.
87  * Corrected how ships are disabled/enabled in team select/weapon select
88  * screens.
89  * 
90  * 10    2/23/98 11:09p Dave
91  * Finished up multiplayer campaign support. Seems bug-free.
92  * 
93  * 9     2/19/98 6:26p Dave
94  * Fixed a few file xfer bugs. Tweaked mp team select screen. Put in
95  * initial support for player data uploading.
96  * 
97  * 8     2/18/98 3:56p Dave
98  * Several bugs fixed for mp team select screen. Put in standalone packet
99  * routing for team select.
100  * 
101  * 7     2/17/98 6:08p Dave
102  * Tore out old multiplayer team select screen, installed new one.
103  * 
104  * 6     10/16/97 4:58p Dave
105  * Finsihed up server side respawning issues. Knocked off a bunch of
106  * sequencing issues.
107  * 
108  * 5     10/10/97 4:42p Dave
109  * Fixed up server transfer bugs.
110  * 
111  * 4     10/09/97 4:58p Lawrance
112  * get short_callsign from player struct
113  * 
114  * 3     10/03/97 4:58p Dave
115  * Put in client-side mimicing of host team selection changes. Some more
116  * stanalone hooks. 
117  * 
118  * 2     9/19/97 4:24p Allender
119  * start of team selection screen.
120  * 
121  * 1     9/18/97 11:45a Allender
122  * 
123  */
124
125 #ifndef _MULTITEAMSELECT_H
126 #define _MULTITEAMSELECT_H
127
128 #include "pstypes.h"
129
130 // ------------------------------------------------------------------------------------------------------
131 // TEAM SELECT DEFINES/VARS
132 //
133
134 struct header;
135
136 // should be initialize to 0 inside of multi_vars_init
137 extern int Multi_ts_inited;
138
139 #define MULTI_TS_MAX_TEAMS                                                                      2                                               // 2 teams max for now
140 #define MULTI_TS_NUM_SHIP_SLOTS                                                 12                                              // # of ship slots in non team vs. team mode
141
142 // deleted ship objnums
143 extern int Multi_ts_deleted_objnums[MULTI_TS_MAX_TEAMS * MULTI_TS_NUM_SHIP_SLOTS];
144 extern int Multi_ts_num_deleted;
145
146 // ------------------------------------------------------------------------------------------------------
147 // TEAM SELECT FUNCTIONS
148 //
149
150 // initialize the team select screen (always call, even when switching between weapon select, etc)
151 void multi_ts_init();
152
153 // initialize all critical internal data structures
154 void multi_ts_common_init();
155
156 // do frame for team select
157 void multi_ts_do();
158
159 // close the team select screen (always call, even when switching between weapon select, etc)
160 void multi_ts_close();
161
162 // drop a carried icon 
163 void multi_ts_drop(int from_type,int from_index,int to_type,int to_index,int ship_class,int player_index = -1);
164
165 // assign all players to appropriate default wings/slots
166 void multi_ts_assign_players_all();
167
168 // is the given slot disabled for the specified player
169 int multi_ts_disabled_slot(int slot_index,int player_index = -1);
170
171 // is the given slot disabled for the specified player, _and_ it is his ship as well
172 int multi_ts_disabled_high_slot(int slot_index,int player_index = -1);
173
174 // delete ships which have been removed from the game, tidy things 
175 void multi_ts_create_wings();
176
177 // resynch all display/interface elements based upon all the ship/weapon pool values
178 void multi_ts_sync_interface();
179
180 // do any necessary processing for players who have left the game
181 void multi_ts_handle_player_drop();
182
183 // handle all details when the commit button is pressed (including possibly reporting errors/popups)
184 void multi_ts_commit_pressed();
185
186 // get the team # of the given ship
187 int multi_ts_get_team(char *ship_name);
188
189 // function to get the team and slot of a particular ship
190 void multi_ts_get_team_and_slot(char *ship_name,int *team_index,int *slot_index);
191
192 // function to return the shipname of the ship belonging in slot N
193 const char *multi_ts_get_shipname( int team, int slot_index );
194
195 // blit the proper "locked" button - used for weapon select and briefing screens
196 void multi_ts_blit_locked_button();
197
198 // the "lock" button has been pressed
199 void multi_ts_lock_pressed();
200
201 // if i'm "locked"
202 int multi_ts_is_locked();
203
204 // show a popup saying "only host and team captains can modify, etc, etc"
205 void multi_ts_maybe_host_only_popup();
206
207 // ------------------------------------------------------------------------------------------------------
208 // TEAM SELECT PACKET HANDLERS
209 //
210
211 // send a player slot position update
212 void send_pslot_update_packet(int team,int code,int sound = -1);
213
214 // process a player slot position update
215 void process_pslot_update_packet(ubyte *data, header *hinfo);
216
217
218
219 // ------------------------------------------------------------------------------------------------------
220 // TEAM SELECT STUBBED FUNCTIONS
221 //
222
223 #endif
224