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
This commit is contained in:
Eugene Sandulenko 2005-01-17 23:11:31 +00:00
parent dab894fdd4
commit a5c87d3620
3 changed files with 21 additions and 2 deletions

View File

@ -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

View File

@ -344,6 +344,9 @@ private:
private:
ScriptThread *_conversingThread;
public:
void finishDialog(int replyID, int flags, int bitOffset);
private:
typedef int (Script::*ScriptFunctionType)(SCRIPTFUNC_PARAMS);

View File

@ -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