aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2009-04-29 10:37:00 +0000
committerPaul Gilbert2009-04-29 10:37:00 +0000
commit4a2e5bb79356b7f3433d548ea03a0a00a464f3ad (patch)
tree0a6bcf154ff93968d74f0cce5623b5757ef31f8b /engines
parenteaf22dc66c86aaa020569a510439cbf2e49e61d4 (diff)
downloadscummvm-rg350-4a2e5bb79356b7f3433d548ea03a0a00a464f3ad.tar.gz
scummvm-rg350-4a2e5bb79356b7f3433d548ea03a0a00a464f3ad.tar.bz2
scummvm-rg350-4a2e5bb79356b7f3433d548ea03a0a00a464f3ad.zip
Re-introduced the ability to skip the title scenes in Discworld 1. Since the exact scene numbers differed between language versions, this new version simply relies on skipping the first four screens - hopefully, none of the various versions will have any extra title screens.
svn-id: r40196
Diffstat (limited to 'engines')
-rw-r--r--engines/tinsel/scene.cpp10
-rw-r--r--engines/tinsel/tinlib.cpp6
-rw-r--r--engines/tinsel/tinsel.cpp31
3 files changed, 16 insertions, 31 deletions
diff --git a/engines/tinsel/scene.cpp b/engines/tinsel/scene.cpp
index 73006d2f95..1b8195a836 100644
--- a/engines/tinsel/scene.cpp
+++ b/engines/tinsel/scene.cpp
@@ -112,6 +112,9 @@ static bool ShowPosition = false; // Set when showpos() has been called
SCNHANDLE newestScene = 0;
+int sceneCtr = 0;
+static int initialMyEscape;
+
static SCNHANDLE SceneHandle = 0; // Current scene handle - stored in case of Save_Scene()
static bool bWatchingOut = false;
@@ -152,10 +155,15 @@ static void SceneTinselProcess(CORO_PARAM, const void *param) {
CORO_BEGIN_CONTEXT;
INT_CONTEXT *pic;
const TP_INIT *pInit;
+ int myEscape;
CORO_END_CONTEXT(_ctx);
CORO_BEGIN_CODE(_ctx);
+ // The following myEscape value setting is used for enabling title screen skipping in DW1
+ if (TinselV1 && (sceneCtr == 1)) initialMyEscape = GetEscEvents();
+ _ctx->myEscape = (TinselV1 && (sceneCtr < 4)) ? initialMyEscape : 0;
+
// get the stuff copied to process when it was created
_ctx->pInit = (const TP_INIT *)param;
assert(_ctx->pInit);
@@ -167,7 +175,7 @@ static void SceneTinselProcess(CORO_PARAM, const void *param) {
NOPOLY, // No polygon
0, // No actor
NULL, // No object
- 0);
+ _ctx->myEscape);
CORO_INVOKE_1(Interpret, _ctx->pic);
if (_ctx->pInit->event == CLOSEDOWN || _ctx->pInit->event == LEAVE_T2)
diff --git a/engines/tinsel/tinlib.cpp b/engines/tinsel/tinlib.cpp
index c594699036..b4e7e14016 100644
--- a/engines/tinsel/tinlib.cpp
+++ b/engines/tinsel/tinlib.cpp
@@ -108,6 +108,7 @@ extern int NewestSavedGame(void);
// in SCENE.CPP
extern void setshowpos(void);
+extern int sceneCtr;
// in TINSEL.CPP
extern void SetCdChangeScene(SCNHANDLE hScene);
@@ -1436,6 +1437,9 @@ void NewScene(CORO_PARAM, SCNHANDLE scene, int entrance, int transition) {
else
GetControl(CONTROL_STARTOFF);
+ if (TinselV1)
+ ++sceneCtr;
+
// Prevent code subsequent to this call running before scene changes
if (g_scheduler->getCurrentPID() != PID_MASTER_SCR)
CORO_KILL_SELF();
@@ -2406,7 +2410,9 @@ void FnRestartGame(void) {
// TODO: Tinsel 2 comments out the 2 calls, but I'm not sure that this should be done
StopMidi();
StopSample();
+
bRestart = true;
+ sceneCtr = 0;
}
/**
diff --git a/engines/tinsel/tinsel.cpp b/engines/tinsel/tinsel.cpp
index a3760272b1..a267a4ae44 100644
--- a/engines/tinsel/tinsel.cpp
+++ b/engines/tinsel/tinsel.cpp
@@ -220,36 +220,7 @@ void KeyboardProcess(CORO_PARAM, const void *) {
continue;
case Common::KEYCODE_ESCAPE:
-#if 0
- if (!TinselV2) {
- // WORKAROUND: For Discworld 1, check if any of the starting logo screens are
- // active, and if so manually skip to the title screen, allowing them to be bypassed
- int sceneOffset = (_vm->getFeatures() & GF_SCNFILES) ? 1 : 0;
- int sceneNumber = (GetSceneHandle() >> SCNHANDLE_SHIFT) - sceneOffset;
- if ((g_language == TXT_GERMAN) &&
- ((sceneNumber >= 25 && sceneNumber <= 27) || (sceneNumber == 17))) {
- // Skip to title screen
- // It seems the German CD version uses scenes 25,26,27,17 for the intro,
- // instead of 13,14,15,11; also, the title screen is 11 instead of 10
- SetNewScene((11 + sceneOffset) << SCNHANDLE_SHIFT, 1, TRANS_CUT);
- } else if ((sceneNumber >= 13) && (sceneNumber <= 15) || (sceneNumber == 11)) {
- // Skip to title screen
- SetNewScene((10 + sceneOffset) << SCNHANDLE_SHIFT, 1, TRANS_CUT);
- } else {
- // Not on an intro screen, so process the key normally
- ProcessKeyEvent(PLR_ESCAPE);
- }
- } else {
- // Running Discworld 2, so process the key normally
- ProcessKeyEvent(PLR_ESCAPE);
- }
-#else
- // The above workaround is used to skip the title screens in DW1, but it can throw assertions
- // in certain versions of the game, e.g. the multilingual version with English speech and several
- // subtitles (French, German, Italian, Spanish)
- // FIXME: Add that workaround again, once we make sure it works properly in all versions of the game
- ProcessKeyEvent(PLR_ESCAPE);
-#endif
+ ProcessKeyEvent(PLR_ESCAPE);
continue;
#ifdef SLOW_RINCE_DOWN