aboutsummaryrefslogtreecommitdiff
path: root/engines/pink/objects/actions
diff options
context:
space:
mode:
Diffstat (limited to 'engines/pink/objects/actions')
-rw-r--r--engines/pink/objects/actions/action.h2
-rw-r--r--engines/pink/objects/actions/action_cel.cpp2
-rw-r--r--engines/pink/objects/actions/action_loop.cpp2
-rw-r--r--engines/pink/objects/actions/action_play_with_sfx.cpp3
-rw-r--r--engines/pink/objects/actions/action_play_with_sfx.h3
5 files changed, 8 insertions, 4 deletions
diff --git a/engines/pink/objects/actions/action.h b/engines/pink/objects/actions/action.h
index f981b523d6..72e9b8f989 100644
--- a/engines/pink/objects/actions/action.h
+++ b/engines/pink/objects/actions/action.h
@@ -40,6 +40,8 @@ public:
virtual bool initPalette(Director *director) { return 0;}
+ Actor *getActor() { return _actor;}
+
protected:
Actor *_actor;
};
diff --git a/engines/pink/objects/actions/action_cel.cpp b/engines/pink/objects/actions/action_cel.cpp
index 7436c859fe..938d117015 100644
--- a/engines/pink/objects/actions/action_cel.cpp
+++ b/engines/pink/objects/actions/action_cel.cpp
@@ -23,6 +23,7 @@
#include <common/debug.h>
#include "action_cel.h"
#include <pink/objects/actors/actor.h>
+#include <graphics/surface.h>
#include "engines/pink/archive.h"
#include "engines/pink/objects/pages/game_page.h"
#include "pink/pink.h"
@@ -44,6 +45,7 @@ void ActionCEL::start(bool unk) {
if (!_decoder)
_decoder = _actor->getPage()->loadCel(_fileName);
_actor->getPage()->getGame()->getDirector()->addSprite(this);
+
this->onStart();
}
diff --git a/engines/pink/objects/actions/action_loop.cpp b/engines/pink/objects/actions/action_loop.cpp
index 81760c5125..c821fb1530 100644
--- a/engines/pink/objects/actions/action_loop.cpp
+++ b/engines/pink/objects/actions/action_loop.cpp
@@ -55,7 +55,7 @@ void ActionLoop::update() {
// for now it supports only forward loop animation
if (_style == kForward) {
if (_decoder->endOfVideo()){
- debug("ACTION LOOP : NEXT ITERATION");
+ //debug("ACTION LOOP : NEXT ITERATION");
_decoder->rewind();
}
}
diff --git a/engines/pink/objects/actions/action_play_with_sfx.cpp b/engines/pink/objects/actions/action_play_with_sfx.cpp
index 8c8cf6fa9d..fc4d48c40a 100644
--- a/engines/pink/objects/actions/action_play_with_sfx.cpp
+++ b/engines/pink/objects/actions/action_play_with_sfx.cpp
@@ -93,7 +93,8 @@ void ActionSfx::play(GamePage *page) {
if (!_sound)
_sound = page->loadSound(_sfxName);
- _sound->play(Audio::Mixer::SoundType::kSFXSoundType, _volume, 0);
+ if (!_sound->isPlaying())
+ _sound->play(Audio::Mixer::SoundType::kSFXSoundType, _volume, 0);
}
ActionSfx::~ActionSfx() {
diff --git a/engines/pink/objects/actions/action_play_with_sfx.h b/engines/pink/objects/actions/action_play_with_sfx.h
index 020b380a58..c7aab59866 100644
--- a/engines/pink/objects/actions/action_play_with_sfx.h
+++ b/engines/pink/objects/actions/action_play_with_sfx.h
@@ -31,12 +31,11 @@ namespace Pink {
class ActionSfx;
class ActionPlayWithSfx : public ActionPlay {
+public:
virtual ~ActionPlayWithSfx();
virtual void deserialize(Archive &archive);
virtual void toConsole();
virtual void update();
-
-public:
virtual void end();
protected: