aboutsummaryrefslogtreecommitdiff
path: root/engines/lab/engine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/lab/engine.cpp')
-rw-r--r--engines/lab/engine.cpp28
1 files changed, 22 insertions, 6 deletions
diff --git a/engines/lab/engine.cpp b/engines/lab/engine.cpp
index 8f39ff52d4..20f38ef884 100644
--- a/engines/lab/engine.cpp
+++ b/engines/lab/engine.cpp
@@ -28,8 +28,9 @@
*
*/
-#include "lab/lab.h"
+#include "common/config-manager.h"
+#include "lab/lab.h"
#include "lab/anim.h"
#include "lab/dispman.h"
#include "lab/eventman.h"
@@ -404,6 +405,18 @@ void LabEngine::mainGameLoop() {
perFlipButton(actionMode);
+ // Load saved slot from the launcher, if requested
+ if (ConfMan.hasKey("save_slot")) {
+ loadGame(ConfMan.getInt("save_slot"));
+
+ // Since the intro hasn't been shown, init the background music here
+ if (getPlatform() != Common::kPlatformAmiga)
+ _music->changeMusic("Music:BackGrou", false, false);
+ else
+ _music->changeMusic("Music:BackGround", false, false);
+ _music->checkRoomMusic();
+ }
+
// Set up initial picture.
while (1) {
_event->processInput();
@@ -1020,11 +1033,14 @@ void LabEngine::go() {
else
_msgFont = _resource->getFont("F:Map.fon");
- _event->mouseHide();
- Intro *intro = new Intro(this);
- intro->play();
- delete intro;
- _event->mouseShow();
+ // If the user has requested to load a game from the launcher, skip the intro
+ if (!ConfMan.hasKey("save_slot")) {
+ _event->mouseHide();
+ Intro *intro = new Intro(this);
+ intro->play();
+ delete intro;
+ _event->mouseShow();
+ }
mainGameLoop();