]> icculus.org git repositories - taylor/freespace2.git/blob - src/fred2/fredstubs.cpp
fix issue with looping audio streams
[taylor/freespace2.git] / src / fred2 / fredstubs.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
6  * the source.
7  */
8
9 /*
10  * $Logfile: /Freespace2/code/Fred2/FredStubs.cpp $
11  * $Revision$
12  * $Date$
13  * $Author$
14  *
15  * Bogus C file for functions and variable stubs that Fred needs because it
16  * includes some libraries that makes functions calls to other libraries that FRED
17  * doesn't include.  In a perfect world, programmers would work harder to keep
18  * the code they write more self-contained and not tie all the code everywhere
19  * to each other.
20  *
21  * $Log$
22  * Revision 1.3  2002/06/09 04:41:16  relnev
23  * added copyright header
24  *
25  * Revision 1.2  2002/05/07 03:16:44  theoddone33
26  * The Great Newline Fix
27  *
28  * Revision 1.1.1.1  2002/05/03 03:28:08  root
29  * Initial import.
30  *
31  * 
32  * 26    9/27/99 10:13a Jefff
33  * another stub for not_in_demo popup
34  * 
35  * 25    9/13/99 5:16p Dave
36  * New stubs
37  * 
38  * 24    9/06/99 8:43p Dave
39  * Checked in some stubs.
40  * 
41  * 23    9/01/99 10:14a Dave
42  * Pirate bob.
43  * 
44  * 22    8/26/99 10:15a Dave
45  * Don't apply beam whacks to docked ships.
46  * 
47  * 21    8/04/99 2:24a Dave
48  * Fixed escort gauge ordering for dogfight.
49  * 
50  * 20    7/08/99 10:53a Dave
51  * New multiplayer interpolation scheme. Not 100% done yet, but still
52  * better than the old way.
53  * 
54  * 19    6/10/99 11:11a Jamesa
55  * More stubs.
56  * 
57  * 18    4/12/99 10:36a Johnson
58  * Stub for game_hacked_data
59  * 
60  * 17    3/19/99 6:15p Dave
61  * Stubs
62  * 
63  * 16    2/23/99 7:03p Dave
64  * Rewrote a horribly mangled and evil team loadout dialog. Bugs gone.
65  * 
66  * 15    2/17/99 2:11p Dave
67  * First full run of squad war. All freespace and tracker side stuff
68  * works.
69  * 
70  * 14    1/14/99 12:49a Dave
71  * Made an attempt to put briefing icons back into FRED.
72  * 
73  * 13    1/12/99 5:45p Dave
74  * Whole slew of new stubs.
75  * 
76  * 12    1/08/99 2:07p Dave
77  * Temporary checkin. Super early support for AWACS and beam weapons.
78  * 
79  * 11    12/06/98 2:36p Dave
80  * Stub.
81  * 
82  * 10    12/03/98 10:14a Dave
83  * 
84  * 9     11/30/98 5:32p Dave
85  * Fixed up Fred support for software mode.
86  * 
87  * 8     11/19/98 8:05a Dave
88  * Psnet stub
89  * 
90  * 7     11/12/98 12:12a Dave
91  * Stub for new turret fired packet.
92  * 
93  * 6     10/21/98 9:56a Dave
94  * Fixed stupid linker thing.
95  * 
96  * 5     10/13/98 9:57a Dave
97  * 
98  * 4     10/13/98 9:27a Dave
99  * Started neatening up freespace.h
100  * 
101  * 3     10/12/98 1:01p Dave
102  * Fixed object rotation bug (uninitialized data). Changed a few stubs to
103  * correspond to new var names.
104  * 
105  * 2     10/07/98 6:28p Dave
106  * Initial checkin. Renamed all relevant stuff to be Fred2 instead of
107  * Fred. Globalized mission and campaign file extensions. Removed Silent
108  * Threat specific code.
109  * 
110  * 1     10/07/98 3:01p Dave
111  * 
112  * 1     10/07/98 3:00p Dave
113  * 
114  * 238   9/20/98 9:46p Dave
115  * send_change_iff_packet() stub.
116  * 
117  * 237   9/15/98 11:44a Dave
118  * Renamed builtin ships and wepaons appropriately in FRED. Put in scoring
119  * scale factors. Fixed standalone filtering of MD missions to non-MD
120  * hosts.
121  * 
122  * 236   9/12/98 2:17p Dave
123  * Multiplayer reinforcement fix stub.
124  * 
125  * 235   8/28/98 3:28p Dave
126  * EMP effect done. AI effects may need some tweaking as required.
127  * 
128  * 234   8/26/98 2:14p Dave
129  * 
130  * 233   8/25/98 1:48p Dave
131  * First rev of EMP effect. Player side stuff basically done. Next comes
132  * AI code.
133  * 
134  * 232   8/11/98 9:21a Dave
135  * new TvT stub.
136  * 
137  * 231   7/14/98 4:57p Allender
138  * 
139  * 230   7/06/98 5:08p Hoffoss
140  * 
141  * 229   6/22/98 11:02a Hoffoss
142  * 
143  * 228   6/09/98 12:12p Hoffoss
144  * Added XSTR localization code.
145  * 
146  * 227   6/07/98 3:25p Lawrance
147  * 
148  * 226   5/25/98 2:20p Allender
149  * scoring_level_close()
150  * 
151  * 225   5/23/98 6:53p Allender
152  * AL: add Skill_level to stubs
153  * 
154  * 224   5/21/98 4:14a Allender
155  * 
156  * 223   5/18/98 1:56a Allender
157  * respawn limit to 999 max
158  * 
159  * 222   5/18/98 12:41a Allender
160  * fixed subsystem problems on clients (i.e. not reporting properly on
161  * damage indicator).  Fixed ingame join problem with respawns.  minor
162  * comm menu stuff
163  * 
164  * 221   5/15/98 11:04p Sandeep
165  * fixed a bug caused by Alan. :)
166  * 
167  * 220   5/14/98 2:24p Sandeep
168  * 
169  * 219   5/13/98 11:34p Mike
170  * Model caching system.
171  * 
172  * 218   5/13/98 11:16p Allender
173  * 
174  * 217   5/09/98 10:35p Allender
175  * 
176  * 216   5/09/98 9:49p Allender
177  * 
178  * 215   5/09/98 3:38p Sandeep
179  * 
180  * 214   5/08/98 11:20a Allender
181  * fix ingame join trouble.  Small messaging fix.  Enable collisions for
182  * friendlies again
183  * 
184  * 213   5/05/98 5:12p Sandeep
185  * 
186  * 212   5/05/98 11:10a Johnson
187  * Fix help overlay link errors
188  * 
189  * 211   5/04/98 6:06p Lawrance
190  * Make red alert mode work!
191  * 
192  * 210   4/30/98 9:15a Allender
193  * 
194  * 209   4/28/98 8:07a Jasen
195  * JAS: Stubbed in cdrom_path
196  * 
197  * 208   4/27/98 10:17p Allender
198  * 
199  * 207   4/27/98 8:56p Jim
200  * stub for modifcation of scoring_eval_hit
201  * 
202  * 206   4/26/98 12:42p Sandeep
203  * stubbed send_turret_fired_packet.  Stop breaking fred! :)
204  * 
205  * 205   4/25/98 1:57p Mike
206  * Oops, someone else had just stubbed out big_explosion_flash.
207  * 
208  * 204   4/25/98 1:56p Mike
209  * Stub out big_explosion_flash().
210  * 
211  * 203   4/25/98 1:20p Jim
212  * stub for big_explosion_flash
213  * 
214  * 202   4/20/98 8:54a Mike
215  * Stub opposing_team_mask().
216  * 
217  * 201   4/13/98 9:53p Hoffoss
218  * 
219  * 200   4/13/98 2:48p Allender
220  * countermeasure sucess packet
221  * 
222  * 199   4/12/98 12:15p Jim
223  * Stub out Subspace_effect
224  * 
225  * 198   4/10/98 12:16p Allender
226  * fix ship hit kill and debris packets
227  * 
228  * 197   4/10/98 9:15a Allender
229  * 
230  * 196   4/09/98 8:42p Sandeep
231  * 
232  * 195   4/09/98 12:46a Sandeep
233  * 
234  * 194   4/08/98 8:37a Mike
235  * Stub out hud_find_target_distance().
236  * 
237  * 193   4/07/98 10:11p Lawrance
238  * stub out hud_communications_state
239  * 
240  * 192   4/07/98 2:52p Andsager
241  * stub out Energy_levels
242  * 
243  * 191   4/05/98 10:33a John
244  * Stubbed in a variable
245  * 
246  * 190   3/31/98 5:11p John
247  * Removed demo/save/restore.  Made NDEBUG defined compile.  Removed a
248  * bunch of debug stuff out of player file.  Made model code be able to
249  * unload models and malloc out only however many models are needed.
250  * 
251  * 189   3/30/98 10:26a Hoffoss
252  * 
253  * 188   3/26/98 6:41p Lawrance
254  * stub out bmap paging function
255  * 
256  * 187   3/19/98 10:26a Dave
257  * Put in several HUD_offset problems.
258  * 
259  * 186   3/17/98 10:27a Johnson
260  * AL: stub out some asteroid network calls
261  * 
262  * 185   3/14/98 4:57p Lawrance
263  * stub out some wingman status functions
264  * 
265  * 184   3/12/98 5:36p John
266  * Took out any unused shaders.  Made shader code take rgbc instead of
267  * matrix and vector since noone used it like a matrix and it would have
268  * been impossible to do in hardware.   Made Glide implement a basic
269  * shader for online help.  
270  * 
271  * 183   3/12/98 2:21p Johnson
272  * Fixed some Fred bugs related to jump nodes.
273  * 
274  * 182   3/11/98 10:22p Dave
275  * Laid groundwork for new observer HUD. Split up multi respawning into
276  * its own module.
277  * 
278  * 181   3/11/98 9:36p Allender
279  * 
280  * 180   3/11/98 12:25a Lawrance
281  * stub yet another HUD function.
282  * 
283  * 179   3/10/98 5:08p Allender
284  * fixed up multiplayer death messages (I hope).  changes in object update
285  * packets
286  * 
287  * 178   3/09/98 9:54p Hoffoss
288  * 
289  * 177   3/09/98 5:03p Lawrance
290  * stub hud function
291  * 
292  * 176   3/09/98 4:30p Allender
293  * multiplayer secondary weapon changes.  red-alert and cargo-known-delay
294  * sexpressions.  Add time cargo revealed to ship structure
295  * 
296  * 175   3/09/98 10:50a Hoffoss
297  * 
298  * 174   3/09/98 12:12a Lawrance
299  * Add support for Red Alert missions
300  * 
301  * 173   3/08/98 12:03p Allender
302  * changed how ship network signatures are handed out.  Done at mission
303  * load time.  Space reserved in wings for all waves/counts for their
304  * signatures.  Fixed some secondary firing issues
305  * 
306  * 172   3/06/98 5:10p Allender
307  * made time to: field in extended targetbox use support time to dock code
308  * for all docking shpis.  Only display for waypoints and docking (not
309  * undocking).  Small fixups to message menu -- not allowing depart when
310  * disabled.  Depart is now by default ignored for all non-small ships
311  * 
312  * 171   3/05/98 11:15p Hoffoss
313  * Changed non-game key checking to use game_check_key() instead of
314  * game_poll().
315  * 
316  * 170   3/04/98 5:04p Hoffoss
317  * stub out hud function
318  * 
319  * 169   3/03/98 1:21a Lawrance
320  * stub out some hud escort functions
321  * 
322  * 168   2/27/98 10:34a Johnson
323  * 
324  * 167   2/24/98 3:08p Allender
325  * 
326  * 166   2/23/98 5:07p Allender
327  * made net_signature in the object structure an unsigned short.  Created
328  * permanent and non-permanent network object "pools".
329  * 
330  * 165   2/19/98 7:06p Sandeep
331  * 
332  * 164   2/18/98 10:34p Allender
333  * repair/rearm system (for single and multi) about finished.
334  * dock/undock and ai goals packets implemented for multiplayer
335  * 
336  * 163   2/17/98 5:03p Allender
337  * major cdhanges to rearm repair code.  All flag and variable setting
338  * done in one function.  A little more work to do.  Fix bug in squad
339  * messaging when hotkey was used on invalid target
340  * 
341  * 162   2/17/98 8:58a Mike
342  * Resolve link errors with stubs in FredStubs.
343  * 
344  * 161   2/12/98 5:12p Lawrance
345  * stub out hud function
346  * 
347  * 160   2/11/98 9:44p Allender
348  * rearm repair code fixes.  hud support view shows abort status.  New
349  * support ship killed message.  More network stats
350  * 
351  * 159   2/11/98 5:47p Dave
352  * multiplayer packet function stub
353  * 
354  * 158   2/10/98 9:55a Lawrance
355  * stub out cmeasure function
356  * 
357  * 157   1/29/98 5:22p Dave
358  * Made ingame join ignore bad packets more gracefully.
359  * 
360  * 156   1/29/98 9:00a Allender
361  * yet more stubs
362  * 
363  * 155   1/28/98 7:31p Lawrance
364  * stub out some more hud stuff
365  * 
366  * 154   1/24/98 4:00p Lawrance
367  * stub out some new hud functions
368  * 
369  * 153   1/22/98 11:46p Hoffoss
370  * Fixed linking problem with Fred.
371  * 
372  * 152   1/20/98 4:45p Allender
373  * more,  uh..., umm...., more stubs -- yeah, that's it
374  * 
375  * 151   1/20/98 11:43a Sandeep
376  * fixed unresolved external
377  * 
378  * 150   1/17/98 12:35a Sandeep
379  * fixed fred stub build error
380  * 
381  * 149   1/16/98 10:40a Lawrance
382  * stub out hud function
383  * 
384  * 148   1/14/98 5:22p Allender
385  * save/restore hotkey selections when replaying the same mission
386  * 
387  * 147   1/13/98 5:37p Dave
388  * Reworked a lot of standalone interface code. Put in single and
389  * multiplayer popups for death sequence. Solidified multiplayer kick
390  * code.
391  * 
392  * 146   1/12/98 9:29p Mike
393  * Stub out send_mission_goal_info_packet().
394  * 
395  * 145   1/10/98 1:22a Lawrance
396  * fix link error in FRED
397  * 
398  * 144   1/07/98 4:40p Allender
399  * minor modification to special messages.  Fixed cargo_revealed problem
400  * for multiplayer and problem with is-cargo-known sexpression
401  * 
402  * 143   1/05/98 10:06p Lawrance
403  * stub out some HUD functions
404  * 
405  * 142   1/02/98 10:20p Lawrance
406  * stub out hud_set_default_color()
407  * 
408  * 141   1/02/98 9:12p Lawrance
409  * remove some obsolete stubs
410  * 
411  * 140   12/24/97 9:57p Lawrance
412  * remove stub
413  * 
414  * 139   12/24/97 3:37p Hoffoss
415  * Moved control config stuff to seperate library to Fred can access it as
416  * well.
417  * 
418  * 138   12/19/97 2:01p Johnson
419  * added stubs for game_flash
420  * 
421  * 137   12/19/97 11:56a John
422  * Added texturing to missilie trails.  Took out Alan's old sphere
423  * debugging code.  Added palette flash effect code.
424  * 
425  * 136   12/19/97 11:21a Hoffoss
426  * 
427  * 135   12/18/97 8:46p Lawrance
428  * Move IFF_color definitions from HUD->ship, so FRED can use them.
429  * 
430  * 134   12/16/97 9:32p Lawrance
431  * stub out demo_query_debug()
432  * 
433  * 133   12/16/97 6:20p Hoffoss
434  * Added more debugging code for demos, and fixed a bug in demo
435  * recording/playback.
436  *
437  * $NoKeywords: $
438  */
439
440 #include "pstypes.h"
441 #include "object.h"
442 #include "key.h"
443 #include "ship.h"
444 #include "2d.h"
445 #include "missionparse.h"
446 #include "psnet.h"
447 #include "scoring.h"
448
449 float flFrametime;
450 int     game_zbuffer = 1;
451 int     Current_mission = 0xdeadbeef;
452 char **Builtin_mission_names;
453 char *Game_current_mission_filename;
454 CFILE *Working_demo;
455 struct beam_info;
456
457 int Sun_drew = 0;
458
459 void init_ets(struct object*){}
460
461 control_info PlayerControls;
462
463 char *  Game_CDROM_dir = NULL;
464
465 void game_flash(float r, float g, float b )
466 {
467 }
468
469 void freespace_menu_background()
470 {
471         gr_reset_clip();
472         gr_clear();
473 }
474
475 int My_observer_num;
476
477 void std_update_goals()
478 {
479 }
480
481 void os_close()
482 {
483 }
484
485 int gameseq_get_state(void)
486 {
487         return 0;
488 }
489
490 int game_check_key()
491 {
492         return key_inkey();
493 }
494
495 int game_poll()
496 {
497         return key_inkey();
498 }
499
500 void multi_delete_ship(object *obj)
501 {
502 }
503
504 void send_homing_fired_packet()
505 {
506 }
507
508 void game_flush()
509 {
510 }
511
512 typedef struct config_struct
513 {
514         int     boob;
515 } config_struct;
516
517 config_struct default_config;
518
519 typedef struct netgame_info
520 {
521         int bubba;
522 } netgame_info;
523
524 void send_netgame_state_packet()
525 {
526 }
527
528 void send_update_state_packet()
529 {
530 }
531
532 void send_goal_status_packet()
533 {
534 }
535
536 int Show_area_effect;
537
538 void state_set_mem(unsigned char *c, int i) {}
539 int state_check_mem(unsigned char *c, int i) { return 0; }
540
541 void demo_do_flag_dead(int i) {}
542 void demo_checkpoint() {}
543 void demo_set_playback_filter() {}
544
545 void multi_end_sequence()
546 {
547 }
548 void multi_server_respawn() {}
549
550 void multi_build_respawn_points() {}
551
552 void store_p_object( p_object *pbojp, CFILE *fp ) {}
553 void restore_p_object( p_object *pobjp, CFILE *dp) {}
554
555 int Multi_squad_msg_targ;
556 int Multi_squad_msg_local;
557 void send_support_warpin_packet(int,int,int){}
558 void send_support_warpin_packet( int net_sig, int how ) {}
559
560 int demo_query_debug(int id) { return 0; };
561
562 void send_support_warpin_packet(int){}
563 void game_whack_apply(float x, float y) {}
564
565 void save_restore_vector(vector *vec, CFILE *fp, int version, vector *deflt) {}
566 void save_restore_matrix(matrix *mat, CFILE *fp, int version, matrix *deflt) {}
567 void save_restore_float(float *fl, CFILE *fp, int version, float deflt) {}
568 void save_restore_angles(angles *ang, CFILE *fp, int version, angles *deflt) {}
569 void save_restore_int(int *n, CFILE *fp, int version, int deflt) {}
570 void save_restore_uint(uint *n, CFILE *fp, int version, uint deflt) {}
571 void save_restore_short(short *n, CFILE *fp, int version, short deflt) {}
572 void save_restore_ushort(ushort *n, CFILE *fp, int version, ushort deflt) {}
573 void save_restore_ubyte(ubyte *n, CFILE *fp, int version, ubyte deflt) {}
574 void save_restore_fix(fix *n, CFILE *fp, int version, fix deflt) {}
575 void save_restore_string(char *str, CFILE *fp, int len, int version, char *deflt) {}
576 char *restore_string_alloc(CFILE *fp, int version, char *deflt) { return NULL; }
577
578 void save_restore_p_object(p_object *pobj, CFILE *fp) {}
579
580 void demo_write_char(char x) {}
581 char demo_read_char() { return 0; }
582
583 int     red_alert_default_status() {return 0;}
584
585 void send_ship_kill_packet(struct object *,struct object *,float,unsigned char) {}
586 void send_debris_create_packet( object *objp, ushort net_sig, int model_num, vector pos) {}
587
588 int Game_subspace_effect;
589 void big_explosion_flash(float x) {};
590
591 int game_do_cd_check(char *) {return 0;}
592
593 void game_stop_looped_sounds() {}
594
595 int Game_skill_level;
596 int game_cd_changed(void) {return 0;}
597
598 int Interface_framerate;
599 void game_set_view_clip(){}
600 float Viewer_zoom;
601 int Pofview_running = 0;
602
603 int Warpout_forced = 0;
604 float Warpout_time;
605 vector Camera_pos;
606 vector Dead_player_last_vel;
607 int game_start_mission(){return 0;}
608 int Game_weapons_tbl_valid;
609 int Game_ships_tbl_valid;
610 void game_level_close(){}
611 void game_enter_state(int, int){}
612 void game_leave_state(int, int){}
613 int Test_begin;
614 int Debug_octant;
615 int Framerate_delay;
616 void game_start_time(){}
617 void game_stop_time(){}
618 int game_get_default_skill_level(){return 0;}
619 void game_load_palette(){}
620 float Freespace_gamma;
621 int set_cdrom_path(int){return 0;}
622 int find_freespace_cd(char*){return 0;}
623 void get_version_string(){}
624 void game_do_state_common(int, int){}
625 void game_set_frametime(int){}
626 void game_increase_skill_level(){}
627 void get_version_string(char*){}
628 int Show_target_weapons;
629 int Show_target_debug_info;
630 int Game_do_state_should_skip;
631 long Game_time_compression;
632 struct fs_builtin_mission *game_find_builtin_mission(char*){return NULL;}
633 void game_format_time(long, char*){}
634 void game_do_state(int){}
635 void game_process_event(int, int){}
636 void game_shudder_apply(int, float){}
637 int game_hacked_data(){return 0;}
638 int game_single_step;
639 int last_single_step;
640 void get_version_string_short(char *){}
641 void game_tst_mark(struct object *, struct ship *){}
642 int tst;
643 int game_do_cd_mission_check(char *){return 1;}
644 int Player_multi_died_check;
645
646 void game_feature_not_in_demo_popup() {}
647 int Nebedit_running = 0;