aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/pink/actors/lead_actor.cpp2
-rw-r--r--engines/pink/archive.cpp6
-rw-r--r--engines/pink/items/sequence_item.cpp32
-rw-r--r--engines/pink/items/sequence_item.h41
-rw-r--r--engines/pink/page.cpp2
-rw-r--r--engines/pink/sequences/sequence.cpp34
-rw-r--r--engines/pink/sequences/sequence.h46
-rw-r--r--engines/pink/sequences/sequencer.cpp40
-rw-r--r--engines/pink/sequences/sequencer.h51
9 files changed, 252 insertions, 2 deletions
diff --git a/engines/pink/actors/lead_actor.cpp b/engines/pink/actors/lead_actor.cpp
index 308e6413b9..80a9281598 100644
--- a/engines/pink/actors/lead_actor.cpp
+++ b/engines/pink/actors/lead_actor.cpp
@@ -23,7 +23,7 @@
#include "lead_actor.h"
#include "../walk/walk_mgr.h"
#include "../cursor_mgr.h"
-#include "../sequencer.h"
+#include "engines/pink/sequences/sequencer.h"
#include "../archive.h"
namespace Pink {
diff --git a/engines/pink/archive.cpp b/engines/pink/archive.cpp
index 265c9c6348..621135a87b 100644
--- a/engines/pink/archive.cpp
+++ b/engines/pink/archive.cpp
@@ -27,6 +27,8 @@
#include <engines/pink/actions/action_hide.h>
#include <engines/pink/actions/action_play.h>
#include <engines/pink/actions/action_sound.h>
+#include <engines/pink/sequences/sequence.h>
+#include "items/sequence_item.h"
#include "module.h"
#include "page.h"
#include "actors/lead_actor.h"
@@ -164,6 +166,10 @@ static Object* createObject(int objectId){
return new LeadActor;
case kModuleProxy:
return new ModuleProxy;
+ case kSequence:
+ return new Sequence;
+ case kSequenceItem:
+ return new SequenceItem;
case kWalkLocation:
return new WalkLocation;
default:
diff --git a/engines/pink/items/sequence_item.cpp b/engines/pink/items/sequence_item.cpp
new file mode 100644
index 0000000000..0672fd9b11
--- /dev/null
+++ b/engines/pink/items/sequence_item.cpp
@@ -0,0 +1,32 @@
+/* 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 "sequence_item.h"
+#include "../archive.h"
+
+namespace Pink {
+
+void SequenceItem::deserialize(Archive &archive) {
+ archive >> _actor >> _action;
+}
+
+} // End of namespace Pink \ No newline at end of file
diff --git a/engines/pink/items/sequence_item.h b/engines/pink/items/sequence_item.h
new file mode 100644
index 0000000000..b81d193df4
--- /dev/null
+++ b/engines/pink/items/sequence_item.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_SEQUENCE_ITEM_H
+#define PINK_SEQUENCE_ITEM_H
+
+#include <engines/pink/object.h>
+
+namespace Pink {
+
+class SequenceItem : public Object {
+public:
+ virtual void deserialize(Archive &archive);
+
+private:
+ Common::String _actor;
+ Common::String _action;
+};
+
+}
+
+#endif
diff --git a/engines/pink/page.cpp b/engines/pink/page.cpp
index 3b769a427f..0bbedac371 100644
--- a/engines/pink/page.cpp
+++ b/engines/pink/page.cpp
@@ -24,7 +24,7 @@
#include "page.h"
#include "cursor_mgr.h"
#include "actors/lead_actor.h"
-#include "sequencer.h"
+#include "engines/pink/sequences/sequencer.h"
namespace Pink {
diff --git a/engines/pink/sequences/sequence.cpp b/engines/pink/sequences/sequence.cpp
new file mode 100644
index 0000000000..fbee15ef5b
--- /dev/null
+++ b/engines/pink/sequences/sequence.cpp
@@ -0,0 +1,34 @@
+/* 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 "sequence.h"
+#include "../archive.h"
+
+namespace Pink {
+
+void Sequence::deserialize(Archive &archive) {
+ NamedObject::deserialize(archive);
+ _sequencer = static_cast<Sequencer*>(archive.readObject());
+ archive >> _items;
+}
+
+} // End of namespace Pink \ No newline at end of file
diff --git a/engines/pink/sequences/sequence.h b/engines/pink/sequences/sequence.h
new file mode 100644
index 0000000000..61714593db
--- /dev/null
+++ b/engines/pink/sequences/sequence.h
@@ -0,0 +1,46 @@
+/* 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_SEQUENCE_H
+#define PINK_SEQUENCE_H
+
+#include <engines/pink/object.h>
+#include <common/array.h>
+
+namespace Pink {
+
+class Sequencer;
+class SequenceItem;
+
+class Sequence : public NamedObject {
+public:
+ virtual void deserialize(Archive &archive);
+
+private:
+ Sequencer *_sequencer;
+ Common::Array<SequenceItem*> _items;
+ //context
+};
+
+} // End of namespace Pink
+
+#endif
diff --git a/engines/pink/sequences/sequencer.cpp b/engines/pink/sequences/sequencer.cpp
new file mode 100644
index 0000000000..b4914bc2f5
--- /dev/null
+++ b/engines/pink/sequences/sequencer.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 "sequencer.h"
+#include "engines/pink/archive.h"
+
+namespace Pink {
+
+Sequencer::Sequencer(GamePage *page)
+ : _page(page)
+{}
+
+void Sequencer::deserialize(Archive &archive) {
+ archive >> _sequences;
+ archive.readCount();// intro have 0 timers;
+ //serialize timers;
+
+}
+
+} // End of namespace Pink \ No newline at end of file
diff --git a/engines/pink/sequences/sequencer.h b/engines/pink/sequences/sequencer.h
new file mode 100644
index 0000000000..2ac8e03afa
--- /dev/null
+++ b/engines/pink/sequences/sequencer.h
@@ -0,0 +1,51 @@
+/* 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_SEQUENCER_H
+#define PINK_SEQUENCER_H
+
+#include <common/array.h>
+#include "engines/pink/object.h"
+
+namespace Pink {
+
+class Sequence;
+class GamePage;
+
+class Sequencer : public Object {
+public:
+ Sequencer(GamePage *page);
+
+ virtual void deserialize(Archive &archive);
+
+private:
+ //context
+ // unknown objects array
+ Common::Array<Sequence*> _sequences;
+ //timers
+ GamePage *_page;
+};
+
+} // End of namespace Pink
+
+#endif \ No newline at end of file