Nuclide
Software Development Kit for id Technology (BETA)
SoundDict.h
1/*
2 * Copyright (c) 2025 Vera Visions LLC.
3 *
4 * Permission to use, copy, modify, and distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER
13 * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
14 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15*/
16
17var float autocvar_s_nominaldistance = 1000.0f;
18
20typedef enumflags
21{
22 SNDFL_LOOPING,
23 SNDFL_NODUPS,
24 SNDFL_GLOBAL,
25 SNDFL_NOREVERB,
26 SNDFL_OMNI,
27 SNDFL_PRIVATE,
28 SNDFL_STEP,
29 SNDFL_FOLLOW,
30 SNDFL_ALERTS
31} soundFlag_t;
32
38class
40{
41public:
42 void ncSoundDict(void);
43
44 nonvirtual float AttenuationValue(void);
45 nonvirtual void Play(void);
46 nonvirtual void PlayOnEntity(entity);
47 nonvirtual void PlayOnEntityChannel(entity, int);
48 nonvirtual void PlayOnSpot(vector);
49
50 nonvirtual ncSoundDict SoundForName(string soundDef);
51 nonvirtual ncSoundDict SoundForID(int soundID);
52 nonvirtual int ID(void);
53
54#ifdef CLIENT
55 nonvirtual void UpdateChannelVolumeOnEntity(entity, int, float);
56#endif
57
58private:
59 float dist_min;
60 float dist_max;
61 float offset;
62 float pitch_min;
63 float pitch_max;
64 float shakes;
65 float volume;
66 soundFlag_t flags;
67 int playc;
68 int sample_count;
69 string samples;
70 string name;
71 string distshader;
72 float pointparticle;
73 string musictracks;
74 int music_count;
75};
76
This class is responsible for handling groups of key/value pairs.
Definition: Dict.h:35
Dictionary for sound effect definition.
Definition: SoundDict.h:40
typedef enumflags
Defines the valid alignment flags for text fields.
Definition: font.h:37
float flags
Definition: soundDef.h:114