2 * Copyright (C) Volition, Inc. 1999. All rights reserved.
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 the
11 * $Logfile: /Freespace2/code/Network/stand_gui.cpp $
13 * $Date: 8/16/99 4:06p $
16 * $Log: /Freespace2/code/Network/stand_gui.cpp $
18 * 16 8/16/99 4:06p Dave
19 * Big honking checkin.
21 * 15 8/11/99 5:54p Dave
22 * Fixed collision problem. Fixed standalone ghost problem.
24 * 14 8/04/99 5:45p Dave
25 * Upped default standalone server framerate to 60.
27 * 13 5/22/99 5:35p Dave
28 * Debrief and chatbox screens. Fixed small hi-res HUD bug.
30 * 12 5/19/99 4:07p Dave
31 * Moved versioning code into a nice isolated common place. Fixed up
32 * updating code on the pxo screen. Fixed several stub problems.
34 * 11 4/25/99 7:43p Dave
35 * Misc small bug fixes. Made sun draw properly.
37 * 10 2/24/99 2:25p Dave
38 * Fixed up chatbox bugs. Made squad war reporting better. Fixed a respawn
39 * bug for dogfight more.
41 * 9 2/18/99 11:46a Neilk
42 * hires interface coord support
44 * 8 2/12/99 6:16p Dave
45 * Pre-mission Squad War code is 95% done.
47 * 7 11/19/98 4:19p Dave
48 * Put IPX sockets back in psnet. Consolidated all multiplayer config
51 * 6 11/17/98 11:12a Dave
52 * Removed player identification by address. Now assign explicit id #'s.
54 * 5 11/05/98 5:55p Dave
55 * Big pass at reducing #includes
57 * 4 10/09/98 2:57p Dave
58 * Starting splitting up OS stuff.
60 * 3 10/08/98 4:29p Dave
61 * Removed reference to osdefs.h
63 * 2 10/07/98 10:53a Dave
66 * 1 10/07/98 10:50a Dave
68 * 63 9/17/98 11:56a Allender
69 * allow use of return key in edit box
71 * 62 9/04/98 3:52p Dave
72 * Put in validated mission updating and application during stats
75 * 61 7/24/98 9:27a Dave
76 * Tidied up endgame sequencing by removing several old flags and
77 * standardizing _all_ endgame stuff with a single function call.
79 * 60 7/10/98 5:04p Dave
80 * Fix connection speed bug on standalone server.
82 * 59 6/18/98 4:46p Allender
83 * removed test code that I previously forgot to remove
85 * 58 6/18/98 3:52p Allender
86 * make close button actually close down property sheet
88 * 57 6/13/98 6:02p Hoffoss
89 * Externalized all new (or forgot to be added) strings to all the code.
91 * 56 6/13/98 3:19p Hoffoss
92 * NOX()ed out a bunch of strings that shouldn't be translated.
94 * 55 6/10/98 2:56p Dave
95 * Substantial changes to reduce bandwidth and latency problems.
97 * 54 5/24/98 3:45a Dave
98 * Minor object update fixes. Justify channel information on PXO. Add a
99 * bunch of configuration stuff for the standalone.
101 * 53 5/22/98 9:35p Dave
102 * Put in channel based support for PXO. Put in "shutdown" button for
103 * standalone. UI tweaks for TvT
105 * 52 5/21/98 9:45p Dave
106 * Lengthened tracker polling times. Put in initial support for PXO
107 * servers with channel filters. Fixed several small UI bugs.
109 * 51 5/18/98 9:15p Dave
110 * Put in network config file support.
112 * 50 5/15/98 5:16p Dave
113 * Fix a standalone resetting bug.Tweaked PXO interface. Display captaincy
114 * status for team vs. team. Put in asserts to check for invalid team vs.
117 * 49 5/15/98 3:36p John
118 * Fixed bug with new graphics window code and standalone server. Made
119 * hwndApp not be a global anymore.
121 * 48 5/10/98 7:06p Dave
122 * Fix endgame sequencing ESC key. Changed how host options warning popups
123 * are done. Fixed pause/message scrollback/options screen problems in mp.
124 * Make sure observer HUD doesn't try to lock weapons.
126 * 47 5/09/98 7:16p Dave
127 * Put in CD checking. Put in standalone host password. Made pilot into
130 * 46 5/08/98 7:09p Dave
131 * Lots of UI tweaking.
133 * 45 5/08/98 5:05p Dave
134 * Go to the join game screen when quitting multiplayer. Fixed mission
135 * text chat bugs. Put mission type symbols on the create game list.
136 * Started updating standalone gui controls.
138 * 44 5/04/98 1:44p Dave
139 * Fixed up a standalone resetting problem. Fixed multiplayer stats
140 * collection for clients. Make sure all multiplayer ui screens have the
141 * correct palette at all times.
143 * 43 5/02/98 5:38p Dave
144 * Put in new tracker API code. Put in ship information on mp team select
145 * screen. Make standalone server name permanent. Fixed standalone server
148 * 42 5/02/98 1:45a Dave
149 * Make standalone goal tree not flicker.
151 * 41 5/01/98 10:57a Jim
152 * from Dave: fixed mission goal problems
154 * 40 4/29/98 12:11a Dave
155 * Put in first rev of full API support for new master tracker.
157 * 39 4/28/98 5:11p Dave
158 * Fixed multi_quit_game() client side sequencing problem. Turn off
159 * afterburners when ending multiplayer mission. Begin integration of mt
160 * API from Kevin Bentley.
162 * 38 4/25/98 2:02p Dave
163 * Put in multiplayer context help screens. Reworked ingame join ship
164 * select screen. Fixed places where network timestamps get hosed.
166 * 37 4/06/98 6:37p Dave
167 * Put in max_observers netgame server option. Make sure host is always
168 * defaulted to alpha 1 or zeta 1. Changed create game so that MAX_PLAYERS
169 * can always join but need to be kicked before commit can happen. Put in
170 * support for server ending a game and notifying clients of a special
173 * 36 3/31/98 5:18p John
174 * Removed demo/save/restore. Made NDEBUG defined compile. Removed a
175 * bunch of debug stuff out of player file. Made model code be able to
176 * unload models and malloc out only however many models are needed.
179 * 35 3/24/98 5:00p Dave
180 * Fixed several ui bugs. Put in pre and post voice stream playback sound
181 * fx. Put in error specific popups for clients getting dropped from games
182 * through actions other than their own.
184 * 34 3/19/98 5:05p Dave
185 * Put in support for targeted multiplayer text and voice messaging (all,
186 * friendly, hostile, individual).
188 * 33 3/17/98 5:29p Dave
189 * Minor bug fixes in player select menu. Solidified mp joining process.
190 * Made furball mode support ingame joiners and dropped players correctly.
192 * 32 3/15/98 4:17p Dave
193 * Fixed oberver hud problems. Put in handy netplayer macros. Reduced size
194 * of network orientation matrices.
196 * 31 3/03/98 5:12p Dave
197 * 50% done with team vs. team interface issues. Added statskeeping to
198 * secondary weapon blasts. Numerous multiplayer ui bug fixes.
200 * 30 2/12/98 4:41p Dave
201 * Seperated multiplayer kick functionality into its own module. Ui
204 * 29 2/05/98 10:24a Hoffoss
205 * Changed "goal" text to "objective", which is the correct term nowadays.
207 * 28 1/31/98 4:32p Dave
208 * Put in new support for VMT player validation, game logging in, and game
209 * logging out. Need to finish stats transfer.
211 * 27 1/28/98 6:24p Dave
212 * Made standalone use ~8 megs less memory. Fixed multiplayer submenu
213 * sequencing problem.
215 * 26 1/24/98 3:39p Dave
216 * Fixed numerous multiplayer bugs (last frame quit problem, weapon bank
217 * changing, deny packets). Add several controls to standalone server.
219 * 25 1/20/98 2:23p Dave
220 * Removed optimized build warnings. 99% done with ingame join fixes.
222 * 24 1/17/98 2:46a Dave
223 * Reworked multiplayer join/accept process. Ingame join still needs to be
226 * 23 1/16/98 2:34p Dave
227 * Made pause screen work properly (multiplayer). Changed how chat packets
230 * 22 1/13/98 5:37p Dave
231 * Reworked a lot of standalone interface code. Put in single and
232 * multiplayer popups for death sequence. Solidified multiplayer kick
235 * 21 1/11/98 10:03p Allender
236 * removed <winsock.h> from headers which included it. Made psnet_socket
237 * type which is defined just as SOCKET type is.
239 * 20 1/05/98 5:07p Dave
240 * Fixed a chat packet bug. Fixed a few state save/restore bugs. Updated a
241 * few things for multiplayer server transfer.
243 * 19 12/10/97 4:46p Dave
244 * Added in more detailed support for multiplayer packet lag/loss. Fixed
245 * some multiplayer stuff. Added some controls to the standalone.
247 * 18 12/03/97 11:50p Dave
248 * Fixed a bunch of multiplayer bugs (standalone and non)
250 * 17 12/03/97 11:59a Dave
251 * Dependant merge checkin
253 * 16 12/02/97 10:05p Dave
254 * Began some large-scale multiplayer debugging work (mostly standalone)
256 * 15 11/15/97 2:37p Dave
257 * More multiplayer campaign support.
259 * 14 10/29/97 5:18p Dave
260 * More debugging of server transfer. Put in debrief/brief
261 * transition for multiplayer (w/standalone)
263 * 13 10/25/97 7:23p Dave
264 * Moved back to single set stats storing. Put in better respawning
267 * 12 10/24/97 6:19p Dave
268 * More standalone testing/fixing. Added reliable endgame sequencing.
269 * Added reliable ingame joining. Added reliable stats transfer (endgame).
270 * Added support for dropping players in debriefing. Removed a lot of old
273 * 11 10/21/97 5:21p Dave
274 * Fixed pregame mission load/file verify debacle. Added single vs.
275 * multiplayer stats system.
277 * 10 10/14/97 5:38p Dave
278 * Player respawns 99.9% done. Only need to check cases for server/host
281 * 9 10/03/97 4:57p Dave
282 * Added functions for new text controls. Added some more reset controls.
283 * Put in checks for all-players-gone.
285 * 8 9/17/97 9:09a Dave
286 * Observer mode works, put in standalone controls. Fixed up some stuff for
287 * ingame join broken by recent code checkins.
289 * 7 8/29/97 5:03p Dave
290 * Added a ton of new gui controls/features.
292 * 6 8/26/97 5:03p Dave
293 * Added bunch of informational controls. Standardized some functions for
294 * external use. Put in godview mode (conditionaled out though).
296 * 5 8/23/97 11:31a Dave
297 * Put in new gui calls. Added a bunch of display controls.
299 * 4 8/20/97 4:19p Dave
300 * Moved some functions around. Added the standalone state text box.
302 * 3 8/18/97 11:46a Dave
303 * Moved definition of STANDALONE_FRAME_CAP tp multi.h
305 * 2 8/11/97 4:52p Dave
306 * Spliced out standalone GUI stuff from OsApi and WinMain.cpp to its own
309 * 1 8/11/97 4:21p Dave
316 #include "stand_gui.h"
319 void std_add_ban(const char *name)
324 void std_add_chat_text(const char *text, int player_index, int add_id)
329 void std_add_player(net_player *p)
334 int std_connect_set_connect_count()
341 void std_connect_set_gamename(const char *name)
346 void std_connect_set_host_connect_status()
351 void std_create_gen_dialog(const char *title)
356 void std_debug_set_standalone_state_string(const char *str)
361 void std_destroy_gen_dialog()
366 void std_do_gui_frame()
371 void std_gen_set_text(const char *str, int field_num)
376 void std_init_standalone()
381 int std_is_host_passwd()
386 void std_multi_add_goals()
391 void std_multi_set_standalone_mission_name(const char *mission_name)
396 void std_multi_set_standalone_missiontime(float mission_time)
401 void std_multi_setup_goal_tree()
406 void std_multi_update_goals()
411 void std_multi_update_netgame_info_controls()
416 int std_player_is_banned(const char *name)
421 int std_remove_player(net_player *p)
428 void std_reset_standalone_gui()
433 void std_reset_timestamps()
438 void std_set_standalone_fps(float fps)
443 void std_update_player_ping(net_player *p)