aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2005-01-17 23:11:31 +0000
committerEugene Sandulenko2005-01-17 23:11:31 +0000
commita5c87d3620bcc37fa7496025436b3494f3133ea5 (patch)
tree7d597ffb4f23456758d20737aa4d93e1087aed72
parentdab894fdd49eef7a34f9f9f1c17c7c22741a1add (diff)
downloadscummvm-rg350-a5c87d3620bcc37fa7496025436b3494f3133ea5.tar.gz
scummvm-rg350-a5c87d3620bcc37fa7496025436b3494f3133ea5.tar.bz2
scummvm-rg350-a5c87d3620bcc37fa7496025436b3494f3133ea5.zip
Now it is possible to lead a conversation with use of keys (1-4).
Things which are missing: (a) mouse support due to incomplete interface implementation (b) arrows do not pop up by same reason mentioned above (c) scrolling does not work (d) kReplyOnce flag is missing due to wrong threads memory implementation svn-id: r16589
-rw-r--r--saga/interface.cpp3
-rw-r--r--saga/script.h3
-rw-r--r--saga/sfuncs.cpp17
3 files changed, 21 insertions, 2 deletions
diff --git a/saga/interface.cpp b/saga/interface.cpp
index 30b4f751a1..57eb1dbca4 100644
--- a/saga/interface.cpp
+++ b/saga/interface.cpp
@@ -940,8 +940,7 @@ void Interface::converseSetPos(int key) {
ct = &_converseText[_conversePos];
- //finishDialog( ct->replyID, ct->replyFlags, ct->replyBit );
- // FIXME: TODO: finish dialog thread
+ _vm->_script->finishDialog(ct->replyId, ct->replyFlags, ct->replyBit);
// FIXME: TODO: Puzzle
diff --git a/saga/script.h b/saga/script.h
index b1389cfe18..a6e4c088fb 100644
--- a/saga/script.h
+++ b/saga/script.h
@@ -344,6 +344,9 @@ private:
private:
ScriptThread *_conversingThread;
+public:
+ void finishDialog(int replyID, int flags, int bitOffset);
+
private:
typedef int (Script::*ScriptFunctionType)(SCRIPTFUNC_PARAMS);
diff --git a/saga/sfuncs.cpp b/saga/sfuncs.cpp
index c951692e51..ec89ab2a5e 100644
--- a/saga/sfuncs.cpp
+++ b/saga/sfuncs.cpp
@@ -1529,4 +1529,21 @@ int Script::SF_playVoice(SCRIPTFUNC_PARAMS) {
return SUCCESS;
}
+void Script::finishDialog(int replyID, int flags, int bitOffset) {
+ if (_conversingThread) {
+ _vm->_interface->setMode(kPanelNull);
+
+ _conversingThread->flags &= ~kTFlagWaiting;
+
+ _conversingThread->push(replyID);
+
+ if (flags & kReplyOnce) {
+ // TODO:
+ }
+ }
+
+ _conversingThread = NULL;
+ wakeUpThreads(kWaitTypeDialogBegin);
+}
+
} // End of namespace Saga