aboutsummaryrefslogtreecommitdiff
path: root/engines/tinsel/tinsel.cpp
diff options
context:
space:
mode:
authorFilippos Karapetis2009-01-20 17:30:23 +0000
committerFilippos Karapetis2009-01-20 17:30:23 +0000
commitcb8ffaf3a91780518bf3fcfe1f35d60b01f19a45 (patch)
tree453684a49abd4d2cd7a16df275e6378bd6ee8fd5 /engines/tinsel/tinsel.cpp
parentf67bb6c8f127a38efac71207542a0351b321e1b7 (diff)
downloadscummvm-rg350-cb8ffaf3a91780518bf3fcfe1f35d60b01f19a45.tar.gz
scummvm-rg350-cb8ffaf3a91780518bf3fcfe1f35d60b01f19a45.tar.bz2
scummvm-rg350-cb8ffaf3a91780518bf3fcfe1f35d60b01f19a45.zip
Implemented loading from the command line and the GMM for tinsel (kSupportsLoadingDuringStartup)
svn-id: r35958
Diffstat (limited to 'engines/tinsel/tinsel.cpp')
-rw-r--r--engines/tinsel/tinsel.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/engines/tinsel/tinsel.cpp b/engines/tinsel/tinsel.cpp
index 1ddf635c3f..9481ea4859 100644
--- a/engines/tinsel/tinsel.cpp
+++ b/engines/tinsel/tinsel.cpp
@@ -509,8 +509,17 @@ void SetNewScene(SCNHANDLE scene, int entrance, int transition) {
if (!bCuttingScene && TinselV2)
WrapScene();
+ // If we're loading from the GMM, load the scene as a delayed one
+ if (loadingFromGMM) {
+ DelayedScene.scene = scene;
+ DelayedScene.entry = entrance;
+ DelayedScene.trans = transition;
+ loadingFromGMM = false;
+ return;
+ }
+
// If CD change will be required, stick in the scene change scene
- if (CdNumber(scene) != GetCurrentCD() || loadingFromGMM) {
+ if (CdNumber(scene) != GetCurrentCD()) {
// This scene gets delayed
DelayedScene.scene = scene;
DelayedScene.entry = entrance;
@@ -520,7 +529,6 @@ void SetNewScene(SCNHANDLE scene, int entrance, int transition) {
NextScene.entry = CdNumber(scene) - '0';
NextScene.trans = TRANS_FADE;
- loadingFromGMM = false;
return;
}
@@ -998,16 +1006,11 @@ Common::Error TinselEngine::go() {
//
// TODO: We might want to think about taking care of possible errors
// when loading the save state.
- //
- // TODO: This works fine when loading saves, which require a CD change
- // in DW2. It will also work for DW1. For every other save it'll fail though.
-#if 0
if (ConfMan.hasKey("save_slot")) {
loadGameState(ConfMan.getInt("save_slot"));
loadingFromGMM = true;
}
-#endif
// Foreground loop