diff options
-rw-r--r-- | engines/lab/console.cpp | 7 | ||||
-rw-r--r-- | engines/lab/eventman.h | 6 | ||||
-rw-r--r-- | engines/lab/lab.cpp | 5 | ||||
-rw-r--r-- | engines/lab/lab.h | 2 |
4 files changed, 20 insertions, 0 deletions
diff --git a/engines/lab/console.cpp b/engines/lab/console.cpp index 12eafd3789..35e29f2920 100644 --- a/engines/lab/console.cpp +++ b/engines/lab/console.cpp @@ -24,6 +24,8 @@ #include "lab/lab.h" #include "lab/console.h" +#include "lab/dispman.h" +#include "lab/eventman.h" #include "lab/processroom.h" #include "lab/resource.h" @@ -47,6 +49,11 @@ bool Console::Cmd_Scene(int argc, const char **argv) { } _vm->_roomNum = atoi(argv[1]); + _vm->_curFileName = " "; + _vm->_closeDataPtr = nullptr; + _vm->_mainDisplay = true; + _vm->_followingCrumbs = false; + _vm->_event->simulateLeftClick(); return false; } diff --git a/engines/lab/eventman.h b/engines/lab/eventman.h index cb91b12a76..c282f5106f 100644 --- a/engines/lab/eventman.h +++ b/engines/lab/eventman.h @@ -121,6 +121,12 @@ public: void setMousePos(Common::Point pos); void updateMouse(); Common::Point updateAndGetMousePos(); + + /** + * Simulates a left click for the game main loop, when a game is + * loaded or when the user teleports to a scene + */ + void simulateLeftClick() { _leftClick = true; } }; } // End of namespace Lab diff --git a/engines/lab/lab.cpp b/engines/lab/lab.cpp index 70af5e8605..905f09c106 100644 --- a/engines/lab/lab.cpp +++ b/engines/lab/lab.cpp @@ -245,6 +245,11 @@ void LabEngine::updateEvents() { Common::Error LabEngine::loadGameState(int slot) { bool result = loadGame(slot); + _curFileName = " "; + _closeDataPtr = nullptr; + _mainDisplay = true; + _followingCrumbs = false; + _event->simulateLeftClick(); return (result) ? Common::kNoError : Common::kUserCanceled; } diff --git a/engines/lab/lab.h b/engines/lab/lab.h index af80c904d1..2c3a723f3e 100644 --- a/engines/lab/lab.h +++ b/engines/lab/lab.h @@ -121,6 +121,8 @@ enum MessageClass { }; class LabEngine : public Engine { + friend class Console; + private: bool _interfaceOff; bool _isCrumbWaiting; |