summaryrefslogtreecommitdiffstats
path: root/game/client/sound/sound.hh
diff options
context:
space:
mode:
Diffstat (limited to 'game/client/sound/sound.hh')
-rw-r--r--game/client/sound/sound.hh47
1 files changed, 47 insertions, 0 deletions
diff --git a/game/client/sound/sound.hh b/game/client/sound/sound.hh
new file mode 100644
index 0000000..5eb3ed7
--- /dev/null
+++ b/game/client/sound/sound.hh
@@ -0,0 +1,47 @@
+#ifndef CLIENT_SOUND_HH
+#define CLIENT_SOUND_HH 1
+#pragma once
+
+#include "core/resource/resource.hh"
+
+namespace config
+{
+class Float;
+} // namespace config
+
+struct SoundEffect;
+
+namespace sound
+{
+extern config::Float volume_master;
+extern config::Float volume_effects;
+extern config::Float volume_music;
+extern config::Float volume_ui;
+} // namespace sound
+
+namespace sound
+{
+void init_config(void);
+void init(void);
+void init_late(void);
+void shutdown(void);
+void update(void);
+} // namespace sound
+
+namespace sound
+{
+void play_generic(const char* sound, bool looping, float pitch);
+void play_entity(entt::entity entity, const char* sound, bool looping, float pitch);
+void play_player(const char* sound, bool looping, float pitch);
+void play_ui(const char* sound, bool looping, float pitch);
+} // namespace sound
+
+namespace sound
+{
+void play_generic(resource_ptr<SoundEffect> sound, bool looping, float pitch);
+void play_entity(entt::entity entity, resource_ptr<SoundEffect> sound, bool looping, float pitch);
+void play_player(resource_ptr<SoundEffect> sound, bool looping, float pitch);
+void play_ui(resource_ptr<SoundEffect> sound, bool looping, float pitch);
+} // namespace sound
+
+#endif // CLIENT_SOUND_HH