aboutsummaryrefslogtreecommitdiff
path: root/saga
diff options
context:
space:
mode:
authorEugene Sandulenko2005-09-28 15:41:21 +0000
committerEugene Sandulenko2005-09-28 15:41:21 +0000
commit05ccf6389804a3c45fc0049955adb5dd60c09d48 (patch)
treede4b11787b9dae31e222248c90c417726b776b9c /saga
parentafe28a5b07ca41daaa84370b86588a573e4d5755 (diff)
downloadscummvm-rg350-05ccf6389804a3c45fc0049955adb5dd60c09d48.tar.gz
scummvm-rg350-05ccf6389804a3c45fc0049955adb5dd60c09d48.tar.bz2
scummvm-rg350-05ccf6389804a3c45fc0049955adb5dd60c09d48.zip
Implement sfWaitFramesEsc()
svn-id: r18894
Diffstat (limited to 'saga')
-rw-r--r--saga/input.cpp3
-rw-r--r--saga/interface.cpp3
-rw-r--r--saga/saga.cpp1
-rw-r--r--saga/scene.h7
-rw-r--r--saga/script.h1
-rw-r--r--saga/sfuncs.cpp4
6 files changed, 15 insertions, 4 deletions
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) {