HDB: Add Input::assignKey(), LuaScript::isValid()

This commit is contained in:
Nipun Garg 2019-07-10 20:15:08 +05:30 committed by Eugene Sandulenko
parent 38bdb36b23
commit a8b4749c7e
2 changed files with 13 additions and 0 deletions

View File

@ -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

View File

@ -80,6 +80,9 @@ public:
const char *getStringOffStack();
void setLuaGlobalValue(const char *name, int value);
bool isValid() {
return _systemInit;
}
private:
lua_State *_state;