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