[Scummvm-cvs-logs] SF.net SVN: scummvm:[40196] scummvm/trunk/engines/tinsel
dreammaster at users.sourceforge.net
dreammaster at users.sourceforge.net
Wed Apr 29 12:37:00 CEST 2009
Revision: 40196
http://scummvm.svn.sourceforge.net/scummvm/?rev=40196&view=rev
Author: dreammaster
Date: 2009-04-29 10:37:00 +0000 (Wed, 29 Apr 2009)
Log Message:
-----------
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.
Modified Paths:
--------------
scummvm/trunk/engines/tinsel/scene.cpp
scummvm/trunk/engines/tinsel/tinlib.cpp
scummvm/trunk/engines/tinsel/tinsel.cpp
Modified: scummvm/trunk/engines/tinsel/scene.cpp
===================================================================
--- scummvm/trunk/engines/tinsel/scene.cpp 2009-04-29 10:24:00 UTC (rev 40195)
+++ scummvm/trunk/engines/tinsel/scene.cpp 2009-04-29 10:37:00 UTC (rev 40196)
@@ -112,6 +112,9 @@
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 @@
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 @@
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)
Modified: scummvm/trunk/engines/tinsel/tinlib.cpp
===================================================================
--- scummvm/trunk/engines/tinsel/tinlib.cpp 2009-04-29 10:24:00 UTC (rev 40195)
+++ scummvm/trunk/engines/tinsel/tinlib.cpp 2009-04-29 10:37:00 UTC (rev 40196)
@@ -108,6 +108,7 @@
// in SCENE.CPP
extern void setshowpos(void);
+extern int sceneCtr;
// in TINSEL.CPP
extern void SetCdChangeScene(SCNHANDLE hScene);
@@ -1436,6 +1437,9 @@
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 @@
// TODO: Tinsel 2 comments out the 2 calls, but I'm not sure that this should be done
StopMidi();
StopSample();
+
bRestart = true;
+ sceneCtr = 0;
}
/**
Modified: scummvm/trunk/engines/tinsel/tinsel.cpp
===================================================================
--- scummvm/trunk/engines/tinsel/tinsel.cpp 2009-04-29 10:24:00 UTC (rev 40195)
+++ scummvm/trunk/engines/tinsel/tinsel.cpp 2009-04-29 10:37:00 UTC (rev 40196)
@@ -220,36 +220,7 @@
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
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list