OpenGothic
Open source reimplementation of Gothic I and II
Loading...
Searching...
No Matches
sound.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
world/worldsound.h
"
4
5
class
Sound
final {
6
public
:
7
enum
Type
: uint8_t {
8
T_Regular
,
9
T_3D
,
10
};
11
Sound
();
12
Sound
(
World
& owner,
Type
t, std::string_view s,
const
Tempest::Vec3& pos,
float
range,
bool
freeSlot);
13
14
Sound
(
Sound
&& other);
15
Sound
&
operator =
(
Sound
&& other);
16
~Sound
();
17
18
Tempest::Vec3
position
()
const
;
19
bool
isEmpty
()
const
;
20
bool
isFinished
()
const
;
21
22
void
setOcclusion
(
float
occ);
23
void
setVolume
(
float
v);
24
float
volume
()
const
;
25
26
void
setPosition
(
const
Tempest::Vec3& pos);
27
void
setPosition
(
float
x,
float
y,
float
z);
28
29
void
setLooping
(
bool
l);
30
void
setAmbient
(
bool
a);
31
void
setActive
(
bool
a);
32
void
play
();
33
34
uint64_t
effectPrefferedTime
()
const
;
35
36
private
:
37
Sound
(
const
std::shared_ptr<WorldSound::Effect>& val);
38
39
std::shared_ptr<WorldSound::Effect> val;
40
Tempest::Vec3 pos;
41
42
friend
class
WorldSound
;
43
};
44
Sound
Definition
sound.h:5
Sound::Type
Type
Definition
sound.h:7
Sound::T_3D
@ T_3D
Definition
sound.h:9
Sound::T_Regular
@ T_Regular
Definition
sound.h:8
Sound::~Sound
~Sound()
Definition
sound.cpp:64
Sound::position
Tempest::Vec3 position() const
Definition
sound.cpp:71
Sound::setVolume
void setVolume(float v)
Definition
sound.cpp:88
Sound::Sound
Sound()
Definition
sound.cpp:7
Sound::operator=
Sound & operator=(Sound &&other)
Definition
sound.cpp:59
Sound::effectPrefferedTime
uint64_t effectPrefferedTime() const
Definition
sound.cpp:131
Sound::setOcclusion
void setOcclusion(float occ)
Definition
sound.cpp:83
Sound::play
void play()
Definition
sound.cpp:126
Sound::setAmbient
void setAmbient(bool a)
Definition
sound.cpp:116
Sound::setLooping
void setLooping(bool l)
Definition
sound.cpp:111
Sound::setActive
void setActive(bool a)
Definition
sound.cpp:121
Sound::setPosition
void setPosition(const Tempest::Vec3 &pos)
Definition
sound.cpp:99
Sound::isFinished
bool isFinished() const
Definition
sound.cpp:79
Sound::volume
float volume() const
Definition
sound.cpp:93
Sound::isEmpty
bool isEmpty() const
Definition
sound.cpp:75
WorldSound
Definition
worldsound.h:21
World
Definition
world.h:31
worldsound.h
game
world
objects
sound.h
Generated by
1.9.8