aboutsummaryrefslogtreecommitdiff
path: root/engines/pink/objects/actions/action_sound.cpp
diff options
context:
space:
mode:
authorwhiterandrek2018-05-22 08:03:37 +0300
committerEugene Sandulenko2018-06-28 23:51:32 +0200
commit82974a9ce37aba6240f7c3543947631170f012c2 (patch)
tree6aeed5f5edfb1c758b2c18b8ac224bde40eaff8c /engines/pink/objects/actions/action_sound.cpp
parent931d6adbcbbe063857814dc76886e9a967b2a4f3 (diff)
downloadscummvm-rg350-82974a9ce37aba6240f7c3543947631170f012c2.tar.gz
scummvm-rg350-82974a9ce37aba6240f7c3543947631170f012c2.tar.bz2
scummvm-rg350-82974a9ce37aba6240f7c3543947631170f012c2.zip
PINK: fix indentation
Diffstat (limited to 'engines/pink/objects/actions/action_sound.cpp')
-rw-r--r--engines/pink/objects/actions/action_sound.cpp64
1 files changed, 32 insertions, 32 deletions
diff --git a/engines/pink/objects/actions/action_sound.cpp b/engines/pink/objects/actions/action_sound.cpp
index 45d74be23a..e94251d9c0 100644
--- a/engines/pink/objects/actions/action_sound.cpp
+++ b/engines/pink/objects/actions/action_sound.cpp
@@ -32,68 +32,68 @@
namespace Pink {
ActionSound::ActionSound()
- : _sound(nullptr)
+ : _sound(nullptr)
{}
ActionSound::~ActionSound(){
- end();
+ end();
}
void ActionSound::deserialize(Archive &archive) {
- Action::deserialize(archive);
- _fileName = archive.readString();
- _volume = archive.readDWORD();
- _isLoop = (bool) archive.readDWORD();
- _isBackground = (bool) archive.readDWORD();
+ Action::deserialize(archive);
+ _fileName = archive.readString();
+ _volume = archive.readDWORD();
+ _isLoop = (bool) archive.readDWORD();
+ _isBackground = (bool) archive.readDWORD();
}
void ActionSound::toConsole() {
- debug("\tActionSound: _name = %s, _fileName = %s, _volume = %u, _isLoop = %u,"
- " _isBackground = %u", _name.c_str(), _fileName.c_str(), _volume, _isLoop, _isBackground);
+ debug("\tActionSound: _name = %s, _fileName = %s, _volume = %u, _isLoop = %u,"
+ " _isBackground = %u", _name.c_str(), _fileName.c_str(), _volume, _isLoop, _isBackground);
}
void ActionSound::start(bool unk) {
- assert(!_sound);
- _sound = _actor->getPage()->loadSound(_fileName);
+ assert(!_sound);
+ _sound = _actor->getPage()->loadSound(_fileName);
- Audio::Mixer::SoundType soundType = _isBackground ? Audio::Mixer::SoundType::kMusicSoundType
- : Audio::Mixer::SoundType::kSpeechSoundType;
+ Audio::Mixer::SoundType soundType = _isBackground ? Audio::Mixer::SoundType::kMusicSoundType
+ : Audio::Mixer::SoundType::kSpeechSoundType;
- Director *director = _actor->getPage()->getGame()->getDirector();
- director->addSound(this);
+ Director *director = _actor->getPage()->getGame()->getDirector();
+ director->addSound(this);
- _sound->play(soundType, _volume, _isLoop);
- if (_isLoop)
- _actor->endAction();
+ _sound->play(soundType, _volume, _isLoop);
+ if (_isLoop)
+ _actor->endAction();
- debug("Actor %s has now ActionSound %s", _actor->getName().c_str(), _name.c_str());
+ debug("Actor %s has now ActionSound %s", _actor->getName().c_str(), _name.c_str());
}
void ActionSound::end() {
- if (_sound) {
- debug("ActionSound %s of Actor %s is ended", _name.c_str(), _actor->getName().c_str());
+ if (_sound) {
+ debug("ActionSound %s of Actor %s is ended", _name.c_str(), _actor->getName().c_str());
- Director *director = _actor->getPage()->getGame()->getDirector();
- director->removeSound(this);
+ Director *director = _actor->getPage()->getGame()->getDirector();
+ director->removeSound(this);
- delete _sound;
- _sound = nullptr;
- }
+ delete _sound;
+ _sound = nullptr;
+ }
}
void ActionSound::update() {
- if (!_sound->isPlaying())
- _actor->endAction();
+ if (!_sound->isPlaying())
+ _actor->endAction();
}
void ActionSound::pause() {
- if (_sound)
- _sound->pause();
+ if (_sound)
+ _sound->pause();
}
void ActionSound::unpause() {
- if (_sound)
- _sound->resume();
+ if (_sound)
+ _sound->resume();
}
} // End of namespace Pink