2 * Copyright (C) Volition, Inc. 1999. All rights reserved.
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
10 * $Logfile: /Freespace2/code/Weapon/Trails.h $
15 * External defs for missile trail stuff
18 * Revision 1.2 2002/06/09 04:41:15 relnev
19 * added copyright header
21 * Revision 1.1.1.1 2002/05/03 03:28:12 root
25 * 3 11/14/98 5:33p Dave
26 * Lots of nebula work. Put in ship contrails.
28 * 2 10/07/98 10:54a Dave
31 * 1 10/07/98 10:51a Dave
33 * 3 3/23/98 5:00p John
34 * Improved missile trails. Made smooth alpha under hardware. Made end
35 * taper. Made trail touch weapon.
37 * 2 12/21/97 6:15p John
38 * Made a seperate system for missile trails
40 * 1 12/21/97 5:30p John
51 #define NUM_TRAIL_SECTIONS 16
53 // contrail info - similar to that for missile trails
54 // place this inside of info structures instead of explicit structs (eg. ship_info instead of ship, or weapon_info instead of weapon)
55 typedef struct trail_info {
56 vector pt; // offset from the object's center
57 float w_start; // starting width
58 float w_end; // ending width
59 float a_start; // starting alpha
60 float a_end; // ending alpha
61 float max_life; // max_life for a section
62 int stamp; // spew timestamp
63 int bitmap; // bitmap to use
66 // Call at start of level to reinit all missilie trail stuff
67 void trail_level_init();
69 // Needs to be called from somewhere to move the trails each frame
70 void trail_move_all(float frametime);
72 // Needs to be called from somewhere to render the trails each frame
73 void trail_render_all();
75 // The following functions are what the weapon code calls
76 // to deal with trails:
78 // Returns -1 if failed
79 int trail_create(trail_info info);
80 void trail_add_segment( int trail_num, vector *pos );
81 void trail_set_segment( int trail_num, vector *pos );
82 void trail_object_died( int trail_num );
83 int trail_stamp_elapsed( int trail_num );
84 void trail_set_stamp( int trail_num );