22 #ifndef MADS_CONVERSATIONS_H 23 #define MADS_CONVERSATIONS_H 25 #include "common/scummsys.h" 26 #include "common/array.h" 27 #include "common/str-array.h" 28 #include "mads/screen.h" 29 #include "mads/dialogs.h" 33 #define MAX_CONVERSATIONS 5 34 #define MAX_SPEAKERS 5 36 enum ConversationMode {
39 CONVMODE_WAIT_AUTO = 1,
40 CONVMODE_WAIT_ENTRY = 2,
67 ENTRYFLAG_4000 = 0x4000,
68 ENTRYFLAG_8000 = 0x8000
71 enum ConditionalOperation {
114 int *
getValue() {
return _isPtr ? _valPtr : &_val; }
119 bool isPtr()
const {
return _isPtr; }
140 ConditionalOperation _operation;
157 int get(
int paramNum)
const;
162 int evaluate()
const;
172 DialogCommand _command;
207 DialogCommand _command;
210 int16 _textLineIndex;
212 uint16 _scriptOffset;
247 uint16 _messageCount;
248 uint16 _textLineCount;
251 uint16 _speakerCount;
256 int _speakerFrame[MAX_SPEAKERS];
313 bool _speakerActive[MAX_SPEAKERS];
314 int _speakerSeries[MAX_SPEAKERS];
315 int _speakerFrame[MAX_SPEAKERS];
316 int _popupX[MAX_SPEAKERS];
317 int _popupY[MAX_SPEAKERS];
318 int _popupMaxLen[MAX_SPEAKERS];
319 InputMode _inputMode;
321 ConversationMode _currentMode;
322 ConversationMode _priorMode;
326 TriggerMode _heroTriggerMode;
327 int _interlocutorTrigger;
328 TriggerMode _interlocutorTriggerMode;
332 uint32 _startFrameNumber;
336 int _dialogNodeOffset, _dialogNodeSize;
354 void removeActiveWindow();
359 void flagEntry(DialogCommand mode,
int entryIndex);
364 ConversationMode generateMenu();
384 int executeEntry(
int index);
421 void setVariable(uint idx,
int val);
426 void setVariable(uint idx,
int *val);
431 void setStartNode(uint nodeIndex);
436 void setHeroTrigger(
int val);
441 void setInterlocutorTrigger(
int val);
447 int *getVariable(
int idx);
467 void exportPointer(
int *ptr);
472 void exportValue(
int val);
479 void update(
bool flag);
484 bool active()
const {
return _runningConv !=
nullptr; }
489 int activeConvId()
const {
return !active() ? -1 : _runningConv->_convId; }
Conditional()
Definition: conversations.h:147
bool isPtr() const
Definition: conversations.h:119
Definition: conversations.h:298
Definition: conversations.h:234
Definition: dialogs.h:101
Definition: conversations.h:272
int * getValue()
Definition: conversations.h:114
int restoreRunning() const
Definition: conversations.h:494
Definition: conversations.h:244
Definition: conversations.h:205
ScriptEntry()
Definition: conversations.h:183
Definition: conversations.h:221
Definition: conversations.h:206
bool isNumeric() const
Definition: conversations.h:124
Definition: conversations.h:127
ConversationMode currentMode() const
Definition: conversations.h:499
ConversationVar()
Definition: conversations.h:99
CondtionalParamEntry()
Definition: conversations.h:136
bool active() const
Definition: conversations.h:484
Definition: conversations.h:194
Definition: conversations.h:128
int activeConvId() const
Definition: conversations.h:489
Definition: conversations.h:309
Definition: conversations.h:129
Definition: conversations.h:91
Definition: conversations.h:165