]> icculus.org git repositories - taylor/freespace2.git/blob - include/flak.h
Most of network/ works
[taylor/freespace2.git] / include / flak.h
1 /*
2  * $Logfile: /Freespace2/code/Weapon/Flak.h $
3  * $Revision$
4  * $Date$
5  * $Author$
6  *
7  * flak functions
8  *
9  * $Log$
10  * Revision 1.3  2002/05/26 20:22:48  theoddone33
11  * Most of network/ works
12  *
13  * Revision 1.2  2002/05/04 04:36:56  theoddone33
14  * More changes, took out a lot of the sound stuff which will bite later but
15  * I don't care.
16  *
17  * Revision 1.1.1.1  2002/05/03 03:28:12  root
18  * Initial import.
19  * 
20  * 
21  * 6     7/31/99 2:57p Dave
22  * Scaled flak aim and jitter by weapon subsystem strength.
23  * 
24  * 5     5/24/99 5:45p Dave
25  * Added detail levels to the nebula, with a decent speedup. Split nebula
26  * lightning into its own section.
27  * 
28  * $NoKeywords: $
29  */
30
31 #ifndef _FLAK_WEAPONS_HEADER_FILE
32 #define _FLAK_WEAPONS_HEADER_FILE
33
34 // --------------------------------------------------------------------------------------------------------------------------------------
35 // FLAK DEFINES/VARS
36 //
37 #include "pstypes.h"
38
39 struct weapon;
40 struct object;
41
42
43 // --------------------------------------------------------------------------------------------------------------------------------------
44 // FLAK FUNCTIONS
45 //
46
47 // initialize flak stuff for the level
48 void flak_level_init();
49
50 // close down flak stuff
51 void flak_level_close();
52
53 // given a newly created weapon, turn it into a flak weapon
54 void flak_create(weapon *wp);
55
56 // free up a flak object
57 void flak_delete(int flak_index);
58
59 // given a just fired flak shell, pick a detonating distance for it
60 void flak_pick_range(object *objp, vector *predicted_target_pos, float weapon_subsys_strength);
61
62 // add some jitter to a flak gun's aiming direction, take into account range to target so that we're never _too_ far off
63 // assumes dir is normalized
64 void flak_jitter_aim(vector *dir, float dist_to_target, float weapon_subsys_strength);
65
66 // create a muzzle flash from a flak gun based upon firing position and weapon type
67 void flak_muzzle_flash(vector *pos, vector *dir, int turret_weapon_class);
68
69 // maybe detonate a flak shell early/late (call from weapon_process_pre(...))
70 void flak_maybe_detonate(object *obj);
71
72 // set the range on a flak object
73 void flak_set_range(object *objp, vector *start_pos, float range);
74
75 // get the current range for the flak object
76 float flak_get_range(object *objp);
77
78 #endif
79