Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/WolfireGames/overgrowth.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Online/Message/audio_play_sound_group_message.cpp')
-rw-r--r--Source/Online/Message/audio_play_sound_group_message.cpp64
1 files changed, 32 insertions, 32 deletions
diff --git a/Source/Online/Message/audio_play_sound_group_message.cpp b/Source/Online/Message/audio_play_sound_group_message.cpp
index 1dcef587..0875440e 100644
--- a/Source/Online/Message/audio_play_sound_group_message.cpp
+++ b/Source/Online/Message/audio_play_sound_group_message.cpp
@@ -1,7 +1,7 @@
//-----------------------------------------------------------------------------
// Name: audio_play_sound_group_message.cpp
// Developer: Wolfire Games LLC
-// Description:
+// Description:
// License: Read below
//-----------------------------------------------------------------------------
//
@@ -26,44 +26,44 @@
#include <Utility/binn_util.h>
namespace OnlineMessages {
- AudioPlaySoundGroupMessage::AudioPlaySoundGroupMessage(const std::string& path, vec3 pos) :
- OnlineMessageBase(OnlineMessageCategory::LEVEL_TRANSIENT),
- path(path), pos(pos) {
- }
+AudioPlaySoundGroupMessage::AudioPlaySoundGroupMessage(const std::string& path, vec3 pos) : OnlineMessageBase(OnlineMessageCategory::LEVEL_TRANSIENT),
+ path(path),
+ pos(pos) {
+}
- binn* AudioPlaySoundGroupMessage::Serialize(void* object) {
- AudioPlaySoundGroupMessage* t = static_cast<AudioPlaySoundGroupMessage*>(object);
- binn* l = binn_object();
+binn* AudioPlaySoundGroupMessage::Serialize(void* object) {
+ AudioPlaySoundGroupMessage* t = static_cast<AudioPlaySoundGroupMessage*>(object);
+ binn* l = binn_object();
- binn_object_set_std_string(l, "path", t->path);
- binn_object_set_vec3(l, "pos", t->pos);
+ binn_object_set_std_string(l, "path", t->path);
+ binn_object_set_vec3(l, "pos", t->pos);
- return l;
- }
+ return l;
+}
- void AudioPlaySoundGroupMessage::Deserialize(void* object, binn* l) {
- AudioPlaySoundGroupMessage* t = static_cast<AudioPlaySoundGroupMessage*>(object);
+void AudioPlaySoundGroupMessage::Deserialize(void* object, binn* l) {
+ AudioPlaySoundGroupMessage* t = static_cast<AudioPlaySoundGroupMessage*>(object);
- binn_object_get_std_string(l, "path", &t->path);
- binn_object_get_vec3(l, "pos", &t->pos);
- }
+ binn_object_get_std_string(l, "path", &t->path);
+ binn_object_get_vec3(l, "pos", &t->pos);
+}
- void AudioPlaySoundGroupMessage::Execute(const OnlineMessageRef& ref, void* object, PeerID from) {
- AudioPlaySoundGroupMessage* t = static_cast<AudioPlaySoundGroupMessage*>(object);
+void AudioPlaySoundGroupMessage::Execute(const OnlineMessageRef& ref, void* object, PeerID from) {
+ AudioPlaySoundGroupMessage* t = static_cast<AudioPlaySoundGroupMessage*>(object);
- int handle = Engine::Instance()->GetSound()->CreateHandle(__FUNCTION__);
- //SoundGroupRef sgr = SoundGroups::Instance()->ReturnRef(path);
- SoundGroupRef sgr = Engine::Instance()->GetAssetManager()->LoadSync<SoundGroup>(t->path);
- SoundGroupPlayInfo sgpi(*sgr, t->pos);
- Engine::Instance()->GetSound()->PlayGroup(handle, sgpi);
- }
+ int handle = Engine::Instance()->GetSound()->CreateHandle(__FUNCTION__);
+ // SoundGroupRef sgr = SoundGroups::Instance()->ReturnRef(path);
+ SoundGroupRef sgr = Engine::Instance()->GetAssetManager()->LoadSync<SoundGroup>(t->path);
+ SoundGroupPlayInfo sgpi(*sgr, t->pos);
+ Engine::Instance()->GetSound()->PlayGroup(handle, sgpi);
+}
- void* AudioPlaySoundGroupMessage::Construct(void *mem) {
- return new(mem) AudioPlaySoundGroupMessage("", vec3());
- }
+void* AudioPlaySoundGroupMessage::Construct(void* mem) {
+ return new (mem) AudioPlaySoundGroupMessage("", vec3());
+}
- void AudioPlaySoundGroupMessage::Destroy(void* object) {
- AudioPlaySoundGroupMessage* t = static_cast<AudioPlaySoundGroupMessage*>(object);
- t->~AudioPlaySoundGroupMessage();
- }
+void AudioPlaySoundGroupMessage::Destroy(void* object) {
+ AudioPlaySoundGroupMessage* t = static_cast<AudioPlaySoundGroupMessage*>(object);
+ t->~AudioPlaySoundGroupMessage();
}
+} // namespace OnlineMessages