diff options
Diffstat (limited to 'engines/kyra/kyra_v1.h')
-rw-r--r-- | engines/kyra/kyra_v1.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/engines/kyra/kyra_v1.h b/engines/kyra/kyra_v1.h index 1ad13cd092..0e71f039f4 100644 --- a/engines/kyra/kyra_v1.h +++ b/engines/kyra/kyra_v1.h @@ -119,6 +119,10 @@ struct GameFlags { byte gameID; }; +struct KeyCodeHash : public Common::UnaryFunction<Common::KeyCode, uint> { + uint operator()(Common::KeyCode val) const { return (uint)val; } +}; + enum { GI_KYRA1 = 0, GI_KYRA2 = 1, @@ -277,7 +281,7 @@ protected: operator Common::Event() const { return event; } }; Common::List<Event> _eventList; - typedef Common::HashMap<int, int16> KeyMap; + typedef Common::HashMap<Common::KeyCode, int16, KeyCodeHash> KeyMap; KeyMap _keyMap; // config specific |