From 6cd00aacfa22fed6a54a9b812f6b069ad16feec0 Mon Sep 17 00:00:00 2001 From: untodesu Date: Sun, 29 Jun 2025 22:24:42 +0500 Subject: Move game sources into src subdirectory --- src/game/client/sound.hh | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 src/game/client/sound.hh (limited to 'src/game/client/sound.hh') diff --git a/src/game/client/sound.hh b/src/game/client/sound.hh new file mode 100644 index 0000000..2701ae0 --- /dev/null +++ b/src/game/client/sound.hh @@ -0,0 +1,43 @@ +#ifndef CLIENT_SOUND_HH +#define CLIENT_SOUND_HH 1 +#pragma once + +#include "core/resource.hh" + +class ConfigFloat; +struct SoundEffect; + +namespace sound +{ +extern ConfigFloat volume_master; +extern ConfigFloat volume_effects; +extern ConfigFloat volume_music; +extern ConfigFloat volume_ui; +} // namespace sound + +namespace sound +{ +void init_config(void); +void init(void); +void init_late(void); +void deinit(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 sound, bool looping, float pitch); +void play_entity(entt::entity entity, resource_ptr sound, bool looping, float pitch); +void play_player(resource_ptr sound, bool looping, float pitch); +void play_ui(resource_ptr sound, bool looping, float pitch); +} // namespace sound + +#endif /* CLIENT_SOUND_HH */ -- cgit