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