[Scummvm-cvs-logs] scummvm master -> 5c75ac98981512133b888743779fae383200be44

bluegr bluegr at gmail.com
Mon Dec 28 00:05: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:
5c75ac9898 LAB: Fix loading from the GMM and warping to rooms from the console


Commit: 5c75ac98981512133b888743779fae383200be44
    https://github.com/scummvm/scummvm/commit/5c75ac98981512133b888743779fae383200be44
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2015-12-28T01:04:28+02:00

Commit Message:
LAB: Fix loading from the GMM and warping to rooms from the console

Changed paths:
    engines/lab/console.cpp
    engines/lab/eventman.h
    engines/lab/lab.cpp
    engines/lab/lab.h



diff --git a/engines/lab/console.cpp b/engines/lab/console.cpp
index 12eafd3..35e29f2 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 cb91b12..c282f51 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 70af5e8..905f09c 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 af80c90..2c3a723 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;






More information about the Scummvm-git-logs mailing list