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