diff options
| author | untodesu <kirill@untode.su> | 2025-03-15 16:22:09 +0500 |
|---|---|---|
| committer | untodesu <kirill@untode.su> | 2025-03-15 16:22:09 +0500 |
| commit | 3bf42c6ff3805a0d42bbc661794a95ff31bedc26 (patch) | |
| tree | 05049955847504808d6bed2bb7b155f8b03807bb /game/client/sound.hh | |
| parent | 02294547dcde0d4ad76e229106702261e9f10a51 (diff) | |
| download | voxelius-3bf42c6ff3805a0d42bbc661794a95ff31bedc26.tar.bz2 voxelius-3bf42c6ff3805a0d42bbc661794a95ff31bedc26.zip | |
Add whatever I was working on for the last month
Diffstat (limited to 'game/client/sound.hh')
| -rw-r--r-- | game/client/sound.hh | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/game/client/sound.hh b/game/client/sound.hh new file mode 100644 index 0000000..680c296 --- /dev/null +++ b/game/client/sound.hh @@ -0,0 +1,42 @@ +#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(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<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 */ |
