ScummVM
text_mr.cpp
Go to the documentation of this file.
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20  *
21  */
22 
23 #include "kyra/text/text_mr.h"
24 #include "kyra/resource/resource.h"
25 
26 #include "common/system.h"
27 
28 namespace Kyra {
29 
31  : TextDisplayer(vm, screen), _vm(vm), _screen(screen) {
32 }
33 
34 char *TextDisplayer_MR::preprocessString(const char *str) {
35  if (_talkBuffer != str) {
36  assert(strlen(str) < sizeof(_talkBuffer) - 1);
37  strcpy(_talkBuffer, str);
38  }
39 
40  char *p = _talkBuffer;
41  while (*p) {
42  if (*p++ == '\r')
43  return _talkBuffer;
44  }
45 
46  p = _talkBuffer;
48  _screen->_charWidth = -2;
49 
50  const int maxTextWidth = (_vm->language() == 0) ? 176 : 240;
51  int textWidth = _screen->getTextWidth(p);
52 
53  if (textWidth > maxTextWidth) {
54  int count = 0, offs = 0;
55  if (textWidth > (3*maxTextWidth)) {
56  count = getCharLength(p, textWidth/4);
57  offs = dropCRIntoString(p, count, getCharLength(p, maxTextWidth));
58  p += count + offs;
59  // No update of textWidth here
60  }
61 
62  if (textWidth > (2*maxTextWidth)) {
63  count = getCharLength(p, textWidth/3);
64  offs = dropCRIntoString(p, count, getCharLength(p, maxTextWidth));
65  p += count + offs;
66  textWidth = _screen->getTextWidth(p);
67  }
68 
69  count = getCharLength(p, textWidth/2);
70  offs = dropCRIntoString(p, count, getCharLength(p, maxTextWidth));
71  p += count + offs;
72  textWidth = _screen->getTextWidth(p);
73 
74  if (textWidth > maxTextWidth) {
75  count = getCharLength(p, textWidth/2);
76  offs = dropCRIntoString(p, count, getCharLength(p, maxTextWidth));
77  }
78  }
79 
80  _screen->setFont(curFont);
81  return _talkBuffer;
82 }
83 
84 int TextDisplayer_MR::dropCRIntoString(char *str, int minOffs, int maxOffs) {
85  int offset = 0;
86  char *proc = str + minOffs;
87 
88  for (int i = minOffs; i < maxOffs; ++i) {
89  if (*proc == ' ') {
90  *proc = '\r';
91  return offset;
92  } else if (*proc == '-') {
93  memmove(proc+1, proc, strlen(proc)+1);
94  *(++proc) = '\r';
95  ++offset;
96  return offset;
97  }
98 
99  ++offset;
100  ++proc;
101 
102  if (!*proc)
103  return 0;
104  }
105 
106  offset = 0;
107  proc = str + minOffs;
108  for (int i = minOffs; i >= 0; --i) {
109  if (*proc == ' ') {
110  *proc = '\r';
111  return offset;
112  } else if (*proc == '-') {
113  memmove(proc+1, proc, strlen(proc)+1);
114  *(++proc) = '\r';
115  ++offset;
116  return offset;
117  }
118 
119  --offset;
120  --proc;
121 
122  if (!*proc)
123  return 0;
124  }
125 
126  *(str + minOffs) = '\r';
127  return 0;
128 }
129 
130 void TextDisplayer_MR::printText(const char *str, int x, int y, uint8 c0, uint8 c1, uint8 c2) {
131  if (_vm->_albumChatActive) {
132  c0 = 0xEE;
133  c1 = 0xE3;
134  c2 = 0x00;
135  }
136 
137  uint8 colorMap[] = { 0, 255, 240, 240 };
138  colorMap[3] = c1;
139  _screen->setTextColor(colorMap, 0, 3);
140  _screen->_charWidth = -2;
141  _screen->printText(str, x, y, c0, c2);
142  _screen->_charWidth = 0;
143 }
144 
146  _vm->restorePage3();
147  _vm->drawAnimObjects();
151 }
152 
153 void TextDisplayer_MR::calcWidestLineBounds(int &x1, int &x2, int w, int x) {
154  x1 = x;
155  x1 -= (w >> 1);
156  x2 = x1 + w + 1;
157 
158  if (x1 + w >= 311)
159  x1 = 311 - w - 1;
160 
161  if (x1 < 8)
162  x1 = 8;
163 
164  x2 = x1 + w + 1;
165 }
166 
167 #pragma mark -
168 
169 int KyraEngine_MR::chatGetType(const char *str) {
170  while (*str)
171  ++str;
172  --str;
173  switch (*str) {
174  case '!':
175  return 2;
176 
177  case ')':
178  return 3;
179 
180  case '?':
181  return 1;
182 
183  case '.':
184  default:
185  return 0;
186  }
187 }
188 
189 int KyraEngine_MR::chatCalcDuration(const char *str) {
190  return MAX<int>(120, strlen(str)*6);
191 }
192 
193 void KyraEngine_MR::objectChat(const char *str, int object, int vocHigh, int vocLow) {
194  if (_mainCharacter.animFrame == 87 || _mainCharacter.animFrame == 0xFFFF || _mainCharacter.x1 <= 0 || _mainCharacter.y1 <= 0)
195  return;
196 
197  _chatVocLow = _chatVocHigh = -1;
198  objectChatInit(str, object, vocHigh, vocLow);
199  _chatText = str;
201  int chatType = chatGetType(str);
202 
203  if (_mainCharacter.facing > 7)
205 
206  static const uint8 talkScriptTable[] = {
207  0x10, 0x11, 0x12, 0x13,
208  0x0C, 0x0D, 0x0E, 0x0F,
209  0x0C, 0x0D, 0x0E, 0x0F,
210  0x04, 0x05, 0x06, 0x07,
211  0x00, 0x01, 0x02, 0x03,
212  0x00, 0x01, 0x02, 0x03,
213  0x08, 0x09, 0x0A, 0x0B,
214  0x08, 0x09, 0x0A, 0x0B
215  };
216 
217  static const char *const talkFilenameTable[] = {
218  "MTFL00S.EMC", "MTFL00Q.EMC", "MTFL00E.EMC", "MTFL00T.EMC",
219  "MTFR00S.EMC", "MTFR00Q.EMC", "MTFR00E.EMC", "MTFR00T.EMC",
220  "MTL00S.EMC", "MTL00Q.EMC", "MTL00E.EMC", "MTL00T.EMC",
221  "MTR00S.EMC", "MTR00Q.EMC", "MTR00E.EMC", "MTR00T.EMC",
222  "MTA00S.EMC", "MTA00Q.EMC", "MTA00E.EMC", "MTA00T.EMC"
223  };
224 
225  int chat = talkScriptTable[chatType + _mainCharacter.facing * 4];
226  objectChatProcess(talkFilenameTable[chat]);
227  _text->restoreScreen();
228  // _mainCharacter.facing can not be 0xFF here, so this is safe.
231  _chatText = 0;
232  _chatObject = -1;
234 }
235 
236 void KyraEngine_MR::objectChatInit(const char *str, int object, int vocHigh, int vocLow) {
237  str = _text->preprocessString(str);
238  int lineNum = _text->buildMessageSubstrings(str);
239 
240  int xPos = 0, yPos = 0;
241 
242  if (!object) {
244  yPos = _mainCharacter.y1 - ((_mainCharacter.height * scale) >> 8) - 8;
245  xPos = _mainCharacter.x1;
246  } else {
247  yPos = _talkObjectList[object].y;
248  xPos = _talkObjectList[object].x;
249  }
250 
251  yPos -= lineNum * 10;
252  yPos = MAX(yPos, 0);
253  _text->_talkMessageY = yPos;
254  _text->_talkMessageH = lineNum*10;
255 
256  int width = _text->getWidestLineWidth(lineNum);
257  _text->calcWidestLineBounds(xPos, yPos, width, xPos);
258  _text->_talkCoords.x = xPos;
259  _text->_talkCoords.w = width + 2;
260 
261  restorePage3();
262 
264  if (_chatTextEnabled) {
265  objectChatPrintText(str, object);
267  } else {
269  }
270 
271  if (speechEnabled()) {
272  _chatVocHigh = vocHigh;
273  _chatVocLow = vocLow;
274  } else {
275  _chatVocHigh = _chatVocLow = -1;
276  }
277 }
278 
279 void KyraEngine_MR::objectChatPrintText(const char *str, int object) {
280  int c1 = _talkObjectList[object].color;
281  str = _text->preprocessString(str);
282  int lineNum = _text->buildMessageSubstrings(str);
283  int maxWidth = _text->getWidestLineWidth(lineNum);
284  int x = (object == 0) ? _mainCharacter.x1 : _talkObjectList[object].x;
285  int cX1 = 0, cX2 = 0;
286  _text->calcWidestLineBounds(cX1, cX2, maxWidth, x);
287 
288  for (int i = 0; i < lineNum; ++i) {
290 
291  int y = _text->_talkMessageY + i * 10;
292  x = _text->getCenterStringX(str, cX1, cX2);
293 
294  _text->printText(str, x, y, c1, 0xF0, 0);
295  }
296 }
297 
299  memset(&_chatScriptData, 0, sizeof(_chatScriptData));
301 
305  while (_emc->isValid(&_chatScriptState))
307 
308  if (_chatVocHigh >= 0) {
310  _chatVocHigh = _chatVocLow = -1;
311  }
312 
313  _useFrameTable = true;
315  _useFrameTable = false;
316 
318 }
319 
321  int charAnimFrame = _mainCharacter.animFrame;
323 
326 
327  bool running = true;
328  const uint32 endTime = _chatEndTime;
329  resetSkipFlag();
330 
331  while (running && !shouldQuit()) {
332  if (!_emc->isValid(&_chatScriptState))
334 
335  _animNeedUpdate = false;
338 
339  int curFrame = _animNewFrame;
340  uint32 delayTime = _animDelayTime;
341 
342  _mainCharacter.animFrame = curFrame;
344 
345  uint32 nextFrame = _system->getMillis() + delayTime * _tickLength;
346 
347  while (_system->getMillis() < nextFrame && !shouldQuit()) {
348  updateWithText();
349 
350  const uint32 curTime = _system->getMillis();
351  if ((textEnabled() && !speechEnabled() && curTime > endTime) || (speechEnabled() && !snd_voiceIsPlaying()) || skipFlag()) {
352  snd_stopVoice();
353  resetSkipFlag();
354  nextFrame = curTime;
355  running = false;
356  }
357 
358  delay(10);
359  }
360  }
361 
362  _mainCharacter.animFrame = charAnimFrame;
365 }
366 
367 void KyraEngine_MR::badConscienceChat(const char *str, int vocHigh, int vocLow) {
368  if (!_badConscienceShown)
369  return;
370 
372  _chatVocHigh = _chatVocLow = -1;
373  objectChatInit(str, 1, vocHigh, vocLow);
374  _chatText = str;
375  _chatObject = 1;
378  _text->restoreScreen();
379  update();
380  _chatText = 0;
381  _chatObject = -1;
382 }
383 
385  if (_chatVocHigh) {
387  _chatVocHigh = _chatVocLow = -1;
388  }
389 
390  bool running = true;
391  const uint32 endTime = _chatEndTime;
392  resetSkipFlag();
393 
394  uint32 nextFrame = _system->getMillis() + _rnd.getRandomNumberRng(4, 8) * _tickLength;
395 
397  while (running && !shouldQuit()) {
398  if (nextFrame < _system->getMillis()) {
399  ++frame;
402 
403  updateSceneAnim(0x0E, frame);
404  updateWithText();
405 
406  nextFrame = _system->getMillis() + _rnd.getRandomNumberRng(4, 8) * _tickLength;
407  }
408 
409  updateWithText();
410 
411  const uint32 curTime = _system->getMillis();
412  if ((textEnabled() && !speechEnabled() && curTime > endTime) || (speechEnabled() && !snd_voiceIsPlaying()) || skipFlag()) {
413  snd_stopVoice();
414  resetSkipFlag();
415  nextFrame = curTime;
416  running = false;
417  }
418 
419  delay(10);
420  }
421 }
422 
423 void KyraEngine_MR::goodConscienceChat(const char *str, int vocHigh, int vocLow) {
425  return;
426 
428  _chatVocHigh = _chatVocLow = -1;
429  objectChatInit(str, 87, vocHigh, vocLow);
430  _chatText = str;
431  _chatObject = 87;
434  _text->restoreScreen();
435  update();
436  _chatText = 0;
437  _chatObject = -1;
438 }
439 
441  if (_chatVocHigh) {
443  _chatVocHigh = _chatVocLow = -1;
444  }
445 
446  bool running = true;
447  const uint32 endTime = _chatEndTime;
448  resetSkipFlag();
449 
450  uint32 nextFrame = _system->getMillis() + _rnd.getRandomNumberRng(3, 6) * _tickLength;
451 
453  while (running && !shouldQuit()) {
454  if (nextFrame < _system->getMillis()) {
455  ++frame;
458 
459  updateSceneAnim(0x0F, frame);
460  updateWithText();
461 
462  nextFrame = _system->getMillis() + _rnd.getRandomNumberRng(3, 6) * _tickLength;
463  }
464 
465  updateWithText();
466 
467  const uint32 curTime = _system->getMillis();
468  if ((textEnabled() && !speechEnabled() && curTime > endTime) || (speechEnabled() && !snd_voiceIsPlaying()) || skipFlag()) {
469  snd_stopVoice();
470  resetSkipFlag();
471  nextFrame = curTime;
472  running = false;
473  }
474 
475  delay(10);
476  }
477 }
478 
479 void KyraEngine_MR::albumChat(const char *str, int vocHigh, int vocLow) {
480  _talkObjectList[1].x = 190;
481  _talkObjectList[1].y = 188;
482 
483  _chatVocHigh = _chatVocLow = -1;
484  _albumChatActive = true;
485  albumChatInit(str, 1, vocHigh, vocLow);
486  _albumChatActive = false;
487 
488  _chatText = str;
489  _chatObject = 1;
490  _screen->hideMouse();
492  _screen->showMouse();
493 
494  _chatText = 0;
495  _chatObject = -1;
496 }
497 
498 void KyraEngine_MR::albumChatInit(const char *str, int object, int vocHigh, int vocLow) {
499  Common::String realString;
500 
501  while (*str) {
502  if (str[0] == '\\' && str[1] == 'r') {
503  realString += '\r';
504  ++str;
505  } else {
506  realString += *str;
507  }
508 
509  ++str;
510  }
511 
512  str = realString.c_str();
513 
514  str = _text->preprocessString(str);
515  int lineNum = _text->buildMessageSubstrings(str);
516 
517  int xPos = 0, yPos = 0;
518 
519  if (!object) {
521  yPos = _mainCharacter.y1 - ((_mainCharacter.height * scale) >> 8) - 8;
522  xPos = _mainCharacter.x1;
523  } else {
524  yPos = _talkObjectList[object].y;
525  xPos = _talkObjectList[object].x;
526  }
527 
528  yPos -= lineNum * 10;
529  yPos = MAX(yPos, 0);
530  _text->_talkMessageY = yPos;
531  _text->_talkMessageH = lineNum*10;
532 
533  int width = _text->getWidestLineWidth(lineNum);
534  _text->calcWidestLineBounds(xPos, yPos, width, xPos);
535  _text->_talkCoords.x = xPos;
536  _text->_talkCoords.w = width + 2;
537 
538  _screen->hideMouse();
539 
540  if (textEnabled()) {
541  objectChatPrintText(str, object);
543  } else {
545  }
546 
547  if (speechEnabled()) {
548  _chatVocHigh = vocHigh;
549  _chatVocLow = vocLow;
550  } else {
551  _chatVocHigh = _chatVocLow = -1;
552  }
553 
554  _screen->showMouse();
555 }
556 
558  if (_chatVocHigh) {
560  _chatVocHigh = _chatVocLow = -1;
561  }
562 
563  bool running = true;
564  const uint32 endTime = _chatEndTime;
565  resetSkipFlag();
566 
567  uint32 nextFrame = 0;
568  int frame = 12;
569  while (running && !shouldQuit()) {
570  if (nextFrame < _system->getMillis()) {
571  ++frame;
572  if (frame > 22)
573  frame = 13;
574 
576  _album.wsa->displayFrame(frame, 2, -100, 90, 0x4000, 0, 0);
577  albumUpdateRect();
578 
579  nextFrame = _system->getMillis() + _rnd.getRandomNumberRng(4, 8) * _tickLength;
580  }
581 
582  if (_album.nextPage != 14)
584  else
586 
587  const uint32 curTime = _system->getMillis();
588  if ((textEnabled() && !speechEnabled() && curTime > endTime) || (speechEnabled() && !snd_voiceIsPlaying()) || skipFlag()) {
589  snd_stopVoice();
590  resetSkipFlag();
591  nextFrame = curTime;
592  running = false;
593  }
594 
595  delay(10);
596  }
597 }
598 
600  if (_noStartupChat)
601  return;
602 
605  return;
606 
607  updateDlgBuffer();
608  int vocHighBase = 0, vocHighIndex = 0, index1 = 0, index2 = 0;
609  loadDlgHeader(vocHighBase, vocHighIndex, index1, index2);
610 
611  _cnvFile->seek(index1*6, SEEK_CUR);
612  _cnvFile->seek(index2*4, SEEK_CUR);
613  _cnvFile->seek(index*2, SEEK_CUR);
614  _cnvFile->seek(_cnvFile->readUint16LE(), SEEK_SET);
615 
616  _isStartupDialog = true;
617  processDialog(vocHighIndex, vocHighBase, 0);
618  _isStartupDialog = false;
619  _newSceneDlgState[index] = true;
620 }
621 
623  if (_cnvFile)
624  _cnvFile->seek(0, SEEK_SET);
625 
627  return;
628 
631 
632  delete _cnvFile;
633  delete _dlgBuffer;
634 
635  _res->exists(cnvFile.c_str(), true);
636  _res->exists(dlgFile.c_str(), true);
637  _cnvFile = _res->createReadStream(cnvFile);
638  _dlgBuffer = _res->createReadStream(dlgFile);
639  assert(_cnvFile);
640  assert(_dlgBuffer);
641 }
642 
643 void KyraEngine_MR::loadDlgHeader(int &vocHighBase, int &vocHighIndex, int &index1, int &index2) {
644  assert(_cnvFile);
645  vocHighIndex = _cnvFile->readSint16LE();
646  vocHighBase = _cnvFile->readSint16LE();
647  index1 = _cnvFile->readSint16LE();
648  index2 = _cnvFile->readSint16LE();
649 }
650 
652  if (_mainCharacter.dlgIndex != index) {
655  _chatAltFlag = false;
657  }
658 }
659 
661  uint16 dlgIndex = _mainCharacter.dlgIndex;
662 
663  if (_currentChapter == 1) {
664  static const uint8 dlgIndexMoodNice[] = { 0x0C, 0x0E, 0x10, 0x0F, 0x11 };
665  static const uint8 dlgIndexMoodNormal[] = { 0x00, 0x02, 0x04, 0x03, 0x05 };
666  static const uint8 dlgIndexMoodEvil[] = { 0x06, 0x08, 0x0A, 0x09, 0x0B };
667 
668  if (_malcolmsMood == 0)
669  dlgIndex = dlgIndexMoodNice[_characterShapeFile];
670  else if (_malcolmsMood == 1)
671  dlgIndex = dlgIndexMoodNormal[_characterShapeFile];
672  else if (_malcolmsMood == 2)
673  dlgIndex = dlgIndexMoodEvil[_characterShapeFile];
674  } else if (_currentChapter == 2) {
675  if (dlgIndex >= 8)
676  dlgIndex -= 4;
677  if (dlgIndex >= 4)
678  dlgIndex -= 4;
679 
680  if (_malcolmsMood == 0)
681  dlgIndex += 8;
682  else if (_malcolmsMood == 2)
683  dlgIndex += 4;
684  } else if (_currentChapter == 4) {
685  if (dlgIndex >= 10)
686  dlgIndex -= 5;
687  if (dlgIndex >= 5)
688  dlgIndex -= 5;
689 
690  if (_malcolmsMood == 0)
691  dlgIndex += 10;
692  else if (_malcolmsMood == 2)
693  dlgIndex += 5;
694  }
695 
696  _mainCharacter.dlgIndex = dlgIndex;
697 }
698 
699 void KyraEngine_MR::processDialog(int vocHighIndex, int vocHighBase, int funcNum) {
700  bool running = true;
701  int script = -1;
702  int vocHigh = -1, vocLow = -1;
703 
704  while (running) {
705  uint16 cmd = _cnvFile->readUint16LE();
706  int object = cmd - 12;
707 
708  if (cmd == 10) {
709  break;
710  } else if (cmd == 4) {
711  vocHighBase = _cnvFile->readUint16LE();
712  setDlgIndex(vocHighBase);
713  } else if (cmd == 11) {
714  int strSize = _cnvFile->readUint16LE();
715  vocLow = _cnvFile->readUint16LE();
716  _cnvFile->read(_stringBuffer, strSize);
717  _stringBuffer[strSize] = 0;
718  } else {
719  vocHigh = _vocHighTable[vocHighIndex-1] + vocHighBase;
720  vocLow = _cnvFile->readUint16LE();
722 
723  if (_isStartupDialog) {
724  delay(60*_tickLength, true);
725  _isStartupDialog = false;
726  }
727 
728  if (*_stringBuffer == 0)
729  continue;
730 
731  if (cmd != 12) {
732  if (object != script) {
733  if (script >= 0) {
735  script = -1;
736  }
737 
738  dialogStartScript(object, funcNum);
739  script = object;
740  }
741 
742  npcChatSequence(_stringBuffer, object, vocHigh, vocLow);
743  } else {
744  if (script >= 0) {
746  script = -1;
747  }
748 
749  objectChat(_stringBuffer, 0, vocHigh, vocLow);
751  }
752  }
753  }
754 
755  if (script != -1)
757 }
758 
759 void KyraEngine_MR::dialogStartScript(int object, int funcNum) {
762  if (_dialogSceneAnim >= 0 && _dialogSceneScript >= 0) {
765  }
766 
769 
770  _dialogScriptFuncStart = funcNum * 3 + 0;
771  _dialogScriptFuncProc = funcNum * 3 + 1;
772  _dialogScriptFuncEnd = funcNum * 3 + 2;
773 
775  while (_emc->isValid(&_dialogScriptState))
777 }
778 
782 
783  while (_emc->isValid(&_dialogScriptState))
785 
786  if (_dialogSceneAnim >= 0 && _dialogSceneScript >= 0) {
789  }
790 
792 }
793 
794 void KyraEngine_MR::npcChatSequence(const char *str, int object, int vocHigh, int vocLow) {
795  _chatText = str;
797  _chatVocHigh = _chatVocLow = -1;
798 
799  objectChatInit(str, object, vocHigh, vocLow);
800 
801  if (_chatVocHigh >= 0 && _chatVocLow >= 0) {
803  _chatVocHigh = _chatVocLow = -1;
804  }
805 
808 
809  resetSkipFlag();
810 
811  uint32 endTime = _chatEndTime;
812  bool running = true;
813  while (running && !shouldQuit()) {
814  if (!_emc->run(&_dialogScriptState)) {
817  }
818 
819  const uint32 curTime = _system->getMillis();
820  if ((textEnabled() && !speechEnabled() && curTime > endTime) || (speechEnabled() && !snd_voiceIsPlaying()) || skipFlag()) {
821  snd_stopVoice();
822  resetSkipFlag();
823  running = false;
824  }
825  }
826  _text->restoreScreen();
827  _chatText = 0;
828  _chatObject= - 1;
829 }
830 
832  updateDlgBuffer();
833 
835 
836  int vocHighBase = 0, vocHighIndex = 0, index1 = 0, index2 = 0;
837  loadDlgHeader(vocHighBase, vocHighIndex, index1, index2);
838 
839  if (_chatAltFlag)
840  index++;
842 
843  _cnvFile->seek(index1*6, SEEK_CUR);
844  _cnvFile->seek(index*2, SEEK_CUR);
845  _cnvFile->seek(_cnvFile->readUint16LE(), SEEK_SET);
846 
847  processDialog(vocHighIndex, vocHighBase, 0);
848 }
849 
850 void KyraEngine_MR::doDialog(int dlgIndex, int funcNum) {
851  switch (_currentChapter-2) {
852  case 0:
853  dlgIndex -= 34;
854  break;
855 
856  case 1:
857  dlgIndex -= 54;
858  break;
859 
860  case 2:
861  dlgIndex -= 55;
862  break;
863 
864  case 3:
865  dlgIndex -= 70;
866  break;
867 
868  default:
869  break;
870  }
871 
872  updateDlgBuffer();
873 
874  int vocHighBase = 0, vocHighIndex = 0, index1 = 0, index2 = 0;
875  loadDlgHeader(vocHighBase, vocHighIndex, index1, index2);
876 
877  int convState = _conversationState[dlgIndex][vocHighBase];
878  uint32 offset = ((vocHighIndex == 1) ? dlgIndex - 1 : dlgIndex) * 6;
879  if (convState == -1) {
880  _cnvFile->seek(offset, SEEK_CUR);
881  _conversationState[dlgIndex][vocHighBase] = 0;
882  } else if (convState == 0 || convState == 2) {
883  _cnvFile->seek(offset+2, SEEK_CUR);
884  _conversationState[dlgIndex][vocHighBase] = 1;
885  } else {
886  _cnvFile->seek(offset+4, SEEK_CUR);
887  _conversationState[dlgIndex][vocHighBase] = 2;
888  }
889 
890  _cnvFile->seek(_cnvFile->readUint16LE(), SEEK_SET);
891 
892  processDialog(vocHighIndex, vocHighBase, funcNum);
893 }
894 
895 } // End of namespace Kyra
Kyra::KyraEngine_MR::updateDlgIndex
void updateDlgIndex()
Definition: text_mr.cpp:660
Kyra::KyraEngine_MR::objectChatInit
void objectChatInit(const char *text, int object, int vocHigh, int vocLow)
Definition: text_mr.cpp:236
Kyra::KyraEngine_MR::restorePage3
void restorePage3() override
Definition: animator_mr.cpp:31
Kyra::KyraEngine_MR::_talkObjectList
TalkObject * _talkObjectList
Definition: kyra_mr.h:412
Kyra
This is the namespace of the Kyra engine.
Definition: chargen.cpp:37
Kyra::TextDisplayer::_talkMessageY
uint16 _talkMessageY
Definition: text.h:53
Kyra::TextDisplayer::buildMessageSubstrings
int buildMessageSubstrings(const char *str)
Definition: text.cpp:124
Kyra::KyraEngine_MR::_conversationState
int8 _conversationState[30][30]
Definition: kyra_mr.h:440
Kyra::KyraEngine_MR::goodConscienceChat
void goodConscienceChat(const char *str, int vocHigh, int vocLow)
Definition: text_mr.cpp:423
Kyra::KyraEngine_MR::_goodConscienceShown
bool _goodConscienceShown
Definition: kyra_mr.h:484
Kyra::KyraEngine_MR::getScale
int getScale(int x, int y) override
Definition: kyra_mr.cpp:1218
Kyra::EMCInterpreter::start
bool start(EMCState *script, int function)
Definition: script.cpp:155
Kyra::KyraEngine_MR::playVoice
void playVoice(int high, int low)
Definition: kyra_mr.cpp:450
Glk::Level9::scale
int scale
Definition: level9_main.cpp:117
Kyra::KyraEngine_MR::albumUpdateRect
void albumUpdateRect()
Definition: gui_mr.cpp:948
Kyra::KyraEngine_MR::objectChatPrintText
void objectChatPrintText(const char *text, int object)
Definition: text_mr.cpp:279
Kyra::EMCInterpreter::init
void init(EMCState *scriptState, const EMCData *data)
Definition: script.cpp:147
Kyra::TextDisplayer_MR::_vm
KyraEngine_MR * _vm
Definition: text_mr.h:46
Kyra::Screen::showMouse
void showMouse()
Definition: screen.cpp:2984
Kyra::KyraEngine_v2::Character::animFrame
uint16 animFrame
Definition: kyra_v2.h:322
Glk::Hugo::object
Definition: hugo_types.h:35
Common::ReadStream::readSint16LE
FORCEINLINE int16 readSint16LE()
Read a signed 16-bit word stored in little endian (LSB first) order from the stream and return it.
Definition: stream.h:419
Kyra::EMCInterpreter::run
bool run(EMCState *script)
Definition: script.cpp:181
x
x
Definition: soft_render_surface.inl:123
Kyra::KyraEngine_MR::_newSceneDlgState
byte _newSceneDlgState[40]
Definition: kyra_mr.h:439
Kyra::KyraEngine_MR::updateWithText
void updateWithText() override
Definition: kyra_mr.cpp:1058
Kyra::KyraEngine_MR::TalkObject::x
int16 x
Definition: kyra_mr.h:407
Kyra::KyraEngine_MR::_useFrameTable
bool _useFrameTable
Definition: kyra_mr.h:494
Kyra::TextDisplayer
Definition: text.h:33
Kyra::KyraEngine_v2::_chatScriptState
EMCState _chatScriptState
Definition: kyra_v2.h:353
Kyra::KyraEngine_MR::_opcodesDialog
Common::Array< const Opcode * > _opcodesDialog
Definition: kyra_mr.h:466
Common::SeekableReadStream::seek
virtual bool seek(int32 offset, int whence=SEEK_SET)=0
Sets the stream position indicator for the stream.
Kyra::KyraEngine_MR::update
void update() override
Definition: kyra_mr.cpp:1046
Kyra::KyraEngine_v1::_emc
EMCInterpreter * _emc
Definition: kyra_v1.h:268
Cruise::_vm
CruiseEngine * _vm
Definition: cruise.cpp:41
Kyra::KyraEngine_MR
Definition: kyra_mr.h:43
Engine::shouldQuit
static bool shouldQuit()
Return whether the ENGINE should quit respectively should return to the launcher.
Definition: engine.cpp:791
Kyra::KyraEngine_MR::refreshAnimObjects
void refreshAnimObjects(int force) override
Definition: animator_mr.cpp:142
Engine::_system
OSystem * _system
Definition: engine.h:62
Kyra::KyraEngine_v2::_mainCharacter
Character _mainCharacter
Definition: kyra_v2.h:330
Kyra::KyraEngine_MR::TalkObject::sceneAnim
int8 sceneAnim
Definition: kyra_mr.h:405
Common::String
Simple string class for ScummVM.
Definition: str.h:49
Kyra::KyraEngine_v2::Character::sceneId
uint16 sceneId
Definition: kyra_v2.h:318
Kyra::KyraEngine_MR::_curDlgIndex
int _curDlgIndex
Definition: kyra_mr.h:447
Kyra::KyraEngine_v2::_chatObject
int _chatObject
Definition: kyra_v2.h:347
Kyra::KyraEngine_MR::_dlgBuffer
Common::SeekableReadStream * _dlgBuffer
Definition: kyra_mr.h:446
uint32
unsigned int uint32
Definition: cdtypes.h:26
Kyra::TextDisplayer::maxSubstringLen
int maxSubstringLen() const
Definition: text.h:38
Kyra::KyraEngine_MR::objectChat
void objectChat(const char *text, int object, int vocHigh, int vocLow)
Definition: text_mr.cpp:193
Kyra::KyraEngine_v2::Character::x1
int16 x1
Definition: kyra_v2.h:325
Kyra::Screen::setTextColor
void setTextColor(const uint8 *cmap, int a, int b)
Definition: screen.cpp:1293
Kyra::TextDisplayer_MR::TextDisplayer_MR
TextDisplayer_MR(KyraEngine_MR *vm, Screen_MR *screen)
Definition: text_mr.cpp:30
index
SceneIndex index
Definition: action.cpp:432
Kyra::TextDisplayer::TalkCoords::w
uint16 w
Definition: text.h:62
Kyra::KyraEngine_MR::_noStartupChat
bool _noStartupChat
Definition: kyra_mr.h:358
Kyra::TextDisplayer::TalkCoords::x
uint16 x
Definition: text.h:62
Kyra::KyraEngine_MR::albumChatWaitToFinish
void albumChatWaitToFinish()
Definition: text_mr.cpp:557
Kyra::TextDisplayer_MR::calcWidestLineBounds
void calcWidestLineBounds(int &x1, int &x2, int w, int x) override
Definition: text_mr.cpp:153
Kyra::KyraEngine_v2::Character::height
uint8 height
Definition: kyra_v2.h:320
Kyra::KyraEngine_MR::_screen
Screen_MR * _screen
Definition: kyra_mr.h:82
Kyra::KyraEngine_v2::_chatVocHigh
int _chatVocHigh
Definition: kyra_v2.h:349
Kyra::KyraEngine_v2::_opcodesAnimation
Common::Array< const Opcode * > _opcodesAnimation
Definition: kyra_v2.h:227
Kyra::KyraEngine_MR::chatCalcDuration
int chatCalcDuration(const char *text)
Definition: text_mr.cpp:189
Kyra::KyraEngine_MR::_chapterLowestScene
static const uint8 _chapterLowestScene[]
Definition: kyra_mr.h:511
Kyra::KyraEngine_MR::TalkObject::color
uint8 color
Definition: kyra_mr.h:408
width
uint16 width
Definition: thumbnail.cpp:41
Kyra::TextDisplayer_MR::restoreScreen
void restoreScreen()
Definition: text_mr.cpp:145
Kyra::KyraEngine_v2::_animShapeHeight
int _animShapeHeight
Definition: kyra_v2.h:245
Kyra::KyraEngine_v2::_chatScriptData
EMCData _chatScriptData
Definition: kyra_v2.h:352
Kyra::KyraEngine_MR::objectChatProcess
void objectChatProcess(const char *script)
Definition: text_mr.cpp:298
Kyra::KyraEngine_v2::_animNeedUpdate
bool _animNeedUpdate
Definition: kyra_v2.h:248
Kyra::KyraEngine_v1::_res
Resource * _res
Definition: kyra_v1.h:263
Kyra::TextDisplayer_MR::printText
void printText(const char *str, int x, int y, uint8 c0, uint8 c1, uint8 c2) override
Definition: text_mr.cpp:130
Kyra::KyraEngine_MR::resetSkipFlag
void resetSkipFlag(bool removeEvent=true) override
Definition: kyra_mr.cpp:1366
uint8
unsigned char uint8
Definition: cdtypes.h:28
Kyra::Screen::FID_8_FNT
Definition: screen.h:382
Kyra::KyraEngine_MR::setCharacterAnimDim
void setCharacterAnimDim(int w, int h) override
Definition: animator_mr.cpp:409
Kyra::KyraEngine_MR::doDialog
void doDialog(int dlgIndex, int funcNum)
Definition: text_mr.cpp:850
Kyra::TextDisplayer_MR::preprocessString
char * preprocessString(const char *str) override
Definition: text_mr.cpp:34
Kyra::KyraEngine_v2::delay
void delay(uint32 time, bool update=false, bool isMainLoop=false) override
Definition: kyra_v2.cpp:149
frame
ShapeFrame * frame
Definition: soft_render_surface.inl:184
Kyra::KyraEngine_MR::objectChatWaitToFinish
void objectChatWaitToFinish()
Definition: text_mr.cpp:320
Kyra::KyraEngine_MR::_badConscienceShown
bool _badConscienceShown
Definition: kyra_mr.h:475
Kyra::Screen::setFont
FontId setFont(FontId fontId)
Definition: screen.cpp:1342
Kyra::KyraEngine_MR::badConscienceChat
void badConscienceChat(const char *str, int vocHigh, int vocLow)
Definition: text_mr.cpp:367
Kyra::KyraEngine_MR::_album
struct Kyra::KyraEngine_MR::Album _album
Kyra::KyraEngine_MR::resetCharacterAnimDim
void resetCharacterAnimDim() override
Definition: animator_mr.cpp:422
Ultima::Std::memset
void memset(void *data, byte val, size_t count)
Definition: misc.cpp:29
Common::ReadStream::read
virtual uint32 read(void *dataPtr, uint32 dataSize)=0
Read data from the stream.
Kyra::KyraEngine_MR::updateCharacterAnim
void updateCharacterAnim(int charId) override
Definition: animator_mr.cpp:233
Neverhood::x1
int16 x1
Definition: module1400_sprites.cpp:667
Kyra::KyraEngine_MR::_characterFrameTable
static const uint8 _characterFrameTable[]
Definition: kyra_mr.h:388
Kyra::KyraEngine_v2::flagAnimObjsForRefresh
void flagAnimObjsForRefresh()
Definition: animator_v2.cpp:127
Kyra::KyraEngine_MR::_badConscienceAnim
int _badConscienceAnim
Definition: kyra_mr.h:476
Kyra::TextDisplayer_MR::_screen
Screen_MR * _screen
Definition: text_mr.h:47
Kyra::KyraEngine_v2::_animDelayTime
int _animDelayTime
Definition: kyra_v2.h:241
OSystem::getMillis
virtual uint32 getMillis(bool skipRecord=false)=0
Get the number of milliseconds since the program was started.
Kyra::KyraEngine_MR::snd_voiceIsPlaying
bool snd_voiceIsPlaying() override
Definition: kyra_mr.cpp:461
Cruise::screen
char screen[320 *200]
Definition: gfxModule.cpp:39
Kyra::KyraEngine_MR::_dialogSceneAnim
int _dialogSceneAnim
Definition: kyra_mr.h:457
Kyra::Screen::FontId
FontId
Definition: screen.h:380
MAX
T MAX(T a, T b)
Definition: util.h:50
Kyra::KyraEngine_v2::_animShapeWidth
int _animShapeWidth
Definition: kyra_v2.h:245
Common::String::format
static String format(const char *fmt,...) GCC_PRINTF(1
Print formatted data into a String object.
Definition: str.cpp:641
Kyra::EMCInterpreter::isValid
bool isValid(EMCState *script)
Definition: script.cpp:175
Kyra::KyraEngine_MR::_dialogSceneScript
int _dialogSceneScript
Definition: kyra_mr.h:458
Kyra::KyraEngine_v1::speechEnabled
bool speechEnabled()
Definition: kyra_v1.cpp:633
Neverhood::x2
int16 x2
Definition: module1400_sprites.cpp:667
Kyra::KyraEngine_MR::_text
TextDisplayer_MR * _text
Definition: kyra_mr.h:657
Kyra::KyraEngine_MR::updateSceneAnim
void updateSceneAnim(int anim, int newFrame) override
Definition: animator_mr.cpp:278
Kyra::TextDisplayer::getCharLength
int getCharLength(const char *str, int len)
Definition: text.cpp:54
Kyra::KyraEngine_MR::TalkObject::y
int16 y
Definition: kyra_mr.h:407
Kyra::KyraEngine_v2::_specialSceneScriptStateBackup
bool _specialSceneScriptStateBackup[10]
Definition: kyra_v2.h:216
Kyra::KyraEngine_MR::dialogEndScript
void dialogEndScript(int object)
Definition: text_mr.cpp:779
Kyra::KyraEngine_MR::_dialogScriptFuncStart
int _dialogScriptFuncStart
Definition: kyra_mr.h:459
Kyra::KyraEngine_MR::_languageExtension
static const char *const _languageExtension[]
Definition: kyra_mr.h:662
Kyra::Screen_MR
Definition: screen_mr.h:32
Kyra::KyraEngine_v1::textEnabled
bool textEnabled()
Definition: kyra_v1.cpp:637
Kyra::KyraEngine_MR::Album::wsa
WSAMovie_v2 * wsa
Definition: kyra_mr.h:539
Kyra::KyraEngine_MR::playStudioSFX
void playStudioSFX(const char *str)
Definition: kyra_mr.cpp:470
Kyra::KyraEngine_MR::albumChatInit
void albumChatInit(const char *str, int object, int vocHigh, int vocLow)
Definition: text_mr.cpp:498
Kyra::KyraEngine_v2::Character::facing
uint8 facing
Definition: kyra_v2.h:321
text_mr.h
Kyra::KyraEngine_MR::_cnvFile
Common::SeekableReadStream * _cnvFile
Definition: kyra_mr.h:445
Glk::Level9::_screen
void _screen()
Definition: level9_main.cpp:2162
Kyra::KyraEngine_MR::_dialogScriptFuncEnd
int _dialogScriptFuncEnd
Definition: kyra_mr.h:459
Kyra::KyraEngine_MR::_isStartupDialog
bool _isStartupDialog
Definition: kyra_mr.h:452
Kyra::KyraEngine_MR::badConscienceChatWaitToFinish
void badConscienceChatWaitToFinish()
Definition: text_mr.cpp:384
Kyra::KyraEngine_v2::_animNewFrame
int _animNewFrame
Definition: kyra_v2.h:240
Kyra::Screen::_charWidth
int _charWidth
Definition: screen.h:537
Kyra::TextDisplayer::getCenterStringX
int getCenterStringX(const char *str, int x1, int x2)
Definition: text.cpp:46
Kyra::KyraEngine_MR::dialogStartScript
void dialogStartScript(int object, int funcNum)
Definition: text_mr.cpp:759
Kyra::KyraEngine_v2::_specialSceneScriptState
bool _specialSceneScriptState[10]
Definition: kyra_v2.h:215
Kyra::KyraEngine_v2::_chatTextEnabled
bool _chatTextEnabled
Definition: kyra_v2.h:350
Kyra::KyraEngine_MR::_curDlgLang
int _curDlgLang
Definition: kyra_mr.h:447
Kyra::KyraEngine_MR::malcolmSceneStartupChat
void malcolmSceneStartupChat()
Definition: text_mr.cpp:599
Kyra::KyraEngine_MR::_curDlgChapter
int _curDlgChapter
Definition: kyra_mr.h:447
Kyra::KyraEngine_v2::_chatVocLow
int _chatVocLow
Definition: kyra_v2.h:349
Kyra::KyraEngine_MR::skipFlag
bool skipFlag() const override
Definition: kyra_mr.cpp:1360
Kyra::KyraEngine_v2::_chatEndTime
uint32 _chatEndTime
Definition: kyra_v2.h:348
Kyra::KyraEngine_MR::npcChatSequence
void npcChatSequence(const char *str, int object, int vocHigh, int vocLow)
Definition: text_mr.cpp:794
Kyra::EMCInterpreter::load
bool load(const char *filename, EMCData *data, const Common::Array< const Opcode * > *opcodes)
Definition: script.cpp:98
Kyra::KyraEngine_MR::Album::nextPage
int nextPage
Definition: kyra_mr.h:551
Kyra::KyraEngine_v2::Character::y1
int16 y1
Definition: kyra_v2.h:325
Kyra::KyraEngine_MR::_currentChapter
int _currentChapter
Definition: kyra_mr.h:508
Kyra::Screen::getTextWidth
int getTextWidth(const char *str)
Definition: screen.cpp:1364
Kyra::Resource::createReadStream
Common::SeekableReadStream * createReadStream(const Common::String &file)
Definition: resource.cpp:337
Glk::AGT::script
void script(uchar onp)
Definition: interface.cpp:962
Kyra::Screen::updateScreen
void updateScreen()
Definition: screen.cpp:339
offset
uint32 offset
Definition: voc.cpp:110
Kyra::KyraEngine_v2::_chatText
const char * _chatText
Definition: kyra_v2.h:346
Kyra::KyraEngine_MR::_dialogScriptData
EMCData _dialogScriptData
Definition: kyra_mr.h:455
Kyra::KyraEngine_MR::loadDlgHeader
void loadDlgHeader(int &vocHighBase, int &vocHighIndex, int &index1, int &index2)
Definition: text_mr.cpp:643
Kyra::KyraEngine_MR::setNextIdleAnimTimer
void setNextIdleAnimTimer()
Definition: timer_mr.cpp:97
Kyra::TextDisplayer::_talkMessageH
uint16 _talkMessageH
Definition: text.h:54
Kyra::KyraEngine_MR::_dialogScriptState
EMCState _dialogScriptState
Definition: kyra_mr.h:456
Kyra::KyraEngine_MR::goodConscienceChatWaitToFinish
void goodConscienceChatWaitToFinish()
Definition: text_mr.cpp:440
Kyra::KyraEngine_MR::_albumChatActive
bool _albumChatActive
Definition: kyra_mr.h:432
Common::ReadStream::readUint16LE
uint16 readUint16LE()
Read an unsigned 16-bit word stored in little endian (LSB first) order from the stream and return it.
Definition: stream.h:341
Kyra::KyraEngine_v2::Character::dlgIndex
int16 dlgIndex
Definition: kyra_v2.h:319
system.h
y
y
Definition: soft_render_surface.inl:124
Kyra::KyraEngine_v2::_characterShapeFile
int _characterShapeFile
Definition: kyra_v2.h:263
Kyra::KyraEngine_MR::albumChat
void albumChat(const char *str, int vocHigh, int vocLow)
Definition: text_mr.cpp:479
Kyra::TextDisplayer::_talkBuffer
char _talkBuffer[1040]
Definition: text.h:73
Kyra::KyraEngine_v1::_tickLength
uint16 _tickLength
Definition: kyra_v1.h:312
DS::getMillis
int getMillis(bool skipRecord)
Definition: dsmain.cpp:2279
Kyra::KyraEngine_MR::_goodConscienceAnim
int _goodConscienceAnim
Definition: kyra_mr.h:485
Kyra::KyraEngine_v1::_rnd
Common::RandomSource _rnd
Definition: kyra_v1.h:205
Ultima::Std::strlen
size_t strlen(const char *str)
Definition: misc.cpp:45
count
u32 count
Definition: disc_io.c:107
Kyra::KyraEngine_MR::albumRestoreRect
void albumRestoreRect()
Definition: gui_mr.cpp:944
Kyra::TextDisplayer::_talkCoords
TalkCoords _talkCoords
Definition: text.h:75
Kyra::KyraEngine_MR::snd_stopVoice
void snd_stopVoice() override
Definition: kyra_mr.cpp:465
Kyra::EMCInterpreter::unload
void unload(EMCData *data)
Definition: script.cpp:135
Kyra::Screen::printText
void printText(const char *str, int x, int y, uint8 color1, uint8 color2)
Definition: screen.cpp:1392
Kyra::KyraEngine_MR::_chatAltFlag
bool _chatAltFlag
Definition: kyra_mr.h:441
Kyra::KyraEngine_MR::_badConscienceFrameTable
static const uint8 _badConscienceFrameTable[]
Definition: kyra_mr.h:479
Kyra::KyraEngine_MR::chatGetType
int chatGetType(const char *text)
Definition: text_mr.cpp:169
Kyra::KyraEngine_MR::_malcolmsMood
int _malcolmsMood
Definition: kyra_mr.h:396
Kyra::KyraEngine_MR::language
int language() const
Definition: kyra_mr.h:59
Kyra::KyraEngine_MR::_stringBuffer
char * _stringBuffer
Definition: kyra_mr.h:521
uint16
unsigned short uint16
Definition: cdtypes.h:27
Kyra::KyraEngine_MR::albumUpdateAnims
void albumUpdateAnims()
Definition: gui_mr.cpp:871
Kyra::WSAMovie_v2::displayFrame
void displayFrame(int frameNum, int pageNum, int x, int y, uint16 flags, const uint8 *table1, const uint8 *table2) override
Definition: wsamovie.h:118
Kyra::Screen::hideMouse
void hideMouse()
Definition: screen.cpp:2979
resource.h
Kyra::Screen::copyRegion
void copyRegion(int x1, int y1, int x2, int y2, int w, int h, int srcPage, int dstPage, int flags=0)
Definition: screen.cpp:961
Kyra::KyraEngine_MR::processDialog
void processDialog(int vocHighIndex, int vocHighBase, int funcNum)
Definition: text_mr.cpp:699
Kyra::KyraEngine_MR::_vocHighTable
static const uint8 _vocHighTable[]
Definition: kyra_mr.h:451
Kyra::KyraEngine_MR::TalkObject::sceneScript
int8 sceneScript
Definition: kyra_mr.h:406
Kyra::KyraEngine_MR::setDlgIndex
void setDlgIndex(int index) override
Definition: text_mr.cpp:651
Kyra::KyraEngine_MR::getTableEntry
uint8 * getTableEntry(uint8 *buffer, int id)
Definition: kyra_mr.cpp:1246
Kyra::TextDisplayer::_talkSubstrings
char _talkSubstrings[TALK_SUBSTRING_LEN *TALK_SUBSTRING_NUM]
Definition: text.h:74
Kyra::KyraEngine_MR::_goodConscienceFrameTable
static const uint8 _goodConscienceFrameTable[]
Definition: kyra_mr.h:488
Kyra::TextDisplayer::getWidestLineWidth
int getWidestLineWidth(int linesCount)
Definition: text.cpp:145
filename
Common::String filename
Definition: action.cpp:1197
Kyra::KyraEngine_v2::_lang
int _lang
Definition: kyra_v2.h:95
Kyra::KyraEngine_MR::_dialogScriptFuncProc
int _dialogScriptFuncProc
Definition: kyra_mr.h:459
Kyra::KyraEngine_MR::drawAnimObjects
void drawAnimObjects() override
Definition: animator_mr.cpp:81
Kyra::TextDisplayer_MR::dropCRIntoString
int dropCRIntoString(char *str, int minOffs, int maxOffs)
Definition: text_mr.cpp:84
Kyra::KyraEngine_MR::randomSceneChat
void randomSceneChat() override
Definition: text_mr.cpp:831
Common::RandomSource::getRandomNumberRng
uint getRandomNumberRng(uint min, uint max)
Generates a random unsigned integer in the interval [min, max].
Definition: random.cpp:58
Kyra::Screen::CR_NO_P_CHECK
Definition: screen.h:364
Common::String::c_str
const char * c_str() const
Definition: str.h:206
Kyra::KyraEngine_MR::updateDlgBuffer
void updateDlgBuffer()
Definition: text_mr.cpp:622
Kyra::Resource::exists
bool exists(const char *file, bool errorOutOnFail=false)
Definition: resource.cpp:308