aboutsummaryrefslogtreecommitdiff
path: root/engines/pink/handlers
diff options
context:
space:
mode:
Diffstat (limited to 'engines/pink/handlers')
-rw-r--r--engines/pink/handlers/handler.cpp4
-rw-r--r--engines/pink/handlers/handler.h7
-rw-r--r--engines/pink/handlers/handler_sequences.cpp33
-rw-r--r--engines/pink/handlers/handler_sequences.h40
-rw-r--r--engines/pink/handlers/handler_start_page.h3
5 files changed, 84 insertions, 3 deletions
diff --git a/engines/pink/handlers/handler.cpp b/engines/pink/handlers/handler.cpp
index e2d35394a7..300071beb7 100644
--- a/engines/pink/handlers/handler.cpp
+++ b/engines/pink/handlers/handler.cpp
@@ -21,11 +21,13 @@
*/
#include "handler.h"
+#include "../archive.h"
namespace Pink {
void Handler::deserialize(Archive &archive) {
-
+ assert(archive.readCount() == 0); // intro has zero conditions, so skip;
+ archive >> _sideEffects;
}
} // End of namespace Pink
diff --git a/engines/pink/handlers/handler.h b/engines/pink/handlers/handler.h
index 803c4f4a06..1acd9adff4 100644
--- a/engines/pink/handlers/handler.h
+++ b/engines/pink/handlers/handler.h
@@ -24,14 +24,19 @@
#define PINK_HANDLER_H
#include <engines/pink/object.h>
+#include <common/array.h>
namespace Pink {
+class SideEffect;
+
class Handler : public Object {
public:
virtual void deserialize(Archive &archive);
+
+private:
//_conditions
- //_sideEffects
+ Common::Array<SideEffect*> _sideEffects;
};
} // End of namespace Pink
diff --git a/engines/pink/handlers/handler_sequences.cpp b/engines/pink/handlers/handler_sequences.cpp
new file mode 100644
index 0000000000..938633876d
--- /dev/null
+++ b/engines/pink/handlers/handler_sequences.cpp
@@ -0,0 +1,33 @@
+/* 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 "handler_sequences.h"
+#include "../archive.h"
+
+namespace Pink {
+
+void HandlerSequences::deserialize(Archive &archive) {
+ Handler::deserialize(archive);
+ archive >> _sequences;
+}
+
+} // End of namespace Pink \ No newline at end of file
diff --git a/engines/pink/handlers/handler_sequences.h b/engines/pink/handlers/handler_sequences.h
new file mode 100644
index 0000000000..46023ea91c
--- /dev/null
+++ b/engines/pink/handlers/handler_sequences.h
@@ -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.
+ *
+ */
+#ifndef PINK_HANDLER_SEQUENCES_H
+#define PINK_HANDLER_SEQUENCES_H
+
+#include <engines/pink/utils.h>
+#include "handler.h"
+
+namespace Pink {
+
+class HandlerSequences : public Handler {
+public:
+ virtual void deserialize(Archive &archive);
+
+private:
+ StringArray _sequences;
+};
+
+} // End of namespace Pink
+
+#endif
diff --git a/engines/pink/handlers/handler_start_page.h b/engines/pink/handlers/handler_start_page.h
index 9e76d367d2..202b320846 100644
--- a/engines/pink/handlers/handler_start_page.h
+++ b/engines/pink/handlers/handler_start_page.h
@@ -24,10 +24,11 @@
#define PINK_HANDLER_START_PAGE_H
#include "handler.h"
+#include "handler_sequences.h"
namespace Pink {
-class HandlerStartPage : public Handler {
+class HandlerStartPage : public HandlerSequences {
};