From f40d09cb8f712e87691af4912f3630d92d692779 Mon Sep 17 00:00:00 2001 From: untodesu Date: Thu, 11 Dec 2025 15:14:26 +0500 Subject: Shuffle stuff around - Use the new and improved hierarchy I figured out when making Prospero chat - Re-add NSIS scripts, again from Prospero - Update most build and utility scripts with their most recent versions --- src/game/client/sound/sound.hh | 43 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 src/game/client/sound/sound.hh (limited to 'src/game/client/sound/sound.hh') diff --git a/src/game/client/sound/sound.hh b/src/game/client/sound/sound.hh new file mode 100644 index 0000000..d96d0c4 --- /dev/null +++ b/src/game/client/sound/sound.hh @@ -0,0 +1,43 @@ +#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(std::string_view sound, bool looping, float pitch); +void play_entity(entt::entity entity, std::string_view sound, bool looping, float pitch); +void play_player(std::string_view sound, bool looping, float pitch); +void play_ui(std::string_view 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 -- cgit