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