aboutsummaryrefslogtreecommitdiff
path: root/engines/tsage
diff options
context:
space:
mode:
authorPaul Gilbert2011-05-27 19:28:31 +1000
committerPaul Gilbert2011-05-27 19:28:31 +1000
commitd50c6277e41a5280e5fe02015d497d2d29603aa9 (patch)
treebf77dbbf7cfe8d8e3418f7beeaaf6930df786ee2 /engines/tsage
parent6072f976413428d4ee9f72d0a23c8ef302a2fb99 (diff)
downloadscummvm-rg350-d50c6277e41a5280e5fe02015d497d2d29603aa9.tar.gz
scummvm-rg350-d50c6277e41a5280e5fe02015d497d2d29603aa9.tar.bz2
scummvm-rg350-d50c6277e41a5280e5fe02015d497d2d29603aa9.zip
TSAGE: Bugfix for loading savegames directly from the launcher
Diffstat (limited to 'engines/tsage')
-rw-r--r--engines/tsage/core.cpp1
-rw-r--r--engines/tsage/ringworld_logic.cpp8
-rw-r--r--engines/tsage/scenes.cpp5
3 files changed, 12 insertions, 2 deletions
diff --git a/engines/tsage/core.cpp b/engines/tsage/core.cpp
index 7534abdec7..8c1bd2fd39 100644
--- a/engines/tsage/core.cpp
+++ b/engines/tsage/core.cpp
@@ -21,6 +21,7 @@
*/
#include "common/system.h"
+#include "common/config-manager.h"
#include "engines/engine.h"
#include "graphics/palette.h"
#include "tsage/tsage.h"
diff --git a/engines/tsage/ringworld_logic.cpp b/engines/tsage/ringworld_logic.cpp
index 2141fcce5a..3f68e4673b 100644
--- a/engines/tsage/ringworld_logic.cpp
+++ b/engines/tsage/ringworld_logic.cpp
@@ -1334,8 +1334,12 @@ void RingworldGame::start() {
RING_INVENTORY._scanner._sceneNumber = 1;
RING_INVENTORY._ring._sceneNumber = 1;
- // Switch to the title screen
- _globals->_sceneManager.setNewScene(1000);
+
+ if (ConfMan.hasKey("save_slot"))
+ _globals->_sceneHandler._loadGameSlot = ConfMan.getInt("save_slot");
+ else
+ // Switch to the title screen
+ _globals->_sceneManager.setNewScene(1000);
_globals->_events.showCursor();
}
diff --git a/engines/tsage/scenes.cpp b/engines/tsage/scenes.cpp
index 11308e6c4b..d9a983cb52 100644
--- a/engines/tsage/scenes.cpp
+++ b/engines/tsage/scenes.cpp
@@ -227,6 +227,11 @@ void SceneManager::setBgOffset(const Common::Point &pt, int loadCount) {
void SceneManager::listenerSynchronize(Serializer &s) {
s.validate("SceneManager");
+ if (s.isLoading() && !_globals->_sceneManager._scene)
+ // Loading a savegame straight from the launcher, so instantiate a blank placeholder scene
+ // in order for the savegame loading to work correctly
+ _globals->_sceneManager._scene = new Scene();
+
_altSceneObjects.synchronize(s);
s.syncAsSint32LE(_sceneNumber);
s.syncAsUint16LE(_globals->_sceneManager._scene->_activeScreenNumber);