]> icculus.org git repositories - taylor/freespace2.git/blob - src/network/stand_gui.cpp
add copyright notice
[taylor/freespace2.git] / src / network / stand_gui.cpp
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 the
6  * source.
7  *
8 */
9
10 /*
11  * $Logfile: /Freespace2/code/Network/stand_gui.cpp $
12  * $Revision: 16 $
13  * $Date: 8/16/99 4:06p $
14  * $Author: Dave $
15  *
16  * $Log: /Freespace2/code/Network/stand_gui.cpp $
17  *
18  * 16    8/16/99 4:06p Dave
19  * Big honking checkin.
20  *
21  * 15    8/11/99 5:54p Dave
22  * Fixed collision problem. Fixed standalone ghost problem.
23  *
24  * 14    8/04/99 5:45p Dave
25  * Upped default standalone server framerate to 60.
26  *
27  * 13    5/22/99 5:35p Dave
28  * Debrief and chatbox screens. Fixed small hi-res HUD bug.
29  *
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.
33  *
34  * 11    4/25/99 7:43p Dave
35  * Misc small bug fixes. Made sun draw properly.
36  *
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.
40  *
41  * 9     2/18/99 11:46a Neilk
42  * hires interface coord support
43  *
44  * 8     2/12/99 6:16p Dave
45  * Pre-mission Squad War code is 95% done.
46  *
47  * 7     11/19/98 4:19p Dave
48  * Put IPX sockets back in psnet. Consolidated all multiplayer config
49  * files into one.
50  *
51  * 6     11/17/98 11:12a Dave
52  * Removed player identification by address. Now assign explicit id #'s.
53  *
54  * 5     11/05/98 5:55p Dave
55  * Big pass at reducing #includes
56  *
57  * 4     10/09/98 2:57p Dave
58  * Starting splitting up OS stuff.
59  *
60  * 3     10/08/98 4:29p Dave
61  * Removed reference to osdefs.h
62  *
63  * 2     10/07/98 10:53a Dave
64  * Initial checkin.
65  *
66  * 1     10/07/98 10:50a Dave
67  *
68  * 63    9/17/98 11:56a Allender
69  * allow use of return key in edit box
70  *
71  * 62    9/04/98 3:52p Dave
72  * Put in validated mission updating and application during stats
73  * updating.
74  *
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.
78  *
79  * 60    7/10/98 5:04p Dave
80  * Fix connection speed bug on standalone server.
81  *
82  * 59    6/18/98 4:46p Allender
83  * removed test code that I previously forgot to remove
84  *
85  * 58    6/18/98 3:52p Allender
86  * make close button actually close down property sheet
87  *
88  * 57    6/13/98 6:02p Hoffoss
89  * Externalized all new (or forgot to be added) strings to all the code.
90  *
91  * 56    6/13/98 3:19p Hoffoss
92  * NOX()ed out a bunch of strings that shouldn't be translated.
93  *
94  * 55    6/10/98 2:56p Dave
95  * Substantial changes to reduce bandwidth and latency problems.
96  *
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.
100  *
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
104  *
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.
108  *
109  * 51    5/18/98 9:15p Dave
110  * Put in network config file support.
111  *
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.
115  * team situations.
116  *
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.
120  *
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.
125  *
126  * 47    5/09/98 7:16p Dave
127  * Put in CD checking. Put in standalone host password. Made pilot into
128  * popup scrollable.
129  *
130  * 46    5/08/98 7:09p Dave
131  * Lots of UI tweaking.
132  *
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.
137  *
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.
142  *
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
146  * text messages.
147  *
148  * 42    5/02/98 1:45a Dave
149  * Make standalone goal tree not flicker.
150  *
151  * 41    5/01/98 10:57a Jim
152  * from Dave:  fixed mission goal problems
153  *
154  * 40    4/29/98 12:11a Dave
155  * Put in first rev of full API support for new master tracker.
156  *
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.
161  *
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.
165  *
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
171  * condition.
172  *
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.
177  *
178  *
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.
183  *
184  * 34    3/19/98 5:05p Dave
185  * Put in support for targeted multiplayer text and voice messaging (all,
186  * friendly, hostile, individual).
187  *
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.
191  *
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.
195  *
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.
199  *
200  * 30    2/12/98 4:41p Dave
201  * Seperated multiplayer kick functionality into its own module. Ui
202  * tweaking
203  *
204  * 29    2/05/98 10:24a Hoffoss
205  * Changed "goal" text to "objective", which is the correct term nowadays.
206  *
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.
210  *
211  * 27    1/28/98 6:24p Dave
212  * Made standalone use ~8 megs less memory. Fixed multiplayer submenu
213  * sequencing problem.
214  *
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.
218  *
219  * 25    1/20/98 2:23p Dave
220  * Removed optimized build warnings. 99% done with ingame join fixes.
221  *
222  * 24    1/17/98 2:46a Dave
223  * Reworked multiplayer join/accept process. Ingame join still needs to be
224  * integrated.
225  *
226  * 23    1/16/98 2:34p Dave
227  * Made pause screen work properly (multiplayer). Changed how chat packets
228  * work.
229  *
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
233  * code.
234  *
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.
238  *
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.
242  *
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.
246  *
247  * 18    12/03/97 11:50p Dave
248  * Fixed a bunch of multiplayer bugs (standalone and non)
249  *
250  * 17    12/03/97 11:59a Dave
251  * Dependant merge checkin
252  *
253  * 16    12/02/97 10:05p Dave
254  * Began some large-scale multiplayer debugging work (mostly standalone)
255  *
256  * 15    11/15/97 2:37p Dave
257  * More multiplayer campaign support.
258  *
259  * 14    10/29/97 5:18p Dave
260  * More debugging of server transfer. Put in debrief/brief
261  * transition for multiplayer (w/standalone)
262  *
263  * 13    10/25/97 7:23p Dave
264  * Moved back to single set stats storing. Put in better respawning
265  * locations system.
266  *
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
271  * unused code.
272  *
273  * 11    10/21/97 5:21p Dave
274  * Fixed pregame mission load/file verify debacle. Added single vs.
275  * multiplayer stats system.
276  *
277  * 10    10/14/97 5:38p Dave
278  * Player respawns 99.9% done. Only need to check cases for server/host
279  * getting killed.
280  *
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.
284  *
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.
288  *
289  * 7     8/29/97 5:03p Dave
290  * Added a ton of new gui controls/features.
291  *
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).
295  *
296  * 5     8/23/97 11:31a Dave
297  * Put in new gui calls. Added a bunch of display controls.
298  *
299  * 4     8/20/97 4:19p Dave
300  * Moved some functions around. Added the standalone state text box.
301  *
302  * 3     8/18/97 11:46a Dave
303  * Moved definition of STANDALONE_FRAME_CAP tp multi.h
304  *
305  * 2     8/11/97 4:52p Dave
306  * Spliced out standalone GUI stuff from OsApi and WinMain.cpp to its own
307  * module.
308  *
309  * 1     8/11/97 4:21p Dave
310  *
311  * $NoKeywords: $
312  */
313
314
315 #include "pstypes.h"
316 #include "stand_gui.h"
317
318
319 void std_add_ban(const char *name)
320 {
321         STUB_FUNCTION;
322 }
323
324 void std_add_chat_text(const char *text, int player_index, int add_id)
325 {
326         STUB_FUNCTION;
327 }
328
329 void std_add_player(net_player *p)
330 {
331         STUB_FUNCTION;
332 }
333
334 int std_connect_set_connect_count()
335 {
336         STUB_FUNCTION;
337         
338         return 0;
339 }
340
341 void std_connect_set_gamename(const char *name)
342 {
343         STUB_FUNCTION;
344 }
345
346 void std_connect_set_host_connect_status()
347 {
348         STUB_FUNCTION;
349 }
350
351 void std_create_gen_dialog(const char *title)
352 {
353         STUB_FUNCTION;
354 }
355
356 void std_debug_set_standalone_state_string(const char *str)
357 {
358         STUB_FUNCTION;
359 }
360
361 void std_destroy_gen_dialog()
362 {
363         STUB_FUNCTION;
364 }
365
366 void std_do_gui_frame()
367 {
368         STUB_FUNCTION;
369 }
370
371 void std_gen_set_text(const char *str, int field_num)
372 {
373         STUB_FUNCTION;
374 }
375
376 void std_init_standalone()
377 {
378         STUB_FUNCTION;
379 }
380
381 int std_is_host_passwd()
382 {
383         return 0;
384 }
385
386 void std_multi_add_goals()
387 {
388         STUB_FUNCTION;
389 }
390
391 void std_multi_set_standalone_mission_name(const char *mission_name)
392 {
393         STUB_FUNCTION;
394 }
395
396 void std_multi_set_standalone_missiontime(float mission_time)
397 {
398         STUB_FUNCTION;
399 }
400
401 void std_multi_setup_goal_tree()
402 {
403         STUB_FUNCTION;
404 }
405
406 void std_multi_update_goals()
407 {
408         STUB_FUNCTION;
409 }
410
411 void std_multi_update_netgame_info_controls()
412 {
413         STUB_FUNCTION;
414 }
415
416 int std_player_is_banned(const char *name)
417 {
418         return 0;
419 }
420
421 int std_remove_player(net_player *p)
422 {
423         STUB_FUNCTION;
424         
425         return 0;
426 }
427
428 void std_reset_standalone_gui()
429 {
430         STUB_FUNCTION;
431 }
432
433 void std_reset_timestamps()
434 {
435         STUB_FUNCTION;
436 }
437
438 void std_set_standalone_fps(float fps)
439 {
440         STUB_FUNCTION;
441 }
442
443 void std_update_player_ping(net_player *p)
444 {
445         STUB_FUNCTION;
446 }