diff options
author | Nipun Garg | 2019-07-10 20:15:08 +0530 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-03 17:17:16 +0200 |
commit | a8b4749c7eb8ab9471fecc7ab0e7aa20470c1e30 (patch) | |
tree | f503e4305c6072cd7818241d4dd9e28285e90b0c | |
parent | 38bdb36b239fbeb7e6e38adeacd83c8cfb7caa9b (diff) | |
download | scummvm-rg350-a8b4749c7eb8ab9471fecc7ab0e7aa20470c1e30.tar.gz scummvm-rg350-a8b4749c7eb8ab9471fecc7ab0e7aa20470c1e30.tar.bz2 scummvm-rg350-a8b4749c7eb8ab9471fecc7ab0e7aa20470c1e30.zip |
HDB: Add Input::assignKey(), LuaScript::isValid()
-rw-r--r-- | engines/hdb/input.h | 10 | ||||
-rw-r--r-- | engines/hdb/lua-script.h | 3 |
2 files changed, 13 insertions, 0 deletions
diff --git a/engines/hdb/input.h b/engines/hdb/input.h index d12f33346a..ffd6c0d524 100644 --- a/engines/hdb/input.h +++ b/engines/hdb/input.h @@ -61,6 +61,16 @@ public: return _mouseY; } + void assignKey(int whichKey, Common::KeyCode keyPressed) { + switch (whichKey) { + case 0: _keyUp = keyPressed; return; + case 1: _keyDown = keyPressed; return; + case 2: _keyLeft = keyPressed; return; + case 3: _keyRight = keyPressed; return; + case 4: _keyUse = keyPressed; return; + } + } + private: uint16 _buttons; // Flags for buttons diff --git a/engines/hdb/lua-script.h b/engines/hdb/lua-script.h index ff061afbc5..5124ac2638 100644 --- a/engines/hdb/lua-script.h +++ b/engines/hdb/lua-script.h @@ -80,6 +80,9 @@ public: const char *getStringOffStack(); void setLuaGlobalValue(const char *name, int value); + bool isValid() { + return _systemInit; + } private: lua_State *_state; |