]> icculus.org git repositories - taylor/freespace2.git/blob - include/objectsnd.h
rendering functions mostly done; more complete shader setup
[taylor/freespace2.git] / include / objectsnd.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/Object/ObjectSnd.h $
11  * $Revision$
12  * $Date$
13  * $Author$
14  *
15  * Header file for managing object-linked persistant sounds
16  *
17  * $Log$
18  * Revision 1.2  2002/06/09 04:41:14  relnev
19  * added copyright header
20  *
21  * Revision 1.1.1.1  2002/05/03 03:28:12  root
22  * Initial import.
23  *
24  * 
25  * 4     7/01/99 4:23p Dave
26  * Full support for multiple linked ambient engine sounds. Added "big
27  * damage" flag.
28  * 
29  * 3     7/01/99 11:44a Dave
30  * Updated object sound system to allow multiple obj sounds per ship.
31  * Added hit-by-beam sound. Added killed by beam sound.
32  * 
33  * 2     10/07/98 10:53a Dave
34  * Initial checkin.
35  * 
36  * 1     10/07/98 10:50a Dave
37  * 
38  * 11    3/17/98 5:55p Lawrance
39  * Support object-linked sounds for asteroids.
40  * 
41  * 10    9/03/97 5:02p Lawrance
42  * add engine stuttering when a ship is dying
43  * 
44  * 9     7/14/97 12:04a Lawrance
45  * make Obj_snd_enabled visible
46  * 
47  * 8     6/09/97 11:50p Lawrance
48  * integrating DirectSound3D
49  * 
50  * 7     6/06/97 4:13p Lawrance
51  * use an index instead of a pointer for object-linked sounds
52  * 
53  * 6     6/05/97 1:07a Lawrance
54  * changes to support sound interface
55  * 
56  * 5     6/02/97 1:50p Lawrance
57  * supporting integration with Direct3D
58  * 
59  * 4     5/09/97 4:33p Lawrance
60  * doppler effects
61  * 
62  * 3     5/09/97 9:41a Lawrance
63  * added #ifndef to avoid multiple inclusions
64  * 
65  * 2     5/08/97 4:30p Lawrance
66  * split off object sound stuff into separate file
67  *
68  * $NoKeywords: $
69  */
70
71 #ifndef __OBJECTSND_H__
72 #define __OBJECTSND_H__
73
74 #define OS_USED (1<<0)
75 #define OS_DS3D (1<<1)
76 #define  OS_MAIN        (1<<2)          // "main" sound. attentuation does not apply until outside the radius of the object
77
78 extern int Obj_snd_enabled;
79
80 void    obj_snd_level_init();
81 void    obj_snd_level_close();
82 void    obj_snd_do_frame();
83
84 // pos is the position of the sound source in the object's frame of reference.
85 // so, if the objp->pos was at the origin, the pos passed here would be the exact
86 // model coords of the location of the engine
87 // by passing vmd_zero_vector here, you get a sound centered directly on the object
88 // NOTE : if main is true, the attentuation factors don't apply if you're within the radius of the object
89 int     obj_snd_assign(int objnum, int sndnum, vector *pos, int main);
90
91 // if sndnum is not -1, deletes all instances of the given sound within the object
92 void    obj_snd_delete(int objnum, int sndnum = -1);
93
94 void    obj_snd_delete_all();
95 void    obj_snd_stop_all();
96 int     obj_snd_is_playing(int index);
97 int     obj_snd_return_instance(int index);
98
99 #endif
100