2 * $Logfile: /Freespace2/code/Weapon/Trails.h $
7 * External defs for missile trail stuff
10 * Revision 1.1 2002/05/03 03:28:12 root
14 * 3 11/14/98 5:33p Dave
15 * Lots of nebula work. Put in ship contrails.
17 * 2 10/07/98 10:54a Dave
20 * 1 10/07/98 10:51a Dave
22 * 3 3/23/98 5:00p John
23 * Improved missile trails. Made smooth alpha under hardware. Made end
24 * taper. Made trail touch weapon.
26 * 2 12/21/97 6:15p John
27 * Made a seperate system for missile trails
29 * 1 12/21/97 5:30p John
40 #define NUM_TRAIL_SECTIONS 16
42 // contrail info - similar to that for missile trails
43 // place this inside of info structures instead of explicit structs (eg. ship_info instead of ship, or weapon_info instead of weapon)
44 typedef struct trail_info {
45 vector pt; // offset from the object's center
46 float w_start; // starting width
47 float w_end; // ending width
48 float a_start; // starting alpha
49 float a_end; // ending alpha
50 float max_life; // max_life for a section
51 int stamp; // spew timestamp
52 int bitmap; // bitmap to use
55 // Call at start of level to reinit all missilie trail stuff
56 void trail_level_init();
58 // Needs to be called from somewhere to move the trails each frame
59 void trail_move_all(float frametime);
61 // Needs to be called from somewhere to render the trails each frame
62 void trail_render_all();
64 // The following functions are what the weapon code calls
65 // to deal with trails:
67 // Returns -1 if failed
68 int trail_create(trail_info info);
69 void trail_add_segment( int trail_num, vector *pos );
70 void trail_set_segment( int trail_num, vector *pos );
71 void trail_object_died( int trail_num );
72 int trail_stamp_elapsed( int trail_num );
73 void trail_set_stamp( int trail_num );