[Scummvm-cvs-logs] scummvm master -> f6e42a72826afd2bd796e830afe48c66034d24f0
bluegr
bluegr at gmail.com
Mon Dec 28 01:00:10 CET 2015
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
f6e42a7282 LAB: Simulate events by setting an unused key
Commit: f6e42a72826afd2bd796e830afe48c66034d24f0
https://github.com/scummvm/scummvm/commit/f6e42a72826afd2bd796e830afe48c66034d24f0
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2015-12-28T01:59:17+02:00
Commit Message:
LAB: Simulate events by setting an unused key
Changed paths:
engines/lab/console.cpp
engines/lab/eventman.cpp
engines/lab/eventman.h
engines/lab/lab.cpp
diff --git a/engines/lab/console.cpp b/engines/lab/console.cpp
index 35e29f2..217dc28 100644
--- a/engines/lab/console.cpp
+++ b/engines/lab/console.cpp
@@ -53,7 +53,8 @@ bool Console::Cmd_Scene(int argc, const char **argv) {
_vm->_closeDataPtr = nullptr;
_vm->_mainDisplay = true;
_vm->_followingCrumbs = false;
- _vm->_event->simulateLeftClick();
+ _vm->_event->simulateEvent();
+ _vm->_graphics->_longWinInFront = false;
return false;
}
diff --git a/engines/lab/eventman.cpp b/engines/lab/eventman.cpp
index 333cedd..a94ddbf 100644
--- a/engines/lab/eventman.cpp
+++ b/engines/lab/eventman.cpp
@@ -205,4 +205,9 @@ Common::Point EventManager::updateAndGetMousePos() {
return _mousePos;
}
+void EventManager::simulateEvent() {
+ // Simulate an event by setting an unused key
+ _keyPressed = Common::KeyState(Common::KEYCODE_SEMICOLON);
+}
+
} // End of namespace Lab
diff --git a/engines/lab/eventman.h b/engines/lab/eventman.h
index c282f51..3774529 100644
--- a/engines/lab/eventman.h
+++ b/engines/lab/eventman.h
@@ -123,10 +123,10 @@ public:
Common::Point updateAndGetMousePos();
/**
- * Simulates a left click for the game main loop, when a game is
+ * Simulates an event for the game main loop, when a game is
* loaded or when the user teleports to a scene
*/
- void simulateLeftClick() { _leftClick = true; }
+ void simulateEvent();
};
} // End of namespace Lab
diff --git a/engines/lab/lab.cpp b/engines/lab/lab.cpp
index 905f09c..47b864d 100644
--- a/engines/lab/lab.cpp
+++ b/engines/lab/lab.cpp
@@ -249,7 +249,8 @@ Common::Error LabEngine::loadGameState(int slot) {
_closeDataPtr = nullptr;
_mainDisplay = true;
_followingCrumbs = false;
- _event->simulateLeftClick();
+ _event->simulateEvent();
+ _graphics->_longWinInFront = false;
return (result) ? Common::kNoError : Common::kUserCanceled;
}
More information about the Scummvm-git-logs
mailing list