]> icculus.org git repositories - taylor/freespace2.git/blob - include/flak.h
Initial revision
[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.1  2002/05/03 03:28:12  root
11  * Initial revision
12  * 
13  * 
14  * 6     7/31/99 2:57p Dave
15  * Scaled flak aim and jitter by weapon subsystem strength.
16  * 
17  * 5     5/24/99 5:45p Dave
18  * Added detail levels to the nebula, with a decent speedup. Split nebula
19  * lightning into its own section.
20  * 
21  * $NoKeywords: $
22  */
23
24 #ifndef _FLAK_WEAPONS_HEADER_FILE
25 #define _FLAK_WEAPONS_HEADER_FILE
26
27 // --------------------------------------------------------------------------------------------------------------------------------------
28 // FLAK DEFINES/VARS
29 //
30
31 struct weapon;
32 struct object;
33
34
35 // --------------------------------------------------------------------------------------------------------------------------------------
36 // FLAK FUNCTIONS
37 //
38
39 // initialize flak stuff for the level
40 void flak_level_init();
41
42 // close down flak stuff
43 void flak_level_close();
44
45 // given a newly created weapon, turn it into a flak weapon
46 void flak_create(weapon *wp);
47
48 // free up a flak object
49 void flak_delete(int flak_index);
50
51 // given a just fired flak shell, pick a detonating distance for it
52 void flak_pick_range(object *objp, vector *predicted_target_pos, float weapon_subsys_strength);
53
54 // add some jitter to a flak gun's aiming direction, take into account range to target so that we're never _too_ far off
55 // assumes dir is normalized
56 void flak_jitter_aim(vector *dir, float dist_to_target, float weapon_subsys_strength);
57
58 // create a muzzle flash from a flak gun based upon firing position and weapon type
59 void flak_muzzle_flash(vector *pos, vector *dir, int turret_weapon_class);
60
61 // maybe detonate a flak shell early/late (call from weapon_process_pre(...))
62 void flak_maybe_detonate(object *obj);
63
64 // set the range on a flak object
65 void flak_set_range(object *objp, vector *start_pos, float range);
66
67 // get the current range for the flak object
68 float flak_get_range(object *objp);
69
70 #endif
71