aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTarek Soliman2012-02-18 17:38:28 -0600
committerTarek Soliman2012-02-20 06:49:22 -0600
commit3c918bb378b2204e38cfc16e10a3c2c0e130d9f4 (patch)
treed3991e5978bafcfde875b02bc859a899a9f69baf
parenta0ba4eb569ae9ec0e05a7ba8532ab304e6852f84 (diff)
downloadscummvm-rg350-3c918bb378b2204e38cfc16e10a3c2c0e130d9f4.tar.gz
scummvm-rg350-3c918bb378b2204e38cfc16e10a3c2c0e130d9f4.tar.bz2
scummvm-rg350-3c918bb378b2204e38cfc16e10a3c2c0e130d9f4.zip
KEYMAPPER: Move DefaultEventMapper implementation to its own cpp file
-rw-r--r--common/EventMapper.cpp35
-rw-r--r--common/events.h7
-rw-r--r--common/module.mk1
3 files changed, 37 insertions, 6 deletions
diff --git a/common/EventMapper.cpp b/common/EventMapper.cpp
new file mode 100644
index 0000000000..be55c6b9a5
--- /dev/null
+++ b/common/EventMapper.cpp
@@ -0,0 +1,35 @@
+/* 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 "common/events.h"
+
+namespace Common {
+
+List<Event> DefaultEventMapper::mapEvent(const Event &ev, EventSource *source) {
+ List<Event> events;
+ // just pass it through
+ events.push_back(ev);
+ return events;
+}
+
+
+} // namespace Common
diff --git a/common/events.h b/common/events.h
index fec4d37d34..5e539f072e 100644
--- a/common/events.h
+++ b/common/events.h
@@ -226,12 +226,7 @@ public:
class DefaultEventMapper : public EventMapper {
public:
// EventMapper interface
- virtual List<Event> mapEvent(const Event &ev, EventSource *source) {
- List<Event> events;
- // just pass it through
- events.push_back(ev);
- return events;
- }
+ virtual List<Event> mapEvent(const Event &ev, EventSource *source);
};
/**
diff --git a/common/module.mk b/common/module.mk
index 7434df7052..ae5e41cb8c 100644
--- a/common/module.mk
+++ b/common/module.mk
@@ -8,6 +8,7 @@ MODULE_OBJS := \
debug.o \
error.o \
EventDispatcher.o \
+ EventMapper.o \
EventRecorder.o \
file.o \
fs.o \