diff options
author | whiterandrek | 2018-05-22 11:58:02 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2018-06-28 23:51:32 +0200 |
commit | e98c14c3d7d790f6ba77ab4d4925b608c55e2e22 (patch) | |
tree | 00b613617132ce06f622054786f63ed8396db9ae /engines/pink/objects/actions | |
parent | d7f09d4c3cbfca7472856ca5a3e14a8e55255451 (diff) | |
download | scummvm-rg350-e98c14c3d7d790f6ba77ab4d4925b608c55e2e22.tar.gz scummvm-rg350-e98c14c3d7d790f6ba77ab4d4925b608c55e2e22.tar.bz2 scummvm-rg350-e98c14c3d7d790f6ba77ab4d4925b608c55e2e22.zip |
PINK: fix formatting
Diffstat (limited to 'engines/pink/objects/actions')
-rw-r--r-- | engines/pink/objects/actions/action.h | 4 | ||||
-rw-r--r-- | engines/pink/objects/actions/action_cel.cpp | 6 | ||||
-rw-r--r-- | engines/pink/objects/actions/action_cel.h | 2 | ||||
-rw-r--r-- | engines/pink/objects/actions/action_loop.cpp | 19 | ||||
-rw-r--r-- | engines/pink/objects/actions/action_play.cpp | 2 | ||||
-rw-r--r-- | engines/pink/objects/actions/action_play_with_sfx.cpp | 6 | ||||
-rw-r--r-- | engines/pink/objects/actions/action_play_with_sfx.h | 2 | ||||
-rw-r--r-- | engines/pink/objects/actions/action_sound.cpp | 3 |
8 files changed, 19 insertions, 25 deletions
diff --git a/engines/pink/objects/actions/action.h b/engines/pink/objects/actions/action.h index 241aee821f..7dd0d2a9be 100644 --- a/engines/pink/objects/actions/action.h +++ b/engines/pink/objects/actions/action.h @@ -38,9 +38,9 @@ public: virtual void update() {}; virtual void toConsole() {}; - virtual bool initPalette(Director *director) { return 0;} + virtual bool initPalette(Director *director) { return 0; } - Actor *getActor() { return _actor;} + Actor *getActor() { return _actor; } virtual void pause() {}; virtual void unpause() {}; diff --git a/engines/pink/objects/actions/action_cel.cpp b/engines/pink/objects/actions/action_cel.cpp index f38c127782..8e868a199b 100644 --- a/engines/pink/objects/actions/action_cel.cpp +++ b/engines/pink/objects/actions/action_cel.cpp @@ -32,9 +32,7 @@ namespace Pink { ActionCEL::ActionCEL() - : _decoder(nullptr) { - -} + : _decoder(nullptr) {} void ActionCEL::deserialize(Archive &archive) { Action::deserialize(archive); @@ -74,7 +72,7 @@ bool ActionCEL::initPalette(Director *director) { } void ActionCEL::update() { - if (_decoder->endOfVideo()){ + if (_decoder->endOfVideo()) { _decoder->stop(); _actor->endAction(); } diff --git a/engines/pink/objects/actions/action_cel.h b/engines/pink/objects/actions/action_cel.h index 765fe8dd61..bf1ae2961d 100644 --- a/engines/pink/objects/actions/action_cel.h +++ b/engines/pink/objects/actions/action_cel.h @@ -49,7 +49,7 @@ public: void unpause() override; protected: - virtual void onStart() {} ; + virtual void onStart() {}; CelDecoder *_decoder; Common::String _fileName; uint32 _z; diff --git a/engines/pink/objects/actions/action_loop.cpp b/engines/pink/objects/actions/action_loop.cpp index f32a3a4035..f61ed5d35a 100644 --- a/engines/pink/objects/actions/action_loop.cpp +++ b/engines/pink/objects/actions/action_loop.cpp @@ -33,15 +33,14 @@ void ActionLoop::deserialize(Archive &archive) { _intro = archive.readDWORD(); style = archive.readWORD(); switch (style) { - case kPingPong: - _style = kPingPong; - break; - case kRandom: - _style = kRandom; - break; - default: - _style = kForward; - break; + case kPingPong: + _style = kPingPong; + break; + case kRandom: + _style = kRandom; + break; + default: + _style = kForward; } } @@ -54,7 +53,7 @@ void ActionLoop::toConsole() { void ActionLoop::update() { // for now it supports only forward loop animation if (_style == kForward) { - if (_decoder->endOfVideo() || _decoder->getCurFrame() == _stopFrame){ + if (_decoder->endOfVideo() || _decoder->getCurFrame() == _stopFrame) { //debug("ACTION LOOP : NEXT ITERATION"); _decoder->rewind(); } diff --git a/engines/pink/objects/actions/action_play.cpp b/engines/pink/objects/actions/action_play.cpp index 6ae56df349..a2b8b0a0a8 100644 --- a/engines/pink/objects/actions/action_play.cpp +++ b/engines/pink/objects/actions/action_play.cpp @@ -54,7 +54,7 @@ void ActionPlay::onStart() { } void ActionPlay::update() { - if (_decoder->endOfVideo() || _decoder->getCurFrame() == _stopFrame){ + if (_decoder->endOfVideo() || _decoder->getCurFrame() == _stopFrame) { _decoder->stop(); _actor->endAction(); } diff --git a/engines/pink/objects/actions/action_play_with_sfx.cpp b/engines/pink/objects/actions/action_play_with_sfx.cpp index 62488ac302..6ab8fa6b82 100644 --- a/engines/pink/objects/actions/action_play_with_sfx.cpp +++ b/engines/pink/objects/actions/action_play_with_sfx.cpp @@ -66,9 +66,8 @@ void ActionPlayWithSfx::updateSound() { return; for (uint i = 0; i < _sfxArray.size(); ++i) { - if (_sfxArray[i]->getFrame() == _decoder->getCurFrame()) { + if (_sfxArray[i]->getFrame() == _decoder->getCurFrame()) _sfxArray[i]->play(_actor->getPage()); - } } } @@ -107,8 +106,7 @@ uint32 ActionSfx::getFrame() { } ActionSfx::ActionSfx() - : _sound(nullptr) -{} + : _sound(nullptr) {} void ActionSfx::end() { delete _sound; diff --git a/engines/pink/objects/actions/action_play_with_sfx.h b/engines/pink/objects/actions/action_play_with_sfx.h index 89b2ec61ab..c9fd348b6b 100644 --- a/engines/pink/objects/actions/action_play_with_sfx.h +++ b/engines/pink/objects/actions/action_play_with_sfx.h @@ -42,7 +42,7 @@ protected: private: void updateSound(); uint32 _isLoop; - Array<ActionSfx*> _sfxArray; + Array<ActionSfx *> _sfxArray; }; class Sound; diff --git a/engines/pink/objects/actions/action_sound.cpp b/engines/pink/objects/actions/action_sound.cpp index 2e69228dd3..ffbd29389e 100644 --- a/engines/pink/objects/actions/action_sound.cpp +++ b/engines/pink/objects/actions/action_sound.cpp @@ -32,8 +32,7 @@ namespace Pink { ActionSound::ActionSound() - : _sound(nullptr) -{} + : _sound(nullptr) {} ActionSound::~ActionSound(){ end(); |