2 * $Logfile: /Freespace2/code/Network/stand_gui.h $
8 * Revision 1.1 2002/05/03 03:28:12 root
12 * 4 11/19/98 4:19p Dave
13 * Put IPX sockets back in psnet. Consolidated all multiplayer config
16 * 3 11/05/98 5:55p Dave
17 * Big pass at reducing #includes
19 * 2 10/07/98 10:53a Dave
22 * 1 10/07/98 10:50a Dave
24 * 24 9/04/98 3:52p Dave
25 * Put in validated mission updating and application during stats
28 * 23 6/10/98 2:56p Dave
29 * Substantial changes to reduce bandwidth and latency problems.
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.
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
39 * 20 5/18/98 9:15p Dave
40 * Put in network config file support.
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.
47 * 18 5/09/98 7:16p Dave
48 * Put in CD checking. Put in standalone host password. Made pilot into
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.
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.
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.
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.
69 * 13 1/17/98 5:51p Dave
70 * Bug fixes for bugs generated by multiplayer testing.
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
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.
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.
85 * 9 12/03/97 11:59a Dave
86 * Dependant merge checkin
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.
92 * 7 9/24/97 5:04p Dave
93 * Removed an unnecessary function prototype.
95 * 6 8/29/97 5:03p Dave
96 * Added a ton of new gui controls/features.
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).
102 * 4 8/23/97 11:31a Dave
103 * Put in new gui calls. Added a bunch of display controls.
105 * 3 8/20/97 4:20p Dave
106 * Added standalone state text box.
108 * 2 8/11/97 4:52p Dave
109 * Spliced out standalone GUI stuff from OsApi and WinMain.cpp to its own
112 * 1 8/11/97 4:21p Dave
117 #ifndef _FREESPACE_STANDALONE_GUI_HEADER_FILE
118 #define _FREESPACE_STANDALONE_GUI_HEADER_FILE
120 // ----------------------------------------------------------------------------------------
121 // external variables
126 // ----------------------------------------------------------------------------------------
127 // generic dialog functions
130 // create the validate dialog
131 void std_create_gen_dialog(char *title);
133 // kill the validate dialog();
134 void std_destroy_gen_dialog();
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);
140 // is the validate dialog active
141 int std_gen_is_active();
144 // ----------------------------------------------------------------------------------------
145 // connection page/tab functions
148 // set the text box indicating how many players are connected, returning the determined count
149 int std_connect_set_connect_count();
151 // set the connect status (connected or not) of the game host
152 void std_connect_set_host_connect_status();
154 // add an ip string to the connect page listbox
155 void std_connect_add_ip_string(char *string);
157 // remove an ip string from the connect page listbox
158 void std_connect_remove_ip_string(char *string);
160 // set an ip string on the connect page listbox
161 void std_connect_set_ip_string(char *lookup,char *string);
163 // kick a player (the one currently selected in the listbox)
164 void std_connect_kick_player();
166 // update the ping for this particular player
167 void std_connect_update_ping(net_player *p);
169 // clear all the controls for this page
170 void std_connect_clear_controls();
172 // set the game name for the standalone. passing NULL uses the default
173 void std_connect_set_gamename(char *name);
175 // the user has changed the text in the server name text box. handle this
176 void std_connect_handle_name_change();
178 // the user has changed the text in the host password text box
179 void std_connect_handle_passwd_change();
182 // ----------------------------------------------------------------------------------------
183 // multiplayer page/tab functions
186 // set the mission time in seconds
187 void std_multi_set_standalone_missiontime(float mission_time);
189 // set the mission name
190 void std_multi_set_standalone_mission_name(char *mission_name);
192 // initialize the goal tree for this mission
193 void std_multi_setup_goal_tree();
195 // add all the goals from the current mission to the tree control
196 void std_multi_add_goals();
198 // update all the goals in the goal tree based upon the mission status
199 void std_multi_update_goals();
201 // set the framerate text box for this tab
202 void std_multi_set_framerate(float f);
204 // clear all the controls for this page
205 void std_multi_clear_controls();
207 // update the netgame information area controls with the current Netgame settings
208 void std_multi_update_netgame_info_controls();
211 // ---------------------------------------------------------------------------------------
212 // player info page/tab functions
215 // start displaying info for the passed player on this page
216 void std_pinfo_display_player_info(net_player *p);
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);
222 // add a player to the list on the player info page
223 void std_pinfo_add_player_list_item(net_player *p);
225 // remove a player from the list on the player info page
226 void std_pinfo_remove_player_list_item(net_player *p);
228 // update the ping display for this player
229 void std_pinfo_update_ping(net_player *p);
231 // clear all the controls for this page
232 void std_pinfo_clear_controls();
235 // ---------------------------------------------------------------------------------------
236 // player god stuff page/tab functions
239 // add a player to the listbox on the godstuff page
240 void std_gs_add_player(net_player *p);
242 // remove a player from the listbox on the godstuff page
243 void std_gs_remove_player(net_player *p);
245 // send a message as if the standalone were a player
246 void std_gs_send_godstuff_message();
248 // set the framerate text box for this page
249 void std_gs_set_framerate(float f);
251 // clear all the controls for this page
252 void std_gs_clear_controls();
255 // ---------------------------------------------------------------------------------------
256 // debug page/tab functions
259 // set the text on the standalones state indicator box
260 void std_debug_set_standalone_state_string(char *str);
262 // clear all the controls for this page
263 void std_debug_clear_controls();
266 // ---------------------------------------------------------------------------------------
270 // add a player and take care of updating all gui/data details
271 void std_add_player(net_player *p);
273 // remove a player and take care of updateing all gui/data details
274 int std_remove_player(net_player *p);
276 // set any relevant controls which display the framerate of the standalone
277 void std_set_standalone_fps(float fps);
279 // update any relveant controls which display the ping for the given player
280 void std_update_player_ping(net_player *p);
282 // reset all gui stuff for the standalone
283 void std_reset_standalone_gui();
285 // reset all networking/gui stuff (calls reset_standalone_gui) for the standalone
286 void std_multi_standalone_reset_all();
288 // close down the standalone
289 void std_deinit_standalone();
291 // initialize the standalone
292 void std_init_standalone();
294 // do any gui related issues on the standalone (like periodically updating player stats, etc...)
295 void std_do_gui_frame();
297 // notify the user that the standalone has failed to login to the tracker on startup
298 void std_tracker_notify_login_fail();
300 // attempt to log the standalone into the tracker
301 void std_tracker_login();
303 // reset all stand gui timestamps
304 void std_reset_timestamps();
306 // add a line of text chat to the standalone
307 void std_add_chat_text(char *text,int player_index,int add_id);
309 // if the standalone is host password protected
310 int std_is_host_passwd();
312 // change the default property sheet interface into something more useful
313 void std_mutate_sheet();
315 // if the given callsign is banned from the server
316 int std_player_is_banned(char *name);
318 // add a callsign to the ban list
319 void std_add_ban(char *name);