FS2_Open
Open source remastering of the Freespace 2 engine
flak.h
Go to the documentation of this file.
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 the
6  * source.
7  *
8 */
9 
10 
11 
12 #ifndef _FLAK_WEAPONS_HEADER_FILE
13 #define _FLAK_WEAPONS_HEADER_FILE
14 
15 #include "physics/physics.h"
16 #include "weapon/weapon.h"
17 
18 // --------------------------------------------------------------------------------------------------------------------------------------
19 // FLAK DEFINES/VARS
20 //
21 
22 struct weapon;
23 class object;
24 struct vec3d;
25 
26 // --------------------------------------------------------------------------------------------------------------------------------------
27 // FLAK FUNCTIONS
28 //
29 
30 // initialize flak stuff for the level
31 void flak_level_init();
32 
33 // close down flak stuff
34 void flak_level_close();
35 
36 // given a just fired flak shell, pick a detonating distance for it
37 void flak_pick_range(object *objp, vec3d *firing_pos, vec3d *predicted_target_pos, float weapon_subsys_strength);
38 
39 // add some jitter to a flak gun's aiming direction, take into account range to target so that we're never _too_ far off
40 // assumes dir is normalized
41 void flak_jitter_aim(vec3d *dir, float dist_to_target, float weapon_subsys_strength, weapon_info* wip);
42 
43 // create a muzzle flash from a flak gun based upon firing position and weapon type
44 void flak_muzzle_flash(vec3d *pos, vec3d *dir, physics_info *pip, int turret_weapon_class);
45 
46 // set the range on a flak object
47 void flak_set_range(object *objp, float range);
48 
49 // get the current range for the flak object
50 float flak_get_range(object *objp);
51 
52 #endif
float flak_get_range(object *objp)
Definition: flak.cpp:154
Definition: weapon.h:163
Definition: pstypes.h:88
object * objp
Definition: lua.cpp:3105
GLenum GLint * range
Definition: Glext.h:7096
void flak_level_init()
Definition: flak.cpp:23
Definition: object.h:141
void flak_jitter_aim(vec3d *dir, float dist_to_target, float weapon_subsys_strength, weapon_info *wip)
Definition: flak.cpp:86
void flak_set_range(object *objp, float range)
Definition: flak.cpp:142
hull_check pos
Definition: lua.cpp:5050
void flak_muzzle_flash(vec3d *pos, vec3d *dir, physics_info *pip, int turret_weapon_class)
Definition: flak.cpp:120
void flak_level_close()
Definition: flak.cpp:30
void flak_pick_range(object *objp, vec3d *firing_pos, vec3d *predicted_target_pos, float weapon_subsys_strength)
Definition: flak.cpp:37