diff options
| -rw-r--r-- | engines/tinsel/scene.cpp | 10 | ||||
| -rw-r--r-- | engines/tinsel/tinlib.cpp | 6 | ||||
| -rw-r--r-- | engines/tinsel/tinsel.cpp | 31 | 
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 | 
