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
37class
39{
40public:
41 void ncSoundDict(void);
42
43 nonvirtual float AttenuationValue(void);
44 nonvirtual void Play(void);
45 nonvirtual void PlayOnEntity(entity);
46 nonvirtual void PlayOnEntityChannel(entity, int);
47 nonvirtual void PlayOnSpot(vector);
48
49 nonvirtual ncSoundDict SoundForName(string soundDef);
50 nonvirtual ncSoundDict SoundForID(int soundID);
51 nonvirtual int ID(void);
52
53#ifdef CLIENT
54 nonvirtual void UpdateChannelVolumeOnEntity(entity, int, float);
55#endif
56
57private:
58 float dist_min;
59 float dist_max;
60 float offset;
61 float pitch_min;
62 float pitch_max;
63 float shakes;
64 float volume;
65 soundFlag_t flags;
66 int playc;
67 int sample_count;
68 string samples;
69 string name;
70 string distshader;
71 float pointparticle;
72 string musictracks;
73 int music_count;
74};
75
This class is responsible for handling groups of key/value pairs.
Definition: Dict.h:35
Dictionary for sound effect definition.
Definition: SoundDict.h:39
typedef enumflags
Defines the valid alignment flags for text fields.
Definition: font.h:37
float flags
Definition: soundDef.h:114