aboutsummaryrefslogtreecommitdiff
path: root/engines/pegasus/input.h
diff options
context:
space:
mode:
authorMatthew Hoops2012-05-11 11:36:24 -0400
committerMatthew Hoops2012-05-11 11:37:47 -0400
commit974eb12fcce42067b5a52bc7f50a1edccf0d5f39 (patch)
tree08535d4d7d305196e2785f6d775bb0f480c9c854 /engines/pegasus/input.h
parente80d622fa5b3a834faff22ac777838388c0cdf10 (diff)
downloadscummvm-rg350-974eb12fcce42067b5a52bc7f50a1edccf0d5f39.tar.gz
scummvm-rg350-974eb12fcce42067b5a52bc7f50a1edccf0d5f39.tar.bz2
scummvm-rg350-974eb12fcce42067b5a52bc7f50a1edccf0d5f39.zip
PEGASUS: Rewrite the input code to more closely emulate what the original did
Now the easter egg key works better and so does striding.
Diffstat (limited to 'engines/pegasus/input.h')
-rw-r--r--engines/pegasus/input.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/engines/pegasus/input.h b/engines/pegasus/input.h
index 0ee01f1949..f6c29e7780 100644
--- a/engines/pegasus/input.h
+++ b/engines/pegasus/input.h
@@ -26,6 +26,8 @@
#ifndef PEGASUS_INPUT_H
#define PEGASUS_INPUT_H
+#include "common/events.h"
+#include "common/hashmap.h"
#include "common/rect.h"
#include "common/singleton.h"
@@ -37,10 +39,12 @@ namespace Pegasus {
class Hotspot;
class Input;
-class InputDeviceManager : public Common::Singleton<InputDeviceManager> {
+class InputDeviceManager : public Common::Singleton<InputDeviceManager>, public Common::EventObserver {
public:
InputDeviceManager();
- ~InputDeviceManager() {}
+ ~InputDeviceManager();
+
+ bool notifyEvent(const Common::Event &event);
void getInput(Input &, const InputBits);
@@ -49,7 +53,10 @@ public:
protected:
friend class Common::Singleton<SingletonBaseType>;
+ // Keep track of which keys are down (= true) or not
+ Common::HashMap<uint, bool> _keyMap;
InputBits _lastRawBits;
+ bool _consoleRequested;
};
enum {