aboutsummaryrefslogtreecommitdiff
path: root/engines/pink/objects
diff options
context:
space:
mode:
authorwhitertandrek2018-03-23 15:12:39 +0200
committerEugene Sandulenko2018-06-28 23:51:32 +0200
commit26f2ff66402d6469b34b627278bcd2678a7f9119 (patch)
tree15003ec6d893039ea6d967267b830d4645aa7901 /engines/pink/objects
parent7f5e2e69e81045f37833375c6d6e27dcc2e295fb (diff)
downloadscummvm-rg350-26f2ff66402d6469b34b627278bcd2678a7f9119.tar.gz
scummvm-rg350-26f2ff66402d6469b34b627278bcd2678a7f9119.tar.bz2
scummvm-rg350-26f2ff66402d6469b34b627278bcd2678a7f9119.zip
PINK: added InventoryActor and SequenceAudio
Diffstat (limited to 'engines/pink/objects')
-rw-r--r--engines/pink/objects/actors/inventory_actor.h44
-rw-r--r--engines/pink/objects/sequences/sequence.cpp15
-rw-r--r--engines/pink/objects/sequences/sequence.h11
3 files changed, 70 insertions, 0 deletions
diff --git a/engines/pink/objects/actors/inventory_actor.h b/engines/pink/objects/actors/inventory_actor.h
new file mode 100644
index 0000000000..4b2b424c9d
--- /dev/null
+++ b/engines/pink/objects/actors/inventory_actor.h
@@ -0,0 +1,44 @@
+/* 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_INVENTORY_ACTOR_H
+#define PINK_INVENTORY_ACTOR_H
+
+#include <pink/objects/actions/action.h>
+#include <common/debug.h>
+#include "actor.h"
+
+namespace Pink {
+
+class InventoryActor : public Actor {
+public:
+ void toConsole() {
+ debug("CursorActor: _name = %s", _name.c_str());
+ for (int i = 0; i < _actions.size(); ++i) {
+ _actions[i]->toConsole();
+ }
+ }
+};
+
+} // End of namespace Pink
+
+#endif
diff --git a/engines/pink/objects/sequences/sequence.cpp b/engines/pink/objects/sequences/sequence.cpp
index bad96213c6..984da5e702 100644
--- a/engines/pink/objects/sequences/sequence.cpp
+++ b/engines/pink/objects/sequences/sequence.cpp
@@ -107,6 +107,21 @@ void Sequence::start(int unk) {
_context->_unk++;
}
+void SequenceAudio::deserialize(Archive &archive) {
+ Sequence::deserialize(archive);
+ archive >> _sound;
+}
+
+void SequenceAudio::toConsole() {
+ debug("\t\tSequenceAudio %s : _sound = %s", _name.c_str(), _sound.c_str());
+ debug("\t\t\tItems:");
+ for (int i = 0; i < _items.size(); ++i) {
+ _items[i]->toConsole();
+ }
+}
+
+
+
SequenceContext::SequenceContext(Sequence *sequence, Sequencer *sequencer)
: _sequence(sequence), _sequencer(sequencer),
_nextItemIndex(0), _unk(1), _actor(nullptr)
diff --git a/engines/pink/objects/sequences/sequence.h b/engines/pink/objects/sequences/sequence.h
index bdf11b2f4f..a5522dae52 100644
--- a/engines/pink/objects/sequences/sequence.h
+++ b/engines/pink/objects/sequences/sequence.h
@@ -54,6 +54,17 @@ public:
};
+class SequenceAudio : public Sequence {
+public:
+ virtual void deserialize(Archive &archive);
+ virtual void toConsole();
+
+private:
+ Common::String _sound;
+ int _unk1;
+ int _unk2;
+};
+
class SequenceActorState {
public:
SequenceActorState(const Common::String &name);