From 05ccf6389804a3c45fc0049955adb5dd60c09d48 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 28 Sep 2005 15:41:21 +0000 Subject: Implement sfWaitFramesEsc() svn-id: r18894 --- saga/input.cpp | 3 ++- saga/interface.cpp | 3 +++ saga/saga.cpp | 1 + saga/scene.h | 7 +++++++ saga/script.h | 1 + saga/sfuncs.cpp | 4 +--- 6 files changed, 15 insertions(+), 4 deletions(-) (limited to 'saga') diff --git a/saga/input.cpp b/saga/input.cpp index 3d2754220a..941f27504e 100644 --- a/saga/input.cpp +++ b/saga/input.cpp @@ -1,4 +1,4 @@ -/* ScummVM - Scumm Interpreter +/* ScummVM - Scumm nterpreter * Copyright (C) 2004-2005 The ScummVM project * * The ReInherit Engine is (C)2000-2003 by Daniel Balsom. @@ -104,6 +104,7 @@ int SagaEngine::processInput() { // Actual game keys case 32: // space _actor->abortSpeech(); + _scene->cutawaySkip(); break; case 19: // pause case 'z': diff --git a/saga/interface.cpp b/saga/interface.cpp index d26456c12b..338f95e0ef 100644 --- a/saga/interface.cpp +++ b/saga/interface.cpp @@ -329,6 +329,9 @@ bool Interface::processAscii(uint16 ascii, bool synthetic) { processStatusTextInput(ascii); return true; } + + _vm->_scene->cutawaySkip(); + switch (_panelMode) { case kPanelNull: if (ascii == 27) { // Esc diff --git a/saga/saga.cpp b/saga/saga.cpp index e8500e282b..3f51ae601a 100644 --- a/saga/saga.cpp +++ b/saga/saga.cpp @@ -294,6 +294,7 @@ int SagaEngine::go() { load(fileName); _interface->setMode(kPanelMain); } else { + _script->_framesEsc = 0; _scene->startScene(); } diff --git a/saga/scene.h b/saga/scene.h index f47dac78d4..03f557c812 100644 --- a/saga/scene.h +++ b/saga/scene.h @@ -29,6 +29,7 @@ #include "saga/font.h" #include "saga/list.h" #include "saga/actor.h" +#include "saga/script.h" namespace Saga { @@ -263,6 +264,12 @@ class Scene { int currentSceneNumber() const { return _sceneNumber; } int getOutsetSceneNumber() const { return _outsetSceneNumber; } int currentSceneResourceId() const { return _sceneResourceId; } + void cutawaySkip() { + if (_vm->_scene->isInIntro()) + _vm->_script->_framesEsc = 2; + else + _vm->_script->_framesEsc = 1; + } void drawTextList(Surface *ds); private: diff --git a/saga/script.h b/saga/script.h index d35fbd7333..4b3f82a773 100644 --- a/saga/script.h +++ b/saga/script.h @@ -427,6 +427,7 @@ public: bool _skipSpeeches; bool _abortEnabled; + bool _framesEsc; VoiceLUT _globalVoiceLUT; diff --git a/saga/sfuncs.cpp b/saga/sfuncs.cpp index d5b2f1caa3..7ca39dabb1 100644 --- a/saga/sfuncs.cpp +++ b/saga/sfuncs.cpp @@ -1982,9 +1982,7 @@ void Script::sfDebugShowData(SCRIPTFUNC_PARAMS) { } void Script::sfWaitFramesEsc(SCRIPTFUNC_PARAMS) { - thread->_returnValue = 0; - - debug(0, "STUB: sfWaitFramesEsc()"); + thread->_returnValue = _framesEsc; } void Script::sf103(SCRIPTFUNC_PARAMS) { -- cgit v1.2.3