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