aboutsummaryrefslogtreecommitdiff
path: root/engines/pink/objects
diff options
context:
space:
mode:
authorwhitertandrek2018-03-23 06:27:55 +0200
committerEugene Sandulenko2018-06-28 23:51:32 +0200
commit636e226d738b736cc94cc309d2f3bd896ecc7462 (patch)
tree869baeb4933409c008825755e2fc409087688f8a /engines/pink/objects
parent74437eee9152b0816449120f475695381eca69da (diff)
downloadscummvm-rg350-636e226d738b736cc94cc309d2f3bd896ecc7462.tar.gz
scummvm-rg350-636e226d738b736cc94cc309d2f3bd896ecc7462.tar.bz2
scummvm-rg350-636e226d738b736cc94cc309d2f3bd896ecc7462.zip
PINK: added ActionTalk class
Diffstat (limited to 'engines/pink/objects')
-rw-r--r--engines/pink/objects/actions/action_loop.cpp2
-rw-r--r--engines/pink/objects/actions/action_loop.h3
-rw-r--r--engines/pink/objects/actions/action_talk.cpp40
-rw-r--r--engines/pink/objects/actions/action_talk.h41
4 files changed, 83 insertions, 3 deletions
diff --git a/engines/pink/objects/actions/action_loop.cpp b/engines/pink/objects/actions/action_loop.cpp
index 98d95ee139..25e4d668f8 100644
--- a/engines/pink/objects/actions/action_loop.cpp
+++ b/engines/pink/objects/actions/action_loop.cpp
@@ -46,7 +46,7 @@ void ActionLoop::deserialize(Archive &archive) {
void ActionLoop::toConsole() {
debug("\tActionLoop: _name = %s, _fileName = %s, z = %u, _startFrame = %u,"
- " _endFrame = %u, _intro = %u, style = %u",
+ " _endFrame = %u, _intro = %u, _style = %u",
_name.c_str(), _fileName.c_str(), _z, _startFrame, _stopFrame, _intro, _style);
}
diff --git a/engines/pink/objects/actions/action_loop.h b/engines/pink/objects/actions/action_loop.h
index 0612f51e36..82b2c1eb94 100644
--- a/engines/pink/objects/actions/action_loop.h
+++ b/engines/pink/objects/actions/action_loop.h
@@ -30,10 +30,9 @@ namespace Pink {
class ActionLoop : public ActionPlay {
public:
virtual void deserialize(Archive &archive);
-
virtual void toConsole();
-private:
+protected:
enum Style {
kPingPong = 2,
kRandom = 3,
diff --git a/engines/pink/objects/actions/action_talk.cpp b/engines/pink/objects/actions/action_talk.cpp
new file mode 100644
index 0000000000..da37204e5d
--- /dev/null
+++ b/engines/pink/objects/actions/action_talk.cpp
@@ -0,0 +1,40 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "action_talk.h"
+#include <pink/archive.h>
+#include <common/debug.h>
+
+namespace Pink {
+
+void ActionTalk::deserialize(Archive &archive) {
+ ActionLoop::deserialize(archive);
+ archive >> _vox;
+}
+
+void ActionTalk::toConsole() {
+ debug("\tActionTalk: _name = %s, _fileName = %s, z = %u, _startFrame = %u,"
+ " _endFrame = %u, _intro = %u, _style = %u, _vox = %s",
+ _name.c_str(), _fileName.c_str(), _z, _startFrame, _stopFrame, _intro, _style, _vox.c_str());
+}
+
+} // End of namespace Pink \ No newline at end of file
diff --git a/engines/pink/objects/actions/action_talk.h b/engines/pink/objects/actions/action_talk.h
new file mode 100644
index 0000000000..4c28a6f545
--- /dev/null
+++ b/engines/pink/objects/actions/action_talk.h
@@ -0,0 +1,41 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef PINK_ACTION_TALK_H
+#define PINK_ACTION_TALK_H
+
+#include <engines/pink/objects/actions/action_loop.h>
+
+namespace Pink {
+
+class ActionTalk : public ActionLoop {
+public:
+ virtual void deserialize(Archive &archive);
+ virtual void toConsole();
+
+private:
+ Common::String _vox;
+};
+
+} // End of namespace Pink
+
+#endif