aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMatthew Hoops2014-08-14 21:56:33 -0400
committerMatthew Hoops2014-08-14 21:56:33 -0400
commitbf210cccc02f77d6f393593e4dd8d513eb0408a8 (patch)
tree38d689f8a3ec2af8958f0137d28f5459a91262fc /engines
parentd2bf7f99fd20fbc0b6126e5c8ae6833d3491d030 (diff)
downloadscummvm-rg350-bf210cccc02f77d6f393593e4dd8d513eb0408a8.tar.gz
scummvm-rg350-bf210cccc02f77d6f393593e4dd8d513eb0408a8.tar.bz2
scummvm-rg350-bf210cccc02f77d6f393593e4dd8d513eb0408a8.zip
PEGASUS: Fix bad cast that destroys the InputHandler vtable
Thanks to LordHoto for his assistance in tracking this nonsense down.
Diffstat (limited to 'engines')
-rw-r--r--engines/pegasus/interaction.cpp38
-rw-r--r--engines/pegasus/interaction.h6
-rw-r--r--engines/pegasus/module.mk1
3 files changed, 40 insertions, 5 deletions
diff --git a/engines/pegasus/interaction.cpp b/engines/pegasus/interaction.cpp
new file mode 100644
index 0000000000..143bdebaba
--- /dev/null
+++ b/engines/pegasus/interaction.cpp
@@ -0,0 +1,38 @@
+/* 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.
+ *
+ * Additional copyright for this file:
+ * Copyright (C) 1995-1997 Presto Studios, Inc.
+ *
+ * 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 "pegasus/interaction.h"
+#include "pegasus/neighborhood/neighborhood.h"
+
+namespace Pegasus {
+
+GameInteraction::GameInteraction(const InteractionID id, Neighborhood *nextHandler) : IDObject(id), InputHandler(nextHandler) {
+ _isInteracting = false;
+ _savedHandler = 0;
+ _owner = nextHandler;
+}
+
+} // End of namespace Pegasus
+
diff --git a/engines/pegasus/interaction.h b/engines/pegasus/interaction.h
index 293ee6be83..ca168b4cb7 100644
--- a/engines/pegasus/interaction.h
+++ b/engines/pegasus/interaction.h
@@ -37,11 +37,7 @@ class Neighborhood;
class GameInteraction : public IDObject, public InputHandler {
public:
- GameInteraction(const InteractionID id, Neighborhood *nextHandler) : IDObject(id), InputHandler((InputHandler *)nextHandler) {
- _isInteracting = false;
- _savedHandler = 0;
- _owner = nextHandler;
- }
+ GameInteraction(const InteractionID id, Neighborhood *nextHandler);
// If the interaction is open (_isInteracting == true), it's too late to do anything
// about it here.
diff --git a/engines/pegasus/module.mk b/engines/pegasus/module.mk
index cb44a04171..6d69d6ea58 100644
--- a/engines/pegasus/module.mk
+++ b/engines/pegasus/module.mk
@@ -12,6 +12,7 @@ MODULE_OBJS = \
graphics.o \
hotspot.o \
input.o \
+ interaction.o \
interface.o \
menu.o \
movie.o \