Tramway SDK
soundtable.h
Go to the documentation of this file.
1// Tramway Drifting and Dungeon Exploration Simulator SDK Runtime
2
3#ifndef TRAM_SDK_EXTENSIONS_KITCHENSINK_SOUNDTABLE_H
4#define TRAM_SDK_EXTENSIONS_KITCHENSINK_SOUNDTABLE_H
5
6#include <vector>
7#include <framework/uid.h>
8#include <framework/math.h>
9
10namespace tram::Ext::Kitchensink {
11
18
22};
23
25public:
26 void AddSound(SoundAction type, name_t sound);
28 void PlaySound(SoundAction type);
29 void PlaySound(SoundAction type, vec3 position, float volume);
30
31 static SoundTable* Find(name_t name);
32private:
33 std::vector<std::pair<SoundAction, name_t>> sounds;
34};
35
36}
37
38#endif // TRAM_SDK_EXTENSIONS_KITCHENSINK_SOUNDTABLE_H
Maps actions to sounds.
Definition: soundtable.h:24
void PlaySound(SoundAction type)
Definition: soundtable.cpp:53
void AddSound(SoundAction type, name_t sound)
Definition: soundtable.cpp:37
name_t GetSound(SoundAction type)
Definition: soundtable.cpp:41
static SoundTable * Find(name_t name)
Definition: soundtable.cpp:63
Extension containing random stuff that doesn't fit in anywhere else.
Definition: ai.cpp:15
SoundAction
Definition: soundtable.h:12
@ SOUND_CLOSE
Definition: soundtable.h:14
@ SOUND_OPEN
Definition: soundtable.h:13
@ SOUND_END_CLOSE
Definition: soundtable.h:17
@ SOUND_END_OPEN
Definition: soundtable.h:16
@ SOUND_WALK_ON
Definition: soundtable.h:19
@ SOUND_JUMP_ON
Definition: soundtable.h:20
@ SOUND_HIT
Definition: soundtable.h:21
@ SOUND_LOCKED
Definition: soundtable.h:15
glm::vec3 vec3
Definition: math.h:11
Interned string type.
Definition: uid.h:10