aboutsummaryrefslogtreecommitdiff
path: root/engines/pink/objects/actions
diff options
context:
space:
mode:
authorwhiterandrek2018-04-06 10:03:56 +0300
committerEugene Sandulenko2018-06-28 23:51:32 +0200
commit78c4ed85ab7a84b18c8c7fd2e93c6bf2798acab6 (patch)
treeca77eaa6eb335e6eb57fcbd50e2515d26eb7fffe /engines/pink/objects/actions
parentc29b1d1112b70fcb017359f9a28eb8b7de49a5ab (diff)
downloadscummvm-rg350-78c4ed85ab7a84b18c8c7fd2e93c6bf2798acab6.tar.gz
scummvm-rg350-78c4ed85ab7a84b18c8c7fd2e93c6bf2798acab6.tar.bz2
scummvm-rg350-78c4ed85ab7a84b18c8c7fd2e93c6bf2798acab6.zip
PINK: implemented page state saving
Diffstat (limited to 'engines/pink/objects/actions')
-rw-r--r--engines/pink/objects/actions/action_cel.cpp4
-rw-r--r--engines/pink/objects/actions/action_cel.h2
-rw-r--r--engines/pink/objects/actions/action_hide.cpp3
-rw-r--r--engines/pink/objects/actions/action_hide.h2
-rw-r--r--engines/pink/objects/actions/action_play.cpp7
-rw-r--r--engines/pink/objects/actions/action_still.cpp2
6 files changed, 16 insertions, 4 deletions
diff --git a/engines/pink/objects/actions/action_cel.cpp b/engines/pink/objects/actions/action_cel.cpp
index 938d117015..e9e524726c 100644
--- a/engines/pink/objects/actions/action_cel.cpp
+++ b/engines/pink/objects/actions/action_cel.cpp
@@ -79,4 +79,8 @@ void ActionCEL::update() {
}
}
+ActionCEL::~ActionCEL() {
+ delete _decoder;
+}
+
} // End of namespace Pink \ No newline at end of file
diff --git a/engines/pink/objects/actions/action_cel.h b/engines/pink/objects/actions/action_cel.h
index 43fe8476e0..2ae5308d0e 100644
--- a/engines/pink/objects/actions/action_cel.h
+++ b/engines/pink/objects/actions/action_cel.h
@@ -32,6 +32,8 @@ class CelDecoder;
class ActionCEL : public Action {
public:
+ ~ActionCEL() override;
+
ActionCEL();
virtual void deserialize(Archive &archive);
virtual void start(bool unk);
diff --git a/engines/pink/objects/actions/action_hide.cpp b/engines/pink/objects/actions/action_hide.cpp
index b89d4c9627..ed2c903f1d 100644
--- a/engines/pink/objects/actions/action_hide.cpp
+++ b/engines/pink/objects/actions/action_hide.cpp
@@ -23,7 +23,6 @@
#include "action_hide.h"
#include "engines/pink/objects/actors/actor.h"
#include <engines/pink/archive.h>
-#include <common/debug.h>
namespace Pink {
@@ -45,4 +44,6 @@ void ActionHide::toConsole() {
debug("\tActionHide: _name = %s", _name.c_str());
}
+ActionHide::~ActionHide() {}
+
} //End of namespace Pink \ No newline at end of file
diff --git a/engines/pink/objects/actions/action_hide.h b/engines/pink/objects/actions/action_hide.h
index 414d077409..bc62a5fc5f 100644
--- a/engines/pink/objects/actions/action_hide.h
+++ b/engines/pink/objects/actions/action_hide.h
@@ -29,6 +29,8 @@ namespace Pink {
class ActionHide : public Action {
public:
+ ~ActionHide() override;
+
virtual void deserialize(Archive &archive);
virtual void toConsole();
diff --git a/engines/pink/objects/actions/action_play.cpp b/engines/pink/objects/actions/action_play.cpp
index 969eacf035..d3ded9a45a 100644
--- a/engines/pink/objects/actions/action_play.cpp
+++ b/engines/pink/objects/actions/action_play.cpp
@@ -45,10 +45,13 @@ void ActionPlay::end() {
void ActionPlay::onStart() {
debug("Actor %s has now ActionPlay %s", _actor->getName().c_str(), _name.c_str());
- _decoder->seekToFrame(_startFrame);
+ _decoder->start();
+ for (int i = 0; i <= _startFrame; ++i) {
+ _decoder->decodeNextFrame();
+ }
+
if (_stopFrame != -1)
_decoder->setEndFrame(_stopFrame);
- _decoder->start();
}
} // End of namespace Pink
diff --git a/engines/pink/objects/actions/action_still.cpp b/engines/pink/objects/actions/action_still.cpp
index 0af57a0fee..fc835f1af5 100644
--- a/engines/pink/objects/actions/action_still.cpp
+++ b/engines/pink/objects/actions/action_still.cpp
@@ -45,7 +45,7 @@ void ActionStill::end() {
void ActionStill::onStart() {
debug("Actor %s has now ActionStill %s", _actor->getName().c_str(), _name.c_str());
- for (int i = 0; i < _startFrame; ++i) {
+ for (int i = 0; i <= _startFrame; ++i) {
_decoder->decodeNextFrame();
}
_decoder->stop();