[Scummvm-cvs-logs] scummvm master -> 3e6e5bc0ce1d384d96b464377319ecae0a36222e
dreammaster
dreammaster at scummvm.org
Sat Dec 17 03:29:02 CET 2011
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:
3e6e5bc0ce TSAGE: Bugfix to allow loading savegames in Blue Force directly from the launcher
Commit: 3e6e5bc0ce1d384d96b464377319ecae0a36222e
https://github.com/scummvm/scummvm/commit/3e6e5bc0ce1d384d96b464377319ecae0a36222e
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2011-12-16T18:28:12-08:00
Commit Message:
TSAGE: Bugfix to allow loading savegames in Blue Force directly from the launcher
Changed paths:
engines/tsage/blue_force/blueforce_logic.cpp
diff --git a/engines/tsage/blue_force/blueforce_logic.cpp b/engines/tsage/blue_force/blueforce_logic.cpp
index 9888f4d..91cba43 100644
--- a/engines/tsage/blue_force/blueforce_logic.cpp
+++ b/engines/tsage/blue_force/blueforce_logic.cpp
@@ -20,6 +20,7 @@
*
*/
+#include "common/config-manager.h"
#include "tsage/blue_force/blueforce_logic.h"
#include "tsage/blue_force/blueforce_dialogs.h"
#include "tsage/blue_force/blueforce_scenes0.h"
@@ -42,8 +43,25 @@ namespace TsAGE {
namespace BlueForce {
void BlueForceGame::start() {
- // Start the game
- g_globals->_sceneManager.changeScene(20);
+ int slot = -1;
+
+ // Check for a savegame to load straight from the launcher
+ if (ConfMan.hasKey("save_slot")) {
+ slot = ConfMan.getInt("save_slot");
+ Common::String file = g_vm->generateSaveName(slot);
+ Common::InSaveFile *in = g_vm->_system->getSavefileManager()->openForLoading(file);
+ if (in)
+ delete in;
+ else
+ slot = -1;
+ }
+
+ if (slot >= 0)
+ // Set the savegame slot to load in the main loop
+ g_globals->_sceneHandler->_loadGameSlot = slot;
+ else
+ // Switch to the title screen
+ g_globals->_sceneManager.setNewScene(20);
}
Scene *BlueForceGame::createScene(int sceneNumber) {
More information about the Scummvm-git-logs
mailing list