Debian Codegraph @

prboom2/src/dsda/ambient.h

raw
1 //
2 // Copyright(C) 2023 by Ryan Krafnick
3 //
4 // This program is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU General Public License
6 // as published by the Free Software Foundation; either version 2
7 // of the License, or (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
13 //
14 // DESCRIPTION:
15 // DSDA Ambient
16 //
17
18 #ifndef __DSDA_AMBIENT__
19 #define __DSDA_AMBIENT__
20
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24
25 #include "p_mobj.h"
26
27 typedef struct {
28 char* sound_name;
29 int sfx_id;
30 float attenuation;
31 float volume;
32 int min_tics;
33 int max_tics;
34 } ambient_sfx_t;
35
36 typedef struct {
37 thinker_t thinker;
38 mobj_t* mobj;
39 ambient_sfx_t data;
40 int wait_tics;
41 } ambient_source_t;
42
43 dboolean dsda_IsLoopingAmbientSFX(int sfx_id);
44 void dsda_UpdateAmbientSource(ambient_source_t* source);
45 void dsda_SpawnAmbientSource(mobj_t* mobj);
46 void dsda_LoadAmbientSndInfo(void);
47
48 #ifdef __cplusplus
49 }
50 #endif
51
52 #endif