aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorwhitertandrek2018-03-23 15:12:39 +0200
committerEugene Sandulenko2018-06-28 23:51:32 +0200
commit26f2ff66402d6469b34b627278bcd2678a7f9119 (patch)
tree15003ec6d893039ea6d967267b830d4645aa7901 /engines
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')
-rw-r--r--engines/pink/archive.cpp17
-rw-r--r--engines/pink/module.mk3
-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
5 files changed, 81 insertions, 9 deletions
diff --git a/engines/pink/archive.cpp b/engines/pink/archive.cpp
index 0690454478..6bd29596c4 100644
--- a/engines/pink/archive.cpp
+++ b/engines/pink/archive.cpp
@@ -44,6 +44,7 @@
#include <engines/pink/objects/actions/action_text.h>
#include <engines/pink/objects/actors/cursor_actor.h>
#include <engines/pink/objects/handlers/handler_timer.h>
+#include <engines/pink/objects/actors/inventory_actor.h>
namespace Pink {
@@ -184,8 +185,8 @@ static Object* createObject(int objectId){
return new ActionText;
case kActor:
return new Actor;
- //case kAudioInfoPDAButton:
- // return new AudioInfoPDAButton;
+ case kAudioInfoPDAButton:
+ // return new AudioInfoPDAButton;
case kConditionGameVariable:
return new ConditionGameVariable;
case kConditionInventoryItemOwner:
@@ -216,16 +217,16 @@ static Object* createObject(int objectId){
return new HandlerTimerSequences;
case kHandlerUseClick:
return new HandlerUseClick;
- //case kInventoryActor:
- // return new InventoryActor;
+ case kInventoryActor:
+ return new InventoryActor;
case kInventoryItem:
return new InventoryItem;
case kLeadActor:
return new LeadActor;
case kModuleProxy:
return new ModuleProxy;
- //case kPDAButtonActor:
- // return new PDAButtonActor;
+ case kPDAButtonActor:
+ //return new PDAButtonActor;
case kParlSqPink:
return new ParlSqPink;
case kPubPink:
@@ -234,8 +235,8 @@ static Object* createObject(int objectId){
return new SeqTimer;
case kSequence:
return new Sequence;
- //case kSequenceAudio:
- // return new SequenceAudio;
+ case kSequenceAudio:
+ return new SequenceAudio;
case kSequenceItem:
return new SequenceItem;
case kSequenceItemDefaultAction:
diff --git a/engines/pink/module.mk b/engines/pink/module.mk
index ca8812d72c..ff38c8a5e7 100644
--- a/engines/pink/module.mk
+++ b/engines/pink/module.mk
@@ -34,6 +34,7 @@ MODULE_OBJS = \
objects/handlers/handler_timer.o \
objects/pages/page.o \
objects/pages/game_page.o \
+ objects/sequences/seq_timer.o \
objects/sequences/sequence.o \
objects/sequences/sequence_item.o \
objects/sequences/sequencer.o \
@@ -41,7 +42,7 @@ MODULE_OBJS = \
objects/walk/walk_location.o \
# This module can be built as a plugin
-ifeq ($(ENABLE_PLUMBERS), DYNAMIC_PLUGIN)
+ifeq ($(ENABLE_PINK), DYNAMIC_PLUGIN)
PLUGIN := 1
endif
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);