]> icculus.org git repositories - taylor/freespace2.git/blob - include/stand_gui.h
Initial revision
[taylor/freespace2.git] / include / stand_gui.h
1 /*
2  * $Logfile: /Freespace2/code/Network/stand_gui.h $
3  * $Revision$
4  * $Date$
5  * $Author$
6  *
7  * $Log$
8  * Revision 1.1  2002/05/03 03:28:12  root
9  * Initial revision
10  *
11  * 
12  * 4     11/19/98 4:19p Dave
13  * Put IPX sockets back in psnet. Consolidated all multiplayer config
14  * files into one.
15  * 
16  * 3     11/05/98 5:55p Dave
17  * Big pass at reducing #includes
18  * 
19  * 2     10/07/98 10:53a Dave
20  * Initial checkin.
21  * 
22  * 1     10/07/98 10:50a Dave
23  * 
24  * 24    9/04/98 3:52p Dave
25  * Put in validated mission updating and application during stats
26  * updating.
27  * 
28  * 23    6/10/98 2:56p Dave
29  * Substantial changes to reduce bandwidth and latency problems.
30  * 
31  * 22    5/24/98 3:45a Dave
32  * Minor object update fixes. Justify channel information on PXO. Add a
33  * bunch of configuration stuff for the standalone.
34  * 
35  * 21    5/22/98 9:35p Dave
36  * Put in channel based support for PXO. Put in "shutdown" button for
37  * standalone. UI tweaks for TvT
38  * 
39  * 20    5/18/98 9:15p Dave
40  * Put in network config file support.
41  * 
42  * 19    5/15/98 5:16p Dave
43  * Fix a standalone resetting bug.Tweaked PXO interface. Display captaincy
44  * status for team vs. team. Put in asserts to check for invalid team vs.
45  * team situations.
46  * 
47  * 18    5/09/98 7:16p Dave
48  * Put in CD checking. Put in standalone host password. Made pilot into
49  * popup scrollable.
50  * 
51  * 17    5/08/98 5:05p Dave
52  * Go to the join game screen when quitting multiplayer. Fixed mission
53  * text chat bugs. Put mission type symbols on the create game list.
54  * Started updating standalone gui controls.
55  * 
56  * 16    3/24/98 5:00p Dave
57  * Fixed several ui bugs. Put in pre and post voice stream playback sound
58  * fx. Put in error specific popups for clients getting dropped from games
59  * through actions other than their own.
60  * 
61  * 15    1/31/98 4:32p Dave
62  * Put in new support for VMT player validation, game logging in, and game
63  * logging out. Need to finish stats transfer.
64  * 
65  * 14    1/24/98 3:39p Dave
66  * Fixed numerous multiplayer bugs (last frame quit problem, weapon bank
67  * changing, deny packets). Add several controls to standalone server.
68  * 
69  * 13    1/17/98 5:51p Dave
70  * Bug fixes for bugs generated by multiplayer testing.
71  * 
72  * 12    1/13/98 5:37p Dave
73  * Reworked a lot of standalone interface code. Put in single and
74  * multiplayer popups for death sequence. Solidified multiplayer kick
75  * code.
76  * 
77  * 11    1/11/98 10:03p Allender
78  * removed <winsock.h> from headers which included it.  Made psnet_socket
79  * type which is defined just as SOCKET type is.
80  * 
81  * 10    12/10/97 4:46p Dave
82  * Added in more detailed support for multiplayer packet lag/loss. Fixed
83  * some multiplayer stuff. Added some controls to the standalone.
84  * 
85  * 9     12/03/97 11:59a Dave
86  * Dependant merge checkin
87  * 
88  * 8     10/03/97 4:57p Dave
89  * Added functions for new text controls. Added some more reset controls.
90  * Put in checks for all-players-gone.
91  * 
92  * 7     9/24/97 5:04p Dave
93  * Removed an unnecessary function prototype.
94  * 
95  * 6     8/29/97 5:03p Dave
96  * Added a ton of new gui controls/features.
97  * 
98  * 5     8/26/97 5:03p Dave
99  * Added bunch of informational controls. Standardized some functions for
100  * external use. Put in godview mode (conditionaled out though).
101  * 
102  * 4     8/23/97 11:31a Dave
103  * Put in new gui calls. Added a bunch of display controls.
104  * 
105  * 3     8/20/97 4:20p Dave
106  * Added standalone state text box.
107  * 
108  * 2     8/11/97 4:52p Dave
109  * Spliced out standalone GUI stuff from OsApi and WinMain.cpp to its own
110  * module.
111  * 
112  * 1     8/11/97 4:21p Dave
113  * 
114  * $NoKeywords: $
115  */
116
117 #ifndef _FREESPACE_STANDALONE_GUI_HEADER_FILE
118 #define _FREESPACE_STANDALONE_GUI_HEADER_FILE
119
120 // ----------------------------------------------------------------------------------------
121 // external variables
122 //
123
124 struct net_player;
125
126 // ----------------------------------------------------------------------------------------
127 // generic dialog functions
128 //
129
130 // create the validate dialog 
131 void std_create_gen_dialog(char *title);
132
133 // kill the validate dialog();
134 void std_destroy_gen_dialog();
135
136 // set the text in the filename of the validate dialog
137 // valid values for field_num == 0 .. 2
138 void std_gen_set_text(char *str, int field_num);
139
140 // is the validate dialog active
141 int std_gen_is_active();
142
143
144 // ----------------------------------------------------------------------------------------
145 // connection page/tab functions
146 //
147
148 // set the text box indicating how many players are connected, returning the determined count
149 int std_connect_set_connect_count();
150
151 // set the connect status (connected or not) of the game host
152 void std_connect_set_host_connect_status();
153
154 // add an ip string to the connect page listbox
155 void std_connect_add_ip_string(char *string);
156
157 // remove an ip string from the connect page listbox
158 void std_connect_remove_ip_string(char *string);
159
160 // set an ip string on the connect page listbox
161 void std_connect_set_ip_string(char *lookup,char *string);
162
163 // kick a player (the one currently selected in the listbox)
164 void std_connect_kick_player();
165
166 // update the ping for this particular player
167 void std_connect_update_ping(net_player *p);
168
169 // clear all the controls for this page
170 void std_connect_clear_controls();
171
172 // set the game name for the standalone. passing NULL uses the default
173 void std_connect_set_gamename(char *name);
174
175 // the user has changed the text in the server name text box. handle this
176 void std_connect_handle_name_change();
177
178 // the user has changed the text in the host password text box
179 void std_connect_handle_passwd_change();
180
181
182 // ----------------------------------------------------------------------------------------
183 // multiplayer page/tab functions
184 //
185
186 // set the mission time in seconds
187 void std_multi_set_standalone_missiontime(float mission_time);
188
189 // set the mission name
190 void std_multi_set_standalone_mission_name(char *mission_name);
191
192 // initialize the goal tree for this mission 
193 void std_multi_setup_goal_tree();
194
195 // add all the goals from the current mission to the tree control
196 void std_multi_add_goals();
197
198 // update all the goals in the goal tree based upon the mission status
199 void std_multi_update_goals();
200
201 // set the framerate text box for this tab
202 void std_multi_set_framerate(float f);
203
204 // clear all the controls for this page
205 void std_multi_clear_controls();
206
207 // update the netgame information area controls with the current Netgame settings
208 void std_multi_update_netgame_info_controls();
209
210
211 // ---------------------------------------------------------------------------------------
212 // player info page/tab functions
213 //
214
215 // start displaying info for the passed player on this page
216 void std_pinfo_display_player_info(net_player *p);
217
218 // check to see if this player is the one being displayed, and if so, then update the display info
219 // return 1 if the player was updated
220 int std_pinfo_maybe_update_player_info(net_player *p);
221
222 // add a player to the list on the player info page
223 void std_pinfo_add_player_list_item(net_player *p);
224
225 // remove a player from the list on the player info page
226 void std_pinfo_remove_player_list_item(net_player *p);
227
228 // update the ping display for this player
229 void std_pinfo_update_ping(net_player *p);
230
231 // clear all the controls for this page
232 void std_pinfo_clear_controls();
233
234
235 // ---------------------------------------------------------------------------------------
236 // player god stuff page/tab functions
237 //
238
239 // add a player to the listbox on the godstuff page
240 void std_gs_add_player(net_player *p);
241
242 // remove a player from the listbox on the godstuff page
243 void std_gs_remove_player(net_player *p);
244
245 // send a message as if the standalone were a player
246 void std_gs_send_godstuff_message();
247
248 // set the framerate text box for this page
249 void std_gs_set_framerate(float f);
250
251 // clear all the controls for this page
252 void std_gs_clear_controls();
253
254
255 // ---------------------------------------------------------------------------------------
256 // debug page/tab functions
257 //
258
259 // set the text on the standalones state indicator box
260 void std_debug_set_standalone_state_string(char *str);
261
262 // clear all the controls for this page
263 void std_debug_clear_controls();
264
265
266 // ---------------------------------------------------------------------------------------
267 // general functions
268 // 
269
270 // add a player and take care of updating all gui/data details
271 void std_add_player(net_player *p);
272
273 // remove a player and take care of updateing all gui/data details
274 int std_remove_player(net_player *p);
275
276 // set any relevant controls which display the framerate of the standalone
277 void std_set_standalone_fps(float fps);
278
279 // update any relveant controls which display the ping for the given player
280 void std_update_player_ping(net_player *p);
281
282 // reset all gui stuff for the standalone
283 void std_reset_standalone_gui();
284
285 // reset all networking/gui stuff (calls reset_standalone_gui) for the standalone
286 void std_multi_standalone_reset_all();
287
288 // close down the standalone
289 void std_deinit_standalone();
290
291 // initialize the standalone
292 void std_init_standalone();
293
294 // do any gui related issues on the standalone (like periodically updating player stats, etc...)
295 void std_do_gui_frame();
296
297 // notify the user that the standalone has failed to login to the tracker on startup
298 void std_tracker_notify_login_fail();
299
300 // attempt to log the standalone into the tracker
301 void std_tracker_login();
302
303 // reset all stand gui timestamps
304 void std_reset_timestamps();
305
306 // add a line of text chat to the standalone
307 void std_add_chat_text(char *text,int player_index,int add_id);
308
309 // if the standalone is host password protected
310 int std_is_host_passwd();
311
312 // change the default property sheet interface into something more useful
313 void std_mutate_sheet();
314
315 // if the given callsign is banned from the server
316 int std_player_is_banned(char *name);
317
318 // add a callsign to the ban list
319 void std_add_ban(char *name);
320
321 #endif
322