ScummVM
gui_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/gui/gui_mr.h"
24 #include "kyra/engine/kyra_mr.h"
25 #include "kyra/text/text_mr.h"
26 #include "kyra/resource/resource.h"
27 #include "kyra/engine/timer.h"
29 
30 #include "common/system.h"
31 
32 #include "graphics/scaler.h"
33 
34 namespace Kyra {
35 
37  _res->exists("BUTTONS.SHP", true);
38  uint8 *data = _res->fileData("BUTTONS.SHP", 0);
39  assert(data);
40  for (int i = 0; i <= 10; ++i)
41  addShapeToPool(data, 0x1C7+i, i);
42  delete[] data;
43 
44  Button::Callback callback1 = BUTTON_FUNCTOR(KyraEngine_MR, this, &KyraEngine_MR::callbackButton1);
45  Button::Callback callback2 = BUTTON_FUNCTOR(KyraEngine_MR, this, &KyraEngine_MR::callbackButton2);
46  Button::Callback callback3 = BUTTON_FUNCTOR(KyraEngine_MR, this, &KyraEngine_MR::callbackButton3);
47 
48  _gui->getScrollUpButton()->data0Callback = callback1;
49  _gui->getScrollUpButton()->data1Callback = callback2;
50  _gui->getScrollUpButton()->data2Callback = callback3;
51  _gui->getScrollDownButton()->data0Callback = callback1;
52  _gui->getScrollDownButton()->data1Callback = callback2;
53  _gui->getScrollDownButton()->data2Callback = callback3;
54 
55  _mainButtonData[0].data0Callback = callback1;
56  _mainButtonData[0].data1Callback = callback2;
57  _mainButtonData[0].data2Callback = callback3;
58 }
59 
61  const uint8 *shapePtr = 0;
62  if (button->index == 1)
63  shapePtr = getShapePtr(0x1CD);
64  else if (button->index == 22)
65  shapePtr = getShapePtr(0x1C7);
66  else if (button->index == 23)
67  shapePtr = getShapePtr(0x1CA);
68 
69  if (shapePtr)
70  _screen->drawShape(0, shapePtr, button->x, button->y, 0, 0, 0);
71 
72  return 0;
73 }
74 
76  const uint8 *shapePtr = 0;
77  if (button->index == 1)
78  shapePtr = getShapePtr(0x1CE);
79  else if (button->index == 22)
80  shapePtr = getShapePtr(0x1C9);
81  else if (button->index == 23)
82  shapePtr = getShapePtr(0x1CC);
83 
84  if (shapePtr)
85  _screen->drawShape(0, shapePtr, button->x, button->y, 0, 0, 0);
86 
87  return 0;
88 }
89 
91  const uint8 *shapePtr = 0;
92  if (button->index == 1)
93  shapePtr = getShapePtr(0x1CE);
94  else if (button->index == 22)
95  shapePtr = getShapePtr(0x1C8);
96  else if (button->index == 23)
97  shapePtr = getShapePtr(0x1CB);
98 
99  if (shapePtr)
100  _screen->drawShape(0, shapePtr, button->x, button->y, 0, 0, 0);
101 
102  return 0;
103 }
104 
105 void KyraEngine_MR::showMessage(const char *string, uint8 c0, uint8 c1) {
106  _shownMessage = string;
107 
109  _restoreCommandLine = false;
110 
111  if (string) {
112  int x = _text->getCenterStringX(string, 0, 320);
113  int pageBackUp = _screen->_curPage;
114  _screen->_curPage = 0;
115  _text->printText(string, x, _commandLineY, c0, c1, 0);
116  _screen->_curPage = pageBackUp;
119  }
120 }
121 
122 void KyraEngine_MR::showMessageFromCCode(int string, uint8 c0, int) {
123  showMessage((const char *)getTableEntry(_cCodeFile, string), c0, 0xF0);
124 }
125 
126 void KyraEngine_MR::updateItemCommand(Item item, int str, uint8 c0) {
127  char buffer[100];
128  char *src = (char *)getTableEntry(_itemFile, item);
129 
130  while (*src != ' ')
131  ++src;
132  ++src;
133 
134  *src = toupper(*src);
135 
136  strcpy(buffer, src);
137  strcat(buffer, " ");
138  strcat(buffer, (const char *)getTableEntry(_cCodeFile, str));
139 
140  showMessage(buffer, c0, 0xF0);
141 }
142 
144  if (_restoreCommandLine) {
146  _restoreCommandLine = false;
147  }
148 }
149 
151  int y = _inventoryState ? 144 : 188;
153 }
154 
156  if (_inventoryState)
157  _commandLineY = 145;
158  else
159  _commandLineY = 189;
160 }
161 
163  if (!_screen->isMouseVisible())
164  return;
165  if (queryGameFlag(3))
166  return;
167 
168  _screen->copyBlockToPage(3, 0, 0, 320, 56, _interface);
170 
171  _inventoryState = true;
172  updateCLState();
173 
174  redrawInventory(30);
175  drawMalcolmsMoodPointer(-1, 30);
176  drawScore(30, 215, 191);
177 
178  if (queryGameFlag(0x97))
179  drawJestersStaff(1, 30);
180 
181  _screen->hideMouse();
182 
183  if (_itemInHand < 0) {
184  _mouseState = -1;
186  }
187 
188  _screen->copyRegion(0, 188, 0, 0, 320, 12, 0, 2, Screen::CR_NO_P_CHECK);
189 
190  if (_inventoryScrollSpeed == -1) {
191  uint32 endTime = _system->getMillis() + _tickLength * 15;
192  int times = 0;
193  while (_system->getMillis() < endTime) {
194  _screen->copyRegion(0, 188, 0, 0, 320, 12, 0, 2, Screen::CR_NO_P_CHECK);
195  _screen->copyRegion(0, 188, 0, 0, 320, 12, 0, 2, Screen::CR_NO_P_CHECK);
196  ++times;
197  }
198 
199  times = MAX(times, 1);
200 
201  int speed = 60 / times;
202  if (speed <= 1)
204  else if (speed >= 8)
206  else
207  _inventoryScrollSpeed = speed;
208  }
209 
210  int height = 12;
211  int y = 188;
212  int times = 0;
213  uint32 waitTill = _system->getMillis() + _tickLength;
214 
215  while (y > 144) {
216  _screen->copyRegion(0, 0, 0, y, 320, height, 2, 0, Screen::CR_NO_P_CHECK);
218 
219  ++times;
220  if (_inventoryScrollSpeed == 1 && times == 3) {
221  while (waitTill > _system->getMillis())
222  _system->delayMillis(10);
223  times = 0;
224  waitTill = _system->getMillis() + _tickLength;
225  }
226 
229  }
230 
231  _screen->copyRegion(0, 0, 0, 144, 320, 56, 2, 0, Screen::CR_NO_P_CHECK);
233 
234  initMainButtonList(false);
235 
236  restorePage3();
237  _screen->showMouse();
238 }
239 
241  if (queryGameFlag(3))
242  return;
243 
244  _inventoryState = false;
245  updateCLState();
246  initMainButtonList(true);
247 
248  _screen->copyBlockToPage(3, 0, 0, 320, 56, _interface);
249  _screen->hideMouse();
250 
251  restorePage3();
253  drawAnimObjects();
254  _screen->copyRegion(0, 144, 0, 0, 320, 56, 0, 2, Screen::CR_NO_P_CHECK);
255 
256  if (_inventoryScrollSpeed == -1) {
257  uint32 endTime = _system->getMillis() + _tickLength * 15;
258  int times = 0;
259  while (_system->getMillis() < endTime) {
260  _screen->copyRegion(0, 144, 0, 0, 320, 12, 0, 2, Screen::CR_NO_P_CHECK);
261  _screen->copyRegion(0, 144, 0, 0, 320, 12, 0, 2, Screen::CR_NO_P_CHECK);
262  ++times;
263  }
264 
265  times = MAX(times, 1);
266 
267  int speed = 60 / times;
268  if (speed <= 1)
270  else if (speed >= 8)
272  else
273  _inventoryScrollSpeed = speed;
274  }
275 
276  int y = 144;
277  int y2 = 144 + _inventoryScrollSpeed;
278  uint32 waitTill = _system->getMillis() + _tickLength;
279  int times = 0;
280 
281  while (y2 < 188) {
282  _screen->copyRegion(0, 0, 0, y2, 320, 56, 2, 0, Screen::CR_NO_P_CHECK);
285 
286  ++times;
287  if (_inventoryScrollSpeed == 1 && times == 3) {
288  while (waitTill > _system->getMillis())
289  _system->delayMillis(10);
290  times = 0;
291  waitTill = _system->getMillis() + _tickLength;
292  }
293 
295  y2 += _inventoryScrollSpeed;
296  }
297 
298  _screen->copyRegion(0, 0, 0, 188, 320, 56, 2, 0, Screen::CR_NO_P_CHECK);
299  _screen->copyRegion(0, y, 0, y, 320, 188-y, 2, 0, Screen::CR_NO_P_CHECK);
300  _screen->showMouse();
301 }
302 
304  static const int stringId[] = { 0x32, 0x37, 0x3C };
305 
306  if (queryGameFlag(0x219))
307  return;
308 
309  const char *string = (const char *)getTableEntry(_cCodeFile, stringId[_malcolmsMood]);
310 
312  _screen->_charWidth = -2;
313 
314  int width = _screen->getTextWidth(string);
315 
316  _screen->_charWidth = 0;
317  _screen->setFont(oldFont);
318 
319  int pageBackUp = _screen->_curPage;
320  const int x = 280 - (width / 2);
321  int y = 0;
322  if (_inventoryState) {
323  y = 189;
324  _screen->_curPage = 0;
325  } else {
326  y = 45;
327  _screen->_curPage = 2;
328  }
329 
330  _screen->drawShape(_screen->_curPage, getShapePtr(432), 244, 189, 0, 0);
331  _text->printText(string, x, y+1, 0xFF, 0xF0, 0x00);
332  _screen->_curPage = pageBackUp;
333 }
334 
336  static const uint8 stateTable[] = {
337  1, 6, 11
338  };
339 
340  if (frame == -1)
341  frame = stateTable[_malcolmsMood];
342  if (queryGameFlag(0x219))
343  frame = 13;
344 
345  if (page == 0) {
346  _invWsa->displayFrame(frame, 0, 0, 0, 0, 0, 0);
348  } else if (page == 30) {
349  _invWsa->displayFrame(frame, 2, 0, -144, 0, 0, 0);
350  }
351 
353 }
354 
356  int y = 155;
357  if (page == 30) {
358  page = 2;
359  y -= 144;
360  }
361 
362  int shape = (type != 0) ? 454 : 453;
363  _screen->drawShape(page, getShapePtr(shape), 217, y, 0, 0);
364 }
365 
366 void KyraEngine_MR::drawScore(int page, int x, int y) {
367  if (page == 30) {
368  page = 2;
369  y -= 144;
370  }
371 
372  int shape1 = _score / 100;
373  int shape2 = (_score - shape1*100) / 10;
374  int shape3 = _score % 10;
375 
376  _screen->drawShape(page, getShapePtr(shape1+433), x, y, 0, 0);
377  x += 8;
378  _screen->drawShape(page, getShapePtr(shape2+433), x, y, 0, 0);
379  x += 8;
380  _screen->drawShape(page, getShapePtr(shape3+433), x, y, 0, 0);
381 }
382 
383 void KyraEngine_MR::drawScoreCounting(int oldScore, int newScore, int drawOld, const int x) {
384  int y = 189;
385  if (_inventoryState)
386  y -= 44;
387 
388  int old100 = oldScore / 100;
389  int old010 = (oldScore - old100*100) / 10;
390  int old001 = oldScore % 10;
391 
392  int new100 = newScore / 100;
393  int new010 = (newScore - new100*100) / 10;
394  int new001 = newScore % 10;
395 
396  if (drawOld) {
397  _screen->drawShape(0, getShapePtr(old100+433), x + 0, y, 0, 0);
398  _screen->drawShape(0, getShapePtr(old010+433), x + 8, y, 0, 0);
399  _screen->drawShape(0, getShapePtr(old001+433), x + 16, y, 0, 0);
400  }
401 
402  if (old100 != new100)
403  _screen->drawShape(0, getShapePtr(old100+443), x + 0, y, 0, 0);
404 
405  if (old010 != new010)
406  _screen->drawShape(0, getShapePtr(old010+443), x + 8, y, 0, 0);
407 
408  _screen->drawShape(0, getShapePtr(old001+443), x + 16, y, 0, 0);
409 
411 
412  _screen->drawShape(0, getShapePtr(new100+433), x + 0, y, 0, 0);
413  _screen->drawShape(0, getShapePtr(new010+433), x + 8, y, 0, 0);
414  _screen->drawShape(0, getShapePtr(new001+433), x + 16, y, 0, 0);
415 }
416 
417 int KyraEngine_MR::getScoreX(const char *str) {
419  _screen->_charWidth = -2;
420 
421  int width = _screen->getTextWidth(str);
422  int x = 160 + (width / 2) - 32;
423 
424  _screen->setFont(oldFont);
425  _screen->_charWidth = 0;
426  return x;
427 }
428 
430  int yOffset = 0;
431 
432  if (page == 30) {
433  page = 2;
434  yOffset = -144;
435  }
436 
437  int pageBackUp = _screen->_curPage;
438  _screen->_curPage = page;
439 
440  for (int i = 0; i < 10; ++i) {
441  clearInventorySlot(i, page);
442  if (_mainCharacter.inventory[i] != kItemNone) {
443  _screen->drawShape(page, getShapePtr(_mainCharacter.inventory[i]+248), _inventoryX[i], _inventoryY[i] + yOffset, 0, 0);
445  }
446  }
447 
448  _screen->_curPage = pageBackUp;
449 
450  if (page == 0 || page == 1)
452 }
453 
454 void KyraEngine_MR::clearInventorySlot(int slot, int page) {
455  int yOffset = 0;
456  if (page == 30) {
457  page = 2;
458  yOffset = -144;
459  }
460 
461  _screen->drawShape(page, getShapePtr(slot+422), _inventoryX[slot], _inventoryY[slot] + yOffset, 0, 0);
462 }
463 
464 void KyraEngine_MR::drawInventorySlot(int page, Item item, int slot) {
465  int yOffset = 0;
466  if (page == 30) {
467  page = 2;
468  yOffset = -144;
469  }
470 
471  _screen->drawShape(page, getShapePtr(item+248), _inventoryX[slot], _inventoryY[slot] + yOffset, 0, 0);
472 }
473 
477  return 0;
478 
479  const int slot = button->index - 5;
480  const Item slotItem = _mainCharacter.inventory[slot];
481  if (_itemInHand == kItemNone) {
482  if (slotItem == kItemNone)
483  return 0;
484 
485  clearInventorySlot(slot, 0);
486  snd_playSoundEffect(0x0B, 0xC8);
487  setMouseCursor(slotItem);
488  updateItemCommand(slotItem, (_lang == 1) ? getItemCommandStringPickUp(slotItem) : 0, 0xFF);
489  _itemInHand = slotItem;
491  } else if (_itemInHand == 27) {
492  if (_chatText)
493  return 0;
495  } else {
496  if (slotItem >= 0) {
497  if (itemInventoryMagic(_itemInHand, slot))
498  return 0;
499 
500  snd_playSoundEffect(0x0B, 0xC8);
501 
502  clearInventorySlot(slot, 0);
503  drawInventorySlot(0, _itemInHand, slot);
504  setMouseCursor(slotItem);
505  updateItemCommand(slotItem, (_lang == 1) ? getItemCommandStringPickUp(slotItem) : 0, 0xFF);
507  _itemInHand = slotItem;
508  } else {
509  snd_playSoundEffect(0x0C, 0xC8);
510  drawInventorySlot(0, _itemInHand, slot);
515  }
516  }
517 
518  return 0;
519 }
520 
522  if (queryGameFlag(0x219)) {
523  snd_playSoundEffect(0x0D, 0xC8);
524  return 0;
525  }
526 
527  static const uint8 frameTable[] = { 1, 6, 11 };
528 
529  if (_mouseX >= 245 && _mouseX <= 267 && _mouseY >= 159 && _mouseY <= 198)
530  _malcolmsMood = 0;
531  else if (_mouseX >= 268 && _mouseX <= 289 && _mouseY >= 159 && _mouseY <= 198)
532  _malcolmsMood = 1;
533  else if (_mouseX >= 290 && _mouseX <= 312 && _mouseY >= 159 && _mouseY <= 198)
534  _malcolmsMood = 2;
535 
536  int direction = (_invWsaFrame > frameTable[_malcolmsMood]) ? -1 : 1;
537 
538  if (_invWsaFrame != frameTable[_malcolmsMood]) {
539  _screen->hideMouse();
540  setGameFlag(3);
541 
542  snd_playSoundEffect(0x2E, 0xC8);
543 
544  while (_invWsaFrame != frameTable[_malcolmsMood]) {
545  uint32 endTime = _system->getMillis() + 2 * _tickLength;
547 
550 
551  while (endTime > _system->getMillis()) {
552  update();
553  _system->delayMillis(10);
554  }
555  }
556 
557  resetGameFlag(3);
558  _screen->showMouse();
559 
561  updateDlgIndex();
562 
563  EMCData data;
564  EMCState state;
565  memset(&data, 0, sizeof(data));
566  memset(&state, 0, sizeof(state));
567 
568  _res->exists("_ACTOR.EMC", true);
569  _emc->load("_ACTOR.EMC", &data, &_opcodes);
570  _emc->init(&state, &data);
571  _emc->start(&state, 1);
572 
573  int vocHigh = _vocHigh;
574  _vocHigh = 200;
575  _useActorBuffer = true;
576 
577  while (_emc->isValid(&state))
578  _emc->run(&state);
579 
580  _useActorBuffer = false;
581  _vocHigh = vocHigh;
582  _emc->unload(&data);
583  }
584 
585  return 0;
586 }
587 
589  strcpy(_stringBuffer, (const char *)getTableEntry(_cCodeFile, 18));
590 
591  char *buffer = _stringBuffer;
592 
593  while (*buffer != '%')
594  ++buffer;
595 
596  buffer[0] = (_score / 100) + '0';
597  buffer[1] = ((_score % 100) / 10) + '0';
598  buffer[2] = (_score % 10) + '0';
599 
600  while (*buffer != '%')
601  ++buffer;
602 
603  buffer[0] = (_scoreMax / 100) + '0';
604  buffer[1] = ((_scoreMax % 100) / 10) + '0';
605  buffer[2] = (_scoreMax % 10) + '0';
606 
607  showMessage(_stringBuffer, 0xFF, 0xF0);
608  return 0;
609 }
610 
613  if (_itemInHand == 27) {
614  removeHandItem();
615  snd_playSoundEffect(0x0C, 0xC8);
616  drawJestersStaff(1, 0);
617  updateItemCommand(27, 2, 0xFF);
618  setGameFlag(0x97);
619  } else if (_itemInHand == kItemNone) {
620  if (queryGameFlag(0x97)) {
621  snd_playSoundEffect(0x0B, 0xC8);
622  setHandItem(27);
623  drawJestersStaff(0, 0);
624  updateItemCommand(27, 0, 0xFF);
625  resetGameFlag(0x97);
626  } else {
627  if (queryGameFlag(0x2F))
628  objectChat((const char *)getTableEntry(_cCodeFile, 20), 0, 204, 20);
629  else
630  objectChat((const char *)getTableEntry(_cCodeFile, 25), 0, 204, 25);
631  }
632  } else {
633  objectChat((const char *)getTableEntry(_cCodeFile, 30), 0, 204, 30);
634  }
635  return 0;
636 }
637 
639  if (!_screen->isMouseVisible() || queryGameFlag(4) || _mouseState != -1)
640  return;
641 
642  if (!loadLanguageFile("ALBUM.", _album.file))
643  error("Couldn't load ALBUM");
644 
645  if (!queryGameFlag(0x8B))
646  _album.wsa->open("ALBMGNTH.WSA", 1, 0);
647  _album.backUpRect = new uint8[3100];
648  assert(_album.backUpRect);
649  _album.backUpPage = new uint8[64000];
650  assert(_album.backUpPage);
652 
653  _screen->copyRegionToBuffer(0, 0, 0, 320, 200, _screenBuffer);
654  _screen->copyRegionToBuffer(4, 0, 0, 320, 200, _album.backUpPage);
655 
656  _screen->copyPalette(1, 0);
657  _screen->fadeToBlack(9);
658 
659  int itemInHand = _itemInHand;
660  removeHandItem();
661 
662  _screen->loadPalette("ALBUM.COL", _screen->getPalette(0));
663  loadAlbumPage();
665 
666  if (_album.leftPage.wsa->opened())
668 
669  if (_album.rightPage.wsa->opened())
671 
673  _screen->copyRegion(0, 0, 0, 0, 320, 200, 2, 0, Screen::CR_NO_P_CHECK);
676 
677  processAlbum();
678 
679  _screen->fadeToBlack(9);
680  _album.wsa->close();
681 
682  setHandItem(itemInHand);
683  updateMouse();
684 
685  restorePage3();
686  _screen->copyBlockToPage(0, 0, 0, 320, 200, _screenBuffer);
687  _screen->copyBlockToPage(4, 0, 0, 320, 200, _album.backUpPage);
688 
689  _screen->copyPalette(0, 1);
691 
692  delete[] _album.backUpRect;
693  _album.backUpRect = 0;
694  delete[] _album.backUpPage;
695  _album.backUpPage = 0;
696  delete[] _album.file;
697  _album.file = 0;
698 
699  _eventList.clear();
700 }
701 
704  int num = _album.curPage / 2;
705 
706  if (num == 0) {
707  filename = "ALBUM0.CPS";
708  } else if (num >= 1 && num <= 6) {
709  --num;
710  num %= 2;
711  filename = Common::String::format("ALBUM%d.CPS", num+1);
712  } else {
713  filename = "ALBUM3.CPS";
714  }
715 
716  _screen->copyRegion(0, 0, 0, 0, 320, 200, 2, 4, Screen::CR_NO_P_CHECK);
717  _screen->loadBitmap(filename.c_str(), 3, 3, 0);
718 }
719 
722 
726 
730 
731  if (_album.curPage) {
733  _album.leftPage.wsa->open(filename.c_str(), 1, 0);
735  }
736 
737  if (_album.curPage != 14) {
738  filename = Common::String::format("PAGE%x.WSA", _album.curPage+1);
741  }
742 }
743 
745  static const uint8 posY[] = {
746  0x41, 0x55, 0x55, 0x55, 0x55, 0x55, 0x5A, 0x5A,
747  0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x3C
748  };
749 
750  const int leftY = posY[_album.curPage];
751  const int rightY = posY[_album.curPage+1];
752 
753  for (int i = 0; i < 5; ++i) {
754  const char *str = (const char *)getTableEntry(_album.file, _album.curPage*5+i);
755  int y = i * 10 + leftY + 20;
756  printAlbumText(2, str, 20, y, 10);
757  }
758 
759  for (int i = 0; i < 5; ++i) {
760  const char *str = (const char *)getTableEntry(_album.file, (_album.curPage+1)*5+i);
761  int y = i * 10 + rightY + 20;
762  printAlbumText(2, str, 176, y, 10);
763  }
764 
765  albumBackUpRect();
766 }
767 
768 void KyraEngine_MR::printAlbumText(int page, const char *str, int x, int y, uint8 c0) {
769  int oldPage = _screen->_curPage;
770  _screen->_curPage = page;
771 
772  static const uint8 colorMap[] = { 0, 0x87, 0xA3, 0 };
773  _screen->setTextColor(colorMap, 0, 3);
774 
776  _screen->_charWidth = -2;
777 
778  _screen->printText(str, x, y, c0, 0);
779 
780  _screen->_charWidth = 0;
781  _screen->setFont(oldFont);
782  _screen->_curPage = oldPage;
783 }
784 
786  Button albumButtons[5];
787 
788  GUI_V2_BUTTON(albumButtons[0], 36, 0, 0, 1, 1, 1, 0x4487, 0, 130, 190, 10, 10, 0xFF, 0xF0, 0xFF, 0xF0, 0xFF, 0xF0, 0);
789  albumButtons[0].buttonCallback = BUTTON_FUNCTOR(KyraEngine_MR, this, &KyraEngine_MR::albumPrevPage);
790  GUI_V2_BUTTON(albumButtons[1], 37, 0, 0, 1, 1, 1, 0x4487, 0, 177, 190, 10, 10, 0xFF, 0xF0, 0xFF, 0xF0, 0xFF, 0xF0, 0);
791  albumButtons[1].buttonCallback = BUTTON_FUNCTOR(KyraEngine_MR, this, &KyraEngine_MR::albumNextPage);
792  GUI_V2_BUTTON(albumButtons[2], 38, 0, 0, 1, 1, 1, 0x4487, 0, 0, 0, 320, 8, 0xFF, 0xF0, 0xFF, 0xF0, 0xFF, 0xF0, 0);
793  albumButtons[2].buttonCallback = BUTTON_FUNCTOR(KyraEngine_MR, this, &KyraEngine_MR::albumClose);
794  GUI_V2_BUTTON(albumButtons[3], 39, 0, 0, 1, 1, 1, 0x4487, 0, 8, 8, 144, 180, 0xFF, 0xF0, 0xFF, 0xF0, 0xFF, 0xF0, 0);
795  albumButtons[3].buttonCallback = BUTTON_FUNCTOR(KyraEngine_MR, this, &KyraEngine_MR::albumPrevPage);
796  GUI_V2_BUTTON(albumButtons[4], 40, 0, 0, 1, 1, 1, 0x4487, 0, 170, 8, 142, 180, 0xFF, 0xF0, 0xFF, 0xF0, 0xFF, 0xF0, 0);
797  albumButtons[4].buttonCallback = BUTTON_FUNCTOR(KyraEngine_MR, this, &KyraEngine_MR::albumNextPage);
798 
799  Button *buttonList = 0;
800  for (int i = 0; i < 5; ++i)
801  buttonList = _gui->addButtonToList(buttonList, &albumButtons[i]);
802 
804  albumNewPage();
805  _album.running = true;
806 
807  while (_album.running && !shouldQuit()) {
808  updateInput();
809  checkInput(buttonList);
810  removeInputTop();
811 
812  if (_album.curPage != _album.nextPage) {
813  int oldPage = _album.curPage;
815 
818 
819  loadAlbumPage();
821 
822  if (_album.leftPage.wsa->opened())
824 
825  if (_album.rightPage.wsa->opened())
827 
829 
830  snd_playSoundEffect(0x85, 0x80);
831  albumSwitchPages(oldPage, _album.nextPage, 4);
832 
834  albumNewPage();
835 
836  _eventList.clear();
837  }
838 
840  _system->delayMillis(10);
841  }
842 
845 }
846 
848  int page = _album.nextPage / 2;
849  if (!queryGameFlag(0x84+page)) {
850  albumAnim1();
851  delayWithTicks(8);
852 
853  int id = _album.curPage / 2 + 100;
854  albumChat((const char *)getTableEntry(_album.file, id), 205, id);
855 
856  if (id == 107) {
857  _screen->copyRegion(76, 100, 76, 100, 244, 100, 2, 0, Screen::CR_NO_P_CHECK);
858  albumChat((const char *)getTableEntry(_album.file, 108), 205, 108);
859  _screen->copyRegion(76, 100, 76, 100, 244, 100, 2, 0, Screen::CR_NO_P_CHECK);
860  albumChat((const char *)getTableEntry(_album.file, 109), 205, 109);
861  }
862 
863  delayWithTicks(5);
864  albumAnim2();
865 
866  setGameFlag(0x84+page);
867  _album.isPage14 = (_album.nextPage == 14);
868  }
869 }
870 
872  if (_album.nextPage == 14 && !_album.isPage14)
873  return;
874 
875  uint32 nextRun = 0;
876 
877  nextRun = _album.leftPage.timer + 5 * _tickLength;
878  if (nextRun < _system->getMillis() && _album.leftPage.wsa->opened()) {
880  _screen->copyRegion(40, 17, 40, 17, 87, 73, 2, 0, Screen::CR_NO_P_CHECK);
881 
884 
887  if (_album.nextPage == 14) {
888  _album.isPage14 = false;
889  _album.leftPage.timer += 100000 * _tickLength;
890  } else {
891  _album.leftPage.timer += 180 * _tickLength;
892  }
893  }
894  }
895 
896  nextRun = _album.rightPage.timer + 5 * _tickLength;
897  if (nextRun < _system->getMillis() && _album.rightPage.wsa->opened()) {
899  _screen->copyRegion(194, 20, 194, 20, 85, 69, 2, 0, Screen::CR_NO_P_CHECK);
900 
903 
907  }
908  }
909 
911 }
912 
914  for (int i = 6; i >= 3; --i) {
916  _album.wsa->displayFrame(i, 2, -100, 90, 0x4000, 0, 0);
917  albumUpdateRect();
918  delayWithTicks(1);
919  }
920 
922  _album.wsa->displayFrame(14, 2, -100, 90, 0x4000, 0, 0);
923  albumUpdateRect();
924  delayWithTicks(1);
925 }
926 
928  for (int i = 3; i <= 6; ++i) {
930  _album.wsa->displayFrame(i, 2, -100, 90, 0x4000, 0, 0);
931  albumUpdateRect();
932  delayWithTicks(1);
933  }
934 
936  _screen->copyRegion(0, 100, 0, 100, 320, 100, 2, 0, Screen::CR_NO_P_CHECK);
938 }
939 
941  _screen->copyRegionToBuffer(2, 0, 146, 62, 50, _album.backUpRect);
942 }
943 
945  _screen->copyBlockToPage(2, 0, 146, 62, 50, _album.backUpRect);
946 }
947 
949  _screen->copyRegion(0, 146, 0, 146, 62, 50, 2, 0, Screen::CR_NO_P_CHECK);
951 }
952 
953 void KyraEngine_MR::albumSwitchPages(int oldPage, int newPage, int srcPage) {
954  if (newPage > oldPage) {
955  _screen->wsaFrameAnimationStep(0xA0, 0x07, 0xA0, 0x07, 0x96, 0xBA, 0x64, 0xBA, srcPage, 0, 2);
956 
957  _screen->copyRegion(260, 7, 260, 7, 50, 186, 2, 0, Screen::CR_NO_P_CHECK);
959  delayWithTicks(2);
960 
961  _screen->wsaFrameAnimationStep(0xA0, 0x07, 0xA0, 0x07, 0x96, 0xBA, 0x32, 0xBA, srcPage, 0, 2);
962 
963  _screen->copyRegion(210, 7, 210, 7, 50, 186, 2, 0, Screen::CR_NO_P_CHECK);
965  delayWithTicks(2);
966 
967  _screen->copyRegion(160, 7, 160, 7, 50, 186, 2, 0, Screen::CR_NO_P_CHECK);
969  delayWithTicks(2);
970 
971  _screen->wsaFrameAnimationStep(0x10, 0x07, 0x6E, 0x07, 0x96, 0xBA, 0x32, 0xBA, 2, 0, 2);
973  delayWithTicks(2);
974 
975  _screen->wsaFrameAnimationStep(0x10, 0x07, 0x3C, 0x07, 0x96, 0xBA, 0x64, 0xBA, 2, 0, 2);
977  delayWithTicks(2);
978 
979  _screen->copyRegion(10, 7, 10, 7, 150, 186, 2, 0, Screen::CR_NO_P_CHECK);
981  } else {
982  _screen->wsaFrameAnimationStep(0x0A, 0x07, 0x3C, 0x07, 0x96, 0xBA, 0x64, 0xBA, srcPage, 0, 2);
983 
984  _screen->copyRegion(10, 7, 10, 7, 50, 186, 2, 0, Screen::CR_NO_P_CHECK);
986  delayWithTicks(2);
987 
988  _screen->wsaFrameAnimationStep(0x0A, 0x07, 0x6E, 0x07, 0x96, 0xBA, 0x32, 0xBA, srcPage, 0, 2);
989 
990  _screen->copyRegion(60, 7, 60, 7, 50, 186, 2, 0, Screen::CR_NO_P_CHECK);
992  delayWithTicks(2);
993 
994  _screen->copyRegion(110, 7, 110, 7, 50, 186, 2, 0, Screen::CR_NO_P_CHECK);
996  delayWithTicks(2);
997 
998  _screen->wsaFrameAnimationStep(0xA0, 0x07, 0xA0, 0x07, 0x96, 0xBA, 0x32, 0xBA, 2, 0, 2);
1000  delayWithTicks(2);
1001 
1002  _screen->wsaFrameAnimationStep(0xA0, 0x07, 0xA0, 0x07, 0x96, 0xBA, 0x64, 0xBA, 2, 0, 2);
1003  _screen->updateScreen();
1004  delayWithTicks(2);
1005 
1006  _screen->copyRegion(160, 7, 160, 7, 150, 186, 2, 0, Screen::CR_NO_P_CHECK);
1007  _screen->updateScreen();
1008  }
1009 }
1010 
1012  _album.nextPage = _album.curPage + 2;
1013  if (_album.nextPage >= 16) {
1014  _album.nextPage -= 2;
1015  _album.running = false;
1016  }
1017  return 0;
1018 }
1019 
1021  _album.nextPage = _album.curPage - 2;
1022  if (_album.nextPage < 0) {
1023  _album.nextPage = 0;
1024  _album.running = false;
1025  }
1026  return 0;
1027 }
1028 
1030  _album.running = false;
1031  return 0;
1032 }
1033 
1034 #pragma mark -
1035 
1037 }
1038 
1040  uint8 screenPal[768];
1041  _screen->getRealPalette(0, screenPal);
1043 }
1044 
1046  if (!button)
1047  return;
1048 
1049  if (button->flags & 8) {
1050  button->flags &= ~8;
1051  processButton(button);
1052  }
1053 }
1054 
1056  if (!button)
1057  return;
1058 
1059  if (!(button->flags & 8)) {
1060  button->flags |= 8;
1061  processButton(button);
1062  }
1063 }
1064 
1065 const char *GUI_MR::getMenuTitle(const Menu &menu) {
1066  if (!menu.menuNameId)
1067  return 0;
1068 
1069  return (const char *)_vm->getTableEntry(_vm->_optionsFile, menu.menuNameId);
1070 }
1071 
1072 const char *GUI_MR::getMenuItemTitle(const MenuItem &menuItem) {
1073  if (!menuItem.itemId)
1074  return 0;
1075 
1076  return (const char *)_vm->getTableEntry(_vm->_optionsFile, menuItem.itemId);
1077 }
1078 
1079 const char *GUI_MR::getMenuItemLabel(const MenuItem &menuItem) {
1080  if (!menuItem.labelId)
1081  return 0;
1082 
1083  return (const char *)_vm->getTableEntry(_vm->_optionsFile, menuItem.labelId);
1084 }
1085 
1086 char *GUI_MR::getTableString(int id) {
1087  return (char *)_vm->getTableEntry(_vm->_optionsFile, id);
1088 }
1089 
1091  if (!_displayMenu)
1092  return 0;
1093 
1094  _screen->drawBox(button->x + 1, button->y + 1, button->x + button->width - 1, button->y + button->height - 1, 0xD0);
1095 
1096  return 0;
1097 }
1098 
1100  if (!_displayMenu)
1101  return 0;
1102 
1103  _screen->drawShadedBox(button->x, button->y, button->x + button->width, button->y + button->height, 0xD1, 0xCF);
1104 
1105  return 0;
1106 }
1107 void GUI_MR::resetState(int item) {
1108  _vm->_timer->resetNextRun();
1110  _isDeathMenu = false;
1111  if (!_loadedSave) {
1113  _vm->setHandItem(item);
1114  } else {
1117  _vm->_shownMessage = " ";
1118  _vm->_restoreCommandLine = false;
1119  }
1120  _buttonListChanged = true;
1121 }
1122 
1123 int GUI_MR::quitGame(Button *caller) {
1124  updateMenuButton(caller);
1125  if (choiceDialog(0x0F, 1)) {
1126  _displayMenu = false;
1127  _vm->_runFlag = false;
1128  _vm->fadeOutMusic(60);
1129  _screen->fadeToBlack(60);
1130  _screen->clearCurPage();
1131  }
1132 
1133  if (_vm->_runFlag) {
1136  }
1137 
1138  return 0;
1139 }
1140 
1143 
1145 
1146  if (!_vm->_inventoryState && button && !_vm->_menuDirectlyToLoad)
1147  return 0;
1148 
1149  _restartGame = false;
1150  _reloadTemporarySave = false;
1151 
1152  if (!_screen->isMouseVisible() && button && !_vm->_menuDirectlyToLoad)
1153  return 0;
1154 
1155  _vm->showMessage(0, 0xF0, 0xF0);
1156 
1157  if (_vm->_mouseState < -1) {
1158  _vm->_mouseState = -1;
1159  _screen->setMouseCursor(1, 1, _vm->getShapePtr(0));
1160  return 0;
1161  }
1162 
1163  int oldHandItem = _vm->_itemInHand;
1164  _screen->setMouseCursor(0, 0, _vm->getShapePtr(0));
1165 
1166  _displayMenu = true;
1167  for (int i = 0; i < 4; ++i) {
1168  if (_vm->_musicSoundChannel != i)
1170  }
1171 
1172  for (uint i = 0; i < ARRAYSIZE(_menuButtons); ++i) {
1176  }
1177 
1187 
1189 
1190  if (_vm->_menuDirectlyToLoad) {
1192 
1193  _loadedSave = false;
1194 
1196  loadMenu(0);
1198 
1199  if (_loadedSave) {
1200  if (_restartGame)
1202  } else {
1204  }
1205 
1206  resetState(-1);
1207  _vm->_menuDirectlyToLoad = false;
1208  return 0;
1209  }
1210 
1211  if (!button) {
1213  _isDeathMenu = true;
1214  } else {
1215  _isDeathMenu = false;
1216  }
1217 
1220  _madeSave = false;
1221  _loadedSave = false;
1223 
1224  if (_isDeathMenu) {
1225  while (!_screen->isMouseVisible())
1226  _screen->showMouse();
1227  }
1228 
1229  while (_displayMenu) {
1231  getInput();
1232  }
1233 
1234  if (_vm->_runFlag && !_loadedSave && !_madeSave) {
1235  restorePalette();
1237  }
1238 
1239  if (_vm->_runFlag)
1241 
1242  resetState(oldHandItem);
1243 
1245  _vm->_unkSceneScreenFlag1 = true;
1246  _vm->loadGameStateCheck(999);
1247  //_vm->_saveFileMan->removeSavefile(_vm->getSavegameFilename(999));
1248  _vm->_unkSceneScreenFlag1 = false;
1249  }
1250 
1251  return 0;
1252 }
1253 
1254 int GUI_MR::loadMenu(Button *caller) {
1256 
1257  if (!_vm->_menuDirectlyToLoad) {
1258  updateMenuButton(caller);
1261  }
1262 
1263  _savegameOffset = 0;
1266  _isLoadMenu = true;
1267  _noLoadProcess = false;
1268  _vm->_gameToLoad = -1;
1270 
1271  _screen->updateScreen();
1272  while (_isLoadMenu) {
1274  getInput();
1275  }
1276 
1277  if (_noLoadProcess) {
1278  if (!_vm->_menuDirectlyToLoad) {
1283  }
1284  } else if (_vm->_gameToLoad >= 0) {
1286  restorePalette();
1287  _vm->_menuDirectlyToLoad = false;
1289  if (_vm->_gameToLoad == 0) {
1290  _restartGame = true;
1291  _vm->runStartupScript(1, 1);
1292  }
1293  _displayMenu = false;
1294  _loadedSave = true;
1295  }
1296 
1297  return 0;
1298 }
1299 
1301  updateMenuButton(button);
1302 
1303  _vm->_gameToLoad = 999;
1306  _displayMenu = false;
1307  _loadedSave = true;
1308  return 0;
1309 }
1310 
1312  updateMenuButton(caller);
1315  bool textEnabled = _vm->textEnabled();
1316  int lang = _vm->_lang;
1317 
1320  _isOptionsMenu = true;
1321 
1322  while (_isOptionsMenu) {
1324  getInput();
1325  }
1326 
1329 
1330  if (textEnabled && !_vm->textEnabled() && !_vm->speechEnabled()) {
1331  _vm->_configVoice = 1;
1333  choiceDialog(0x1E, 0);
1334  }
1335 
1336  if (_vm->_lang != lang) {
1337  _reloadTemporarySave = true;
1338 
1339  Graphics::Surface thumb;
1340  createScreenThumbnail(thumb);
1341  _vm->saveGameStateIntern(999, "Autosave", &thumb);
1342  thumb.free();
1343 
1344  if (!_vm->loadLanguageFile("ITEMS.", _vm->_itemFile))
1345  error("Couldn't load ITEMS");
1346  if (!_vm->loadLanguageFile("SCORE.", _vm->_scoreFile))
1347  error("Couldn't load SCORE");
1348  if (!_vm->loadLanguageFile("C_CODE.", _vm->_cCodeFile))
1349  error("Couldn't load C_CODE");
1350  if (!_vm->loadLanguageFile("SCENES.", _vm->_scenesFile))
1351  error("Couldn't load SCENES");
1352  if (!_vm->loadLanguageFile("OPTIONS.", _vm->_optionsFile))
1353  error("Couldn't load OPTIONS");
1354  if (!_vm->loadLanguageFile("_ACTOR.", _vm->_actorFile))
1355  error("couldn't load _ACTOR");
1356  }
1357 
1358  _vm->writeSettings();
1359 
1362  return 0;
1363 }
1364 
1366  if (_vm->_configWalkspeed == 3)
1367  _gameOptions.item[0].itemId = 28;
1368  else
1369  _gameOptions.item[0].itemId = 27;
1370 
1371  if (_vm->textEnabled())
1372  _gameOptions.item[4].itemId = 18;
1373  else
1374  _gameOptions.item[4].itemId = 17;
1375 
1376  switch (_vm->_lang) {
1377  case 0:
1378  _gameOptions.item[1].itemId = 31;
1379  break;
1380 
1381  case 1:
1382  _gameOptions.item[1].itemId = 32;
1383  break;
1384 
1385  case 2:
1386  _gameOptions.item[1].itemId = 33;
1387  break;
1388 
1389  default:
1390  break;
1391  }
1392 
1393  if (_vm->_configStudio)
1394  _gameOptions.item[2].itemId = 18;
1395  else
1396  _gameOptions.item[2].itemId = 17;
1397 
1398  if (_vm->_configSkip)
1399  _gameOptions.item[3].itemId = 18;
1400  else
1401  _gameOptions.item[3].itemId = 17;
1402 }
1403 
1405  updateMenuButton(caller);
1406  if (!_vm->queryGameFlag(0x1B2)) {
1407  ++_vm->_lang;
1408  _vm->_lang %= 3;
1411  }
1412  return 0;
1413 }
1414 
1416  updateMenuButton(caller);
1417  _vm->_configStudio ^= 1;
1420  return 0;
1421 }
1422 
1424  updateMenuButton(caller);
1425  _vm->_configSkip ^= 1;
1428  return 0;
1429 }
1430 
1432  updateMenuButton(caller);
1433  _vm->_configHelium ^= 1;
1434  if (_vm->_configHelium)
1435  _audioOptions.item[3].itemId = 18;
1436  else
1437  _audioOptions.item[3].itemId = 17;
1439  return 0;
1440 }
1441 
1443  updateMenuButton(caller);
1444 
1447 
1448  if (_vm->_configHelium)
1449  _audioOptions.item[3].itemId = 18;
1450  else
1451  _audioOptions.item[3].itemId = 17;
1452 
1454 
1455  const int menuX = _audioOptions.x;
1456  const int menuY = _audioOptions.y;
1457 
1458  const int maxButton = 3; // 2 if voc is disabled
1459 
1460  for (int i = 0; i < maxButton; ++i) {
1461  int x = menuX + _sliderBarsPosition[i*2+0];
1462  int y = menuY + _sliderBarsPosition[i*2+1];
1463  _screen->drawShape(0, _vm->getShapePtr(0x1CF), x, y, 0, 0);
1464  drawSliderBar(i, _vm->getShapePtr(0x1D0));
1466  _sliderButtons[0][i].x = x;
1467  _sliderButtons[0][i].y = y;
1470  _sliderButtons[2][i].x = x + 10;
1471  _sliderButtons[2][i].y = y;
1474  _sliderButtons[1][i].x = x + 120;
1475  _sliderButtons[1][i].y = y;
1477  }
1478 
1479  _isOptionsMenu = true;
1481  bool speechEnabled = _vm->speechEnabled();
1482  while (_isOptionsMenu) {
1484  getInput();
1485  }
1486 
1489  if (speechEnabled && !_vm->textEnabled() && (!_vm->speechEnabled() || _vm->getVolume(KyraEngine_v1::kVolumeSpeech) == 2)) {
1490  _vm->_configVoice = 0;
1491  choiceDialog(0x1D, 0);
1492  }
1493 
1494  _vm->writeSettings();
1495 
1498  return 0;
1499 }
1500 
1502  int button = 0;
1503  if (caller->index >= 24 && caller->index <= 27)
1504  button = caller->index - 24;
1505  else if (caller->index >= 28 && caller->index <= 31)
1506  button = caller->index - 28;
1507  else
1508  button = caller->index - 32;
1509 
1510  assert(button >= 0 && button <= 3);
1511 
1512  const int oldVolume = _vm->getVolume(KyraEngine_v1::kVolumeEntry(button));
1513  int newVolume = oldVolume;
1514 
1515  if (caller->index >= 24 && caller->index <= 27)
1516  newVolume -= 10;
1517  else if (caller->index >= 28 && caller->index <= 31)
1518  newVolume += 10;
1519  else
1520  newVolume = _vm->_mouseX - caller->x - 7;
1521 
1522  newVolume = CLIP(newVolume, 2, 97);
1523 
1524  if (newVolume == oldVolume)
1525  return 0;
1526 
1527  int lastMusicCommand = -1;
1528  bool playSoundEffect = false;
1529 
1530  drawSliderBar(button, _vm->getShapePtr(0x1D1));
1531 
1532  if (button == 2) {
1533  if (_vm->textEnabled())
1534  _vm->_configVoice = 2;
1535  else
1536  _vm->_configVoice = 1;
1537  }
1538 
1539  _vm->setVolume(KyraEngine_v1::kVolumeEntry(button), newVolume);
1540 
1541  switch (button) {
1542  case 0:
1543  lastMusicCommand = _vm->_lastMusicCommand;
1544  break;
1545 
1546  case 1:
1547  playSoundEffect = true;
1548  break;
1549 
1550  case 2:
1553  _vm->playVoice(200, 943);
1554  break;
1555 
1556  default:
1557  return 0;
1558  }
1559 
1560  drawSliderBar(button, _vm->getShapePtr(0x1D0));
1561  if (playSoundEffect)
1562  _vm->snd_playSoundEffect(0x18, 0xC8);
1563  else if (lastMusicCommand >= 0)
1564  _vm->snd_playWanderScoreViaMap(lastMusicCommand, 0);
1565 
1566  _screen->updateScreen();
1567  return 0;
1568 }
1569 
1570 void GUI_MR::drawSliderBar(int slider, const uint8 *shape) {
1571  const int menuX = _audioOptions.x;
1572  const int menuY = _audioOptions.y;
1573  int x = menuX + _sliderBarsPosition[slider*2+0] + 10;
1574  int y = menuY + _sliderBarsPosition[slider*2+1];
1575 
1576  int position = _vm->getVolume(KyraEngine_v1::kVolumeEntry(slider));
1577 
1578  position = CLIP(position, 2, 97);
1579  _screen->drawShape(0, shape, x+position, y, 0, 0);
1580 }
1581 
1582 } // End of namespace Kyra
Kyra::KyraEngine_MR::updateDlgIndex
void updateDlgIndex()
Definition: text_mr.cpp:660
Kyra::KyraEngine_MR::restorePage3
void restorePage3() override
Definition: animator_mr.cpp:31
Kyra::KyraEngine_MR::loadButtonShapes
void loadButtonShapes()
Definition: gui_mr.cpp:36
Kyra::KyraEngine_MR::_configSkip
bool _configSkip
Definition: kyra_mr.h:71
Kyra
This is the namespace of the Kyra engine.
Definition: chargen.cpp:37
Kyra::GUI_MR::loadMenu
int loadMenu(Button *button)
Definition: gui_mr.cpp:1254
Kyra::GUI_v2
Definition: gui_v2.h:102
Kyra::SoundDigital_MR::stopSound
void stopSound(int channel)
Stop the playback of a sound in the given channel.
Definition: sound_digital_mr.cpp:209
Kyra::Screen::FID_BOOKFONT_FNT
Definition: screen.h:386
Kyra::GUI_MR::toggleStudioSFX
int toggleStudioSFX(Button *caller)
Definition: gui_mr.cpp:1415
Kyra::GUI_v1::updateMenuButton
void updateMenuButton(Button *button)
Definition: gui_v1.cpp:305
Kyra::KyraEngine_v1::_mouseState
int _mouseState
Definition: kyra_v1.h:348
Kyra::KyraEngine_MR::clearInventorySlot
void clearInventorySlot(int slot, int page)
Definition: gui_mr.cpp:454
Kyra::GUI_v2::_noLoadProcess
bool _noLoadProcess
Definition: gui_v2.h:183
Kyra::GUI_v2::_sliderBarsPosition
static const int _sliderBarsPosition[]
Definition: gui_v2.h:180
Kyra::GUI_v2::_choiceMenu
Menu _choiceMenu
Definition: gui_v2.h:139
Kyra::KyraEngine_MR::fadeOutMusic
void fadeOutMusic(int ticks)
Definition: kyra_mr.cpp:432
Kyra::GUI_v2::restorePage1
void restorePage1(const uint8 *buffer)
Definition: gui_v2.cpp:427
Kyra::EMCInterpreter::start
bool start(EMCState *script, int function)
Definition: script.cpp:155
Kyra::Menu::menuNameId
uint16 menuNameId
Definition: gui_v1.h:65
Kyra::KyraEngine_MR::loadAlbumPage
void loadAlbumPage()
Definition: gui_mr.cpp:702
Kyra::GUI_v2::_sliderButtons
Button _sliderButtons[3][4]
Definition: gui_v2.h:153
Kyra::KyraEngine_MR::playVoice
void playVoice(int high, int low)
Definition: kyra_mr.cpp:450
Kyra::KyraEngine_MR::_commandLineY
int _commandLineY
Definition: kyra_mr.h:241
Kyra::KyraEngine_MR::_actorFile
uint8 * _actorFile
Definition: kyra_mr.h:273
Kyra::KyraEngine_MR::_menuDirectlyToLoad
bool _menuDirectlyToLoad
Definition: kyra_mr.h:98
Kyra::KyraEngine_v1::_mouseY
int _mouseY
Definition: kyra_v1.h:276
Kyra::GUI_MR::toggleSkipSupport
int toggleSkipSupport(Button *caller)
Definition: gui_mr.cpp:1423
Kyra::KyraEngine_MR::initMainButtonList
void initMainButtonList(bool disable)
Definition: staticres.cpp:1912
Kyra::KyraEngine_MR::albumUpdateRect
void albumUpdateRect()
Definition: gui_mr.cpp:948
Kyra::KyraEngine_v2::Character::inventory
Item inventory[20]
Definition: kyra_v2.h:324
Kyra::KyraEngine_MR::drawMalcolmsMoodPointer
void drawMalcolmsMoodPointer(int frame, int page)
Definition: gui_mr.cpp:335
Kyra::Button
Definition: gui.h:39
Kyra::KyraEngine_v1::removeInputTop
void removeInputTop()
Definition: kyra_v1.cpp:491
Kyra::KyraEngine_v1::getVolume
uint8 getVolume(kVolumeEntry vol)
Definition: kyra_v1.cpp:676
Kyra::EMCInterpreter::init
void init(EMCState *scriptState, const EMCData *data)
Definition: script.cpp:147
Kyra::KyraEngine_MR::albumNextPage
int albumNextPage(Button *caller)
Definition: gui_mr.cpp:1011
Kyra::KyraEngine_MR::Album::rightPage
PageMovie rightPage
Definition: kyra_mr.h:549
Kyra::Screen::showMouse
void showMouse()
Definition: screen.cpp:2984
Kyra::KyraEngine_MR::_scoreMax
int _scoreMax
Definition: kyra_mr.h:524
Kyra::KyraEngine_MR::Album::backUpPage
uint8 * backUpPage
Definition: kyra_mr.h:537
kyra_mr.h
Kyra::EMCInterpreter::run
bool run(EMCState *script)
Definition: script.cpp:181
Kyra::GUI_MR::sliderHandler
int sliderHandler(Button *caller) override
Definition: gui_mr.cpp:1501
x
x
Definition: soft_render_surface.inl:123
Kyra::GUI_v2::_mainMenu
Menu _mainMenu
Definition: gui_v2.h:139
gui_mr.h
Kyra::GUI_v2::renewHighlight
void renewHighlight(Menu &menu)
Definition: gui_v2.cpp:410
Kyra::KyraEngine_MR::albumAnim2
void albumAnim2()
Definition: gui_mr.cpp:927
Kyra::Resource::fileData
uint8 * fileData(const char *file, uint32 *size)
Definition: resource.cpp:293
Kyra::KyraEngine_v1::loadGameStateCheck
void loadGameStateCheck(int slot)
Definition: saveload.cpp:257
Kyra::KyraEngine_MR::callbackButton1
int callbackButton1(Button *button)
Definition: gui_mr.cpp:60
Kyra::KyraEngine_v1::_configWalkspeed
uint8 _configWalkspeed
Definition: kyra_v1.h:299
Kyra::GUI_v1::processHighlights
void processHighlights(Menu &menu)
Definition: gui_v1.cpp:196
Kyra::KyraEngine_MR::Album::PageMovie::timer
uint32 timer
Definition: kyra_mr.h:546
Kyra::KyraEngine_MR::update
void update() override
Definition: kyra_mr.cpp:1046
Kyra::KyraEngine_v1::_emc
EMCInterpreter * _emc
Definition: kyra_v1.h:268
Kyra::KyraEngine_MR::_inventoryScrollSpeed
int _inventoryScrollSpeed
Definition: kyra_mr.h:245
Kyra::KyraEngine_MR::makeCharFacingMouse
void makeCharFacingMouse()
Definition: kyra_mr.cpp:1199
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::buttonInventory
int buttonInventory(Button *button)
Definition: gui_mr.cpp:474
Kyra::GUI_v1::_redrawShadedButtonFunctor
Button::Callback _redrawShadedButtonFunctor
Definition: gui_v1.h:116
Kyra::GUI_v2::_currentMenu
Menu * _currentMenu
Definition: gui_v2.h:160
Kyra::GUI_v2::_menuButtons
Button _menuButtons[7]
Definition: gui_v2.h:136
Kyra::GUI_v2::_isDeathMenu
bool _isDeathMenu
Definition: gui_v2.h:162
Kyra::KyraEngine_v2::_unkSceneScreenFlag1
bool _unkSceneScreenFlag1
Definition: kyra_v2.h:361
Engine::_system
OSystem * _system
Definition: engine.h:62
Kyra::KyraEngine_MR::callbackButton3
int callbackButton3(Button *button)
Definition: gui_mr.cpp:90
Kyra::KyraEngine_v2::_mainCharacter
Character _mainCharacter
Definition: kyra_v2.h:330
Kyra::KyraEngine_MR::itemInventoryMagic
bool itemInventoryMagic(Item handItem, int invSlot)
Definition: items_mr.cpp:460
Kyra::KyraEngine_MR::_cCodeFile
uint8 * _cCodeFile
Definition: kyra_mr.h:269
Kyra::KyraEngine_MR::callbackButton2
int callbackButton2(Button *button)
Definition: gui_mr.cpp:75
Kyra::GUI_MR::redrawButtonCallback
int redrawButtonCallback(Button *button) override
Definition: gui_mr.cpp:1090
Kyra::GUI_v2::_savegameOffset
int _savegameOffset
Definition: gui_v2.h:172
Common::SharedPtr< CallbackFunctor >
Common::String
Simple string class for ScummVM.
Definition: str.h:49
Supernova::CLIP
Definition: msn_def.h:132
Kyra::Screen::drawShadedBox
virtual void drawShadedBox(int x1, int y1, int x2, int y2, int color1, int color2)
Definition: screen.cpp:1199
height
uint16 height
Definition: thumbnail.cpp:41
Kyra::KyraEngine_v2::getShapePtr
uint8 * getShapePtr(int index) const
Definition: kyra_v2.cpp:191
Kyra::GUI_MR::setupOptionsButtons
void setupOptionsButtons() override
Definition: gui_mr.cpp:1365
Kyra::KyraEngine_v2::_runFlag
bool _runFlag
Definition: kyra_v2.h:88
Kyra::Screen::drawShape
virtual void drawShape(uint8 pageNum, const uint8 *shapeData, int x, int y, int sd, int flags,...)
Definition: screen.cpp:1492
Kyra::Menu::y
int16 y
Definition: gui_v1.h:58
uint32
unsigned int uint32
Definition: cdtypes.h:26
Kyra::KyraEngine_MR::objectChat
void objectChat(const char *text, int object, int vocHigh, int vocLow)
Definition: text_mr.cpp:193
Kyra::GUI_v2::setupSavegameNames
void setupSavegameNames(Menu &menu, int num)
Definition: gui_v2.cpp:431
Kyra::Screen::setTextColor
void setTextColor(const uint8 *cmap, int a, int b)
Definition: screen.cpp:1293
Kyra::Menu::numberOfItems
uint8 numberOfItems
Definition: gui_v1.h:72
Kyra::KyraEngine_v1::_configVoice
uint8 _configVoice
Definition: kyra_v1.h:303
Kyra::GUI_v2::_isOptionsMenu
bool _isOptionsMenu
Definition: gui_v2.h:166
Kyra::MenuItem::itemId
uint16 itemId
Definition: gui_v1.h:34
Kyra::KyraEngine_v1::resetGameFlag
int resetGameFlag(int flag)
Definition: kyra_v1.cpp:527
error
void NORETURN_PRE error(const char *s,...)
Definition: textconsole.cpp:67
Sword25::pause
int pause(lua_State *L)
Definition: movieplayer_script.cpp:70
Kyra::Menu::item
MenuItem item[7]
Definition: gui_v1.h:77
Kyra::GUI::updateSaveFileList
void updateSaveFileList(Common::String targetName, bool excludeQuickSaves=false)
Definition: gui.cpp:49
Kyra::KyraEngine_MR::Album::running
bool running
Definition: kyra_mr.h:552
Kyra::Button::flags
uint16 flags
Definition: gui.h:59
Kyra::KyraEngine_MR::_screen
Screen_MR * _screen
Definition: kyra_mr.h:82
Kyra::KyraEngine_MR::drawScore
void drawScore(int page, int x, int y)
Definition: gui_mr.cpp:366
Kyra::Screen::loadPalette
virtual bool loadPalette(const char *filename, Palette &pal)
Definition: screen.cpp:3263
Kyra::Screen::clearCurPage
void clearCurPage()
Definition: screen.cpp:572
Kyra::Screen_v2::wsaFrameAnimationStep
void wsaFrameAnimationStep(int x1, int y1, int x2, int y2, int w1, int h1, int w2, int h2, int srcPage, int dstPage, int dim)
Definition: screen_v2.cpp:280
Kyra::KyraEngine_v1::_opcodes
Common::Array< const Opcode * > _opcodes
Definition: kyra_v1.h:328
Kyra::GUI_v2::_audioOptions
Menu _audioOptions
Definition: gui_v2.h:139
Kyra::Menu
Definition: gui_v1.h:57
Kyra::KyraEngine_v2::_itemInHand
int _itemInHand
Definition: kyra_v2.h:299
Glk::AGT::buffer
static uchar * buffer
Definition: util.cpp:518
Kyra::KyraEngine_v1::setVolume
void setVolume(kVolumeEntry vol, uint8 value)
Definition: kyra_v1.cpp:650
Kyra::GUI_MR::_screen
Screen_MR * _screen
Definition: gui_mr.h:82
width
uint16 width
Definition: thumbnail.cpp:41
Kyra::KyraEngine_MR::_scenesFile
uint8 * _scenesFile
Definition: kyra_mr.h:270
Kyra::KyraEngine_MR::_albumWSAY
static const int8 _albumWSAY[]
Definition: kyra_mr.h:557
Kyra::KyraEngine_MR::drawMalcolmsMoodText
void drawMalcolmsMoodText()
Definition: gui_mr.cpp:303
Kyra::KyraEngine_v1::_lastMusicCommand
int16 _lastMusicCommand
Definition: kyra_v1.h:361
Kyra::KyraEngine_MR::drawInventorySlot
void drawInventorySlot(int page, Item item, int slot)
Definition: gui_mr.cpp:464
Kyra::KyraEngine_MR::_optionsFile
uint8 * _optionsFile
Definition: kyra_mr.h:272
Kyra::GUI_v2::_loadMenu
Menu _loadMenu
Definition: gui_v2.h:139
Kyra::KyraEngine_MR::setCommandLineRestoreTimer
void setCommandLineRestoreTimer(int secs)
Definition: timer_mr.cpp:91
Kyra::KyraEngine_v1::kVolumeEntry
kVolumeEntry
Definition: kyra_v1.h:215
Kyra::KyraEngine_MR::_configHelium
bool _configHelium
Definition: kyra_mr.h:72
Kyra::KyraEngine_v1::queryGameFlag
int queryGameFlag(int flag) const
Definition: kyra_v1.cpp:522
Kyra::KyraEngine_v1::_res
Resource * _res
Definition: kyra_v1.h:263
Kyra::GUI_MR::quitGame
int quitGame(Button *button)
Definition: gui_mr.cpp:1123
Kyra::KyraEngine_MR::Album::PageMovie::wsa
WSAMovie_v2 * wsa
Definition: kyra_mr.h:543
Kyra::GUI_MR::changeLanguage
int changeLanguage(Button *caller)
Definition: gui_mr.cpp:1404
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::GUI_v2::addButtonToList
Button * addButtonToList(Button *list, Button *newButton) override
Definition: gui_v2.cpp:50
Kyra::KyraEngine_MR::buttonShowScore
int buttonShowScore(Button *button)
Definition: gui_mr.cpp:588
Kyra::GUI_MR::flagButtonEnable
void flagButtonEnable(Button *button)
Definition: gui_mr.cpp:1045
Kyra::KyraEngine_MR::_interface
uint8 * _interface
Definition: kyra_mr.h:227
Graphics::Surface::free
void free()
Release the memory used by the pixels memory of this surface.
Definition: surface.cpp:79
Kyra::KyraEngine_MR::drawScoreCounting
void drawScoreCounting(int oldScore, int newScore, int drawOld, const int x)
Definition: gui_mr.cpp:383
uint8
unsigned char uint8
Definition: cdtypes.h:28
Kyra::Screen::FID_8_FNT
Definition: screen.h:382
Kyra::KyraEngine_MR::_soundDigital
SoundDigital_MR * _soundDigital
Definition: kyra_mr.h:83
Kyra::Button::data1Callback
Callback data1Callback
Definition: gui.h:65
Kyra::Button::data0Val1
byte data0Val1
Definition: gui.h:54
Kyra::KyraEngine_v1::delayWithTicks
virtual void delayWithTicks(int ticks)
Definition: kyra_v1.cpp:550
Kyra::GUI_v2::restorePalette
virtual void restorePalette()
Definition: gui_v2.h:126
state
u8 state
Definition: ps2kbd.h:101
frame
ShapeFrame * frame
Definition: soft_render_surface.inl:184
Kyra::KyraEngine_MR::_gui
GUI_MR * _gui
Definition: kyra_mr.h:142
Kyra::KyraEngine_MR::_albumWSAX
static const int8 _albumWSAX[]
Definition: kyra_mr.h:556
Kyra::Screen::setFont
FontId setFont(FontId fontId)
Definition: screen.cpp:1342
Kyra::GUI_MR::getMenuTitle
const char * getMenuTitle(const Menu &menu) override
Definition: gui_mr.cpp:1065
Kyra::KyraEngine_MR::_album
struct Kyra::KyraEngine_MR::Album _album
Graphics::Surface
An arbitrary graphics surface, which can be the target (or source) of blit operations,...
Definition: surface.h:42
Kyra::KyraEngine_MR::_musicSoundChannel
int _musicSoundChannel
Definition: kyra_mr.h:112
Ultima::Std::memset
void memset(void *data, byte val, size_t count)
Definition: misc.cpp:29
Kyra::GUI_v2::_deathMenu
Menu _deathMenu
Definition: gui_v2.h:139
Kyra::KyraEngine_MR::Album::PageMovie::maxFrame
int maxFrame
Definition: kyra_mr.h:545
Kyra::Button::x
int16 x
Definition: gui.h:70
Kyra::KyraEngine_MR::albumPrevPage
int albumPrevPage(Button *caller)
Definition: gui_mr.cpp:1020
Kyra::Screen::getRealPalette
virtual void getRealPalette(int num, uint8 *dst)
Definition: screen.cpp:873
Kyra::KyraEngine_v2::setHandItem
void setHandItem(Item item) override
Definition: items_v2.cpp:84
Kyra::MenuItem
Definition: gui_v1.h:30
Kyra::KyraEngine_v1::checkInput
int checkInput(Button *buttonList, bool mainLoop=false, int eventFlag=0x8000)
Definition: kyra_v1.cpp:246
Kyra::KyraEngine_v2::flagAnimObjsForRefresh
void flagAnimObjsForRefresh()
Definition: animator_v2.cpp:127
Kyra::Screen::fadeToBlack
void fadeToBlack(int delay=0x54, const UpdateFunctor *upFunc=0)
Definition: screen.cpp:758
Kyra::KyraEngine_MR::processAlbum
void processAlbum()
Definition: gui_mr.cpp:785
Kyra::KyraEngine_MR::setMouseCursor
void setMouseCursor(Item item) override
Definition: items_mr.cpp:78
Kyra::KyraEngine_MR::_scoreFile
uint8 * _scoreFile
Definition: kyra_mr.h:268
Kyra::GUI_v2::_madeSave
bool _madeSave
Definition: gui_v2.h:167
OSystem::delayMillis
virtual void delayMillis(uint msecs)=0
Delay/sleep for the specified amount of milliseconds.
Kyra::KyraEngine_MR::_voiceSoundChannel
int _voiceSoundChannel
Definition: kyra_mr.h:131
Kyra::KyraEngine_MR::showMessage
void showMessage(const char *string, uint8 c0, uint8 c1)
Definition: gui_mr.cpp:105
Kyra::Movie::opened
virtual bool opened()
Definition: wsamovie.h:37
Kyra::KyraEngine_MR::showMessageFromCCode
void showMessageFromCCode(int string, uint8 c0, int)
Definition: gui_mr.cpp:122
Kyra::KyraEngine_MR::albumSwitchPages
void albumSwitchPages(int oldPage, int newPage, int srcPage)
Definition: gui_mr.cpp:953
Kyra::KyraEngine_v1::_timer
TimerManager * _timer
Definition: kyra_v1.h:267
Kyra::GUI_v2::_isLoadMenu
bool _isLoadMenu
Definition: gui_v2.h:161
OSystem::getMillis
virtual uint32 getMillis(bool skipRecord=false)=0
Get the number of milliseconds since the program was started.
Kyra::GUI_MR::createScreenThumbnail
void createScreenThumbnail(Graphics::Surface &dst) override
Definition: gui_mr.cpp:1039
Kyra::Screen::drawBox
void drawBox(int x1, int y1, int x2, int y2, int color)
Definition: screen.cpp:1192
Kyra::Screen::FontId
FontId
Definition: screen.h:380
Kyra::KyraEngine_MR::_invWsa
WSAMovie_v2 * _invWsa
Definition: kyra_mr.h:264
Kyra::WSAMovie_v2::open
int open(const char *filename, int unk1, Palette *palette) override
Definition: wsamovie.cpp:364
Kyra::GUI_MR::optionsButton
int optionsButton(Button *button)
Definition: gui_mr.cpp:1141
Kyra::KyraEngine_MR::getItemCommandStringInv
int getItemCommandStringInv(uint16 item)
Definition: items_mr.cpp:530
MAX
T MAX(T a, T b)
Definition: util.h:50
Kyra::GUI_MR::toggleHeliumMode
int toggleHeliumMode(Button *caller)
Definition: gui_mr.cpp:1431
Kyra::KyraEngine_v2::removeHandItem
void removeHandItem() override
Definition: items_v2.cpp:93
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_v1::speechEnabled
bool speechEnabled()
Definition: kyra_v1.cpp:633
Kyra::KyraEngine_MR::writeSettings
void writeSettings() override
Definition: kyra_mr.cpp:1390
Kyra::KyraEngine_MR::_text
TextDisplayer_MR * _text
Definition: kyra_mr.h:657
Kyra::GUI_v2::_restartGame
bool _restartGame
Definition: gui_v2.h:169
Kyra::KyraEngine_v2::addShapeToPool
void addShapeToPool(const uint8 *data, int realIndex, int shape)
Definition: kyra_v2.cpp:173
Kyra::KyraEngine_MR::_shownMessage
const char * _shownMessage
Definition: kyra_mr.h:242
Kyra::GUI_v2::_buttonListChanged
bool _buttonListChanged
Definition: gui_v2.h:119
Kyra::KyraEngine_MR::_mainButtonData
Button * _mainButtonData
Definition: kyra_mr.h:144
Kyra::KyraEngine_MR::_inventoryY
static const uint8 _inventoryY[]
Definition: kyra_mr.h:259
Kyra::KyraEngine_MR::Album::leftPage
PageMovie leftPage
Definition: kyra_mr.h:549
Kyra::WSAMovie_v1::frames
int frames() override
Definition: wsamovie.h:72
Kyra::GUI_v2::getScrollUpButton
Button * getScrollUpButton() override
Definition: gui_v2.h:143
Kyra::GUI_MR::_vm
KyraEngine_MR * _vm
Definition: gui_mr.h:81
Kyra::GUI_MR::GUI_MR
GUI_MR(KyraEngine_MR *engine)
Definition: gui_mr.cpp:1036
Kyra::KyraEngine_v1::textEnabled
bool textEnabled()
Definition: kyra_v1.cpp:637
Kyra::Button::width
uint16 width
Definition: gui.h:71
Kyra::KyraEngine_MR::Album::wsa
WSAMovie_v2 * wsa
Definition: kyra_mr.h:539
Kyra::GUI_MR::loadSecondChance
int loadSecondChance(Button *button)
Definition: gui_mr.cpp:1300
Kyra::KyraEngine_MR::hideInventory
void hideInventory()
Definition: gui_mr.cpp:240
Kyra::MenuItem::labelId
uint16 labelId
Definition: gui_v1.h:51
Kyra::KyraEngine_MR::_configStudio
bool _configStudio
Definition: kyra_mr.h:70
Kyra::GUI_v2::backUpPage1
void backUpPage1(uint8 *buffer)
Definition: gui_v2.cpp:423
uint
unsigned int uint
Definition: scummsys.h:440
Kyra::GUI_v1::initMenuLayout
virtual void initMenuLayout(Menu &menu)
Definition: gui_v1.cpp:58
Kyra::KyraEngine_MR::updateCommandLine
void updateCommandLine()
Definition: gui_mr.cpp:143
text_mr.h
Kyra::Item
int16 Item
Definition: item.h:30
Kyra::Screen::copyBlockToPage
void copyBlockToPage(int pageNum, int x, int y, int w, int h, const uint8 *src)
Definition: screen.cpp:1058
Kyra::GUI_v1::updateAllMenuButtons
void updateAllMenuButtons()
Definition: gui_v1.cpp:300
Glk::Level9::_screen
void _screen()
Definition: level9_main.cpp:2162
Kyra::KyraEngine_v1::updateInput
void updateInput()
Definition: kyra_v1.cpp:446
Kyra::Button::data2Val1
byte data2Val1
Definition: gui.h:56
Kyra::KyraEngine_MR::Album::file
uint8 * file
Definition: kyra_mr.h:538
Kyra::Screen::_charWidth
int _charWidth
Definition: screen.h:537
Kyra::EMCState
Definition: script.h:47
Kyra::GUI_MR::getMenuItemTitle
const char * getMenuItemTitle(const MenuItem &menuItem) override
Definition: gui_mr.cpp:1072
Kyra::TextDisplayer::getCenterStringX
int getCenterStringX(const char *str, int x1, int x2)
Definition: text.cpp:46
Kyra::KyraEngine_MR::updateItemCommand
void updateItemCommand(Item item, int str, uint8 c0)
Definition: gui_mr.cpp:126
Kyra::KyraEngine_MR::showAlbum
void showAlbum()
Definition: gui_mr.cpp:638
Kyra::GUI_MR::gameOptions
int gameOptions(Button *button)
Definition: gui_mr.cpp:1311
Kyra::KyraEngine_MR::snd_playSoundEffect
void snd_playSoundEffect(int item, int volume) override
Definition: kyra_mr.cpp:440
Kyra::KyraEngine_MR::loadAlbumPageWSA
void loadAlbumPageWSA()
Definition: gui_mr.cpp:720
Kyra::KyraEngine_MR::Album::isPage14
bool isPage14
Definition: kyra_mr.h:553
Kyra::GUI_v1::_displayMenu
bool _displayMenu
Definition: gui_v1.h:109
Kyra::KyraEngine_MR::updateCLState
void updateCLState()
Definition: gui_mr.cpp:155
Kyra::KyraEngine_MR::_invWsaFrame
int _invWsaFrame
Definition: kyra_mr.h:265
Kyra::KyraEngine_MR::redrawInventory
void redrawInventory(int page)
Definition: gui_mr.cpp:429
Kyra::kItemNone
Constant for invalid item.
Definition: item.h:36
Kyra::KyraEngine_MR::_itemFile
uint8 * _itemFile
Definition: kyra_mr.h:271
Kyra::EMCInterpreter::load
bool load(const char *filename, EMCData *data, const Common::Array< const Opcode * > *opcodes)
Definition: script.cpp:98
Kyra::KyraEngine_MR::runStartupScript
void runStartupScript(int script, int unk1)
Definition: kyra_mr.cpp:672
Kyra::KyraEngine_MR::_enableInventory
bool _enableInventory
Definition: kyra_mr.h:149
Kyra::GUI_MR::getMenuItemLabel
const char * getMenuItemLabel(const MenuItem &menuItem) override
Definition: gui_mr.cpp:1079
Kyra::KyraEngine_MR::buttonJesterStaff
int buttonJesterStaff(Button *button)
Definition: gui_mr.cpp:611
type
uint32 type
Definition: mididrv.cpp:83
Kyra::KyraEngine_MR::Album::nextPage
int nextPage
Definition: kyra_mr.h:551
Kyra::KyraEngine_MR::showInventory
void showInventory()
Definition: gui_mr.cpp:162
Kyra::GUI_v2::updateButton
void updateButton(Button *button) override
Definition: gui_v2.cpp:372
Common::List::clear
void clear()
Definition: list.h:193
Kyra::KyraEngine_MR::_interfaceCommandLine
uint8 * _interfaceCommandLine
Definition: kyra_mr.h:228
Kyra::Screen::getTextWidth
int getTextWidth(const char *str)
Definition: screen.cpp:1364
Kyra::GUI_v2::getInput
virtual void getInput()
Definition: gui_v2.cpp:393
Kyra::GUI_v2::getScrollDownButton
Button * getScrollDownButton() override
Definition: gui_v2.h:144
Kyra::GUI_v1::_redrawButtonFunctor
Button::Callback _redrawButtonFunctor
Definition: gui_v1.h:117
Kyra::Screen::isMouseVisible
bool isMouseVisible() const
Definition: screen.cpp:2998
Kyra::KyraEngine_MR::buttonMoodChange
int buttonMoodChange(Button *button)
Definition: gui_mr.cpp:521
Kyra::Screen::updateScreen
void updateScreen()
Definition: screen.cpp:339
Kyra::KyraEngine_MR::Album::backUpRect
uint8 * backUpRect
Definition: kyra_mr.h:540
Kyra::KyraEngine_v2::_chatText
const char * _chatText
Definition: kyra_v2.h:346
Kyra::GUI_MR::audioOptions
int audioOptions(Button *button)
Definition: gui_mr.cpp:1442
Kyra::KyraEngine_v2::_vocHigh
int _vocHigh
Definition: kyra_v2.h:344
Kyra::GUI_v2::_loadedSave
bool _loadedSave
Definition: gui_v2.h:168
Kyra::KyraEngine_MR::setNextIdleAnimTimer
void setNextIdleAnimTimer()
Definition: timer_mr.cpp:97
Kyra::KyraEngine_MR::getItemCommandStringPickUp
int getItemCommandStringPickUp(uint16 item)
Definition: items_mr.cpp:524
Kyra::KyraEngine_MR::saveGameStateIntern
Common::Error saveGameStateIntern(int slot, const char *saveName, const Graphics::Surface *thumbnail) override
Definition: saveload_mr.cpp:33
Kyra::GUI_MR::flagButtonDisable
void flagButtonDisable(Button *button)
Definition: gui_mr.cpp:1055
LastExpress::switch
IMPLEMENT_FUNCTION_END IMPLEMENT_FUNCTION_II(19, August, function19, bool, bool) EntityData switch(savepoint.action)
Definition: august.cpp:334
system.h
Kyra::Menu::x
int16 x
Definition: gui_v1.h:58
y
y
Definition: soft_render_surface.inl:124
Kyra::KyraEngine_MR::albumChat
void albumChat(const char *str, int vocHigh, int vocLow)
Definition: text_mr.cpp:479
Kyra::GUI_v2::_sliderHandlerFunctor
Button::Callback _sliderHandlerFunctor
Definition: gui_v2.h:209
Kyra::Button::data1Val1
byte data1Val1
Definition: gui.h:55
Kyra::KyraEngine_v1::_tickLength
uint16 _tickLength
Definition: kyra_v1.h:312
DS::getMillis
int getMillis(bool skipRecord)
Definition: dsmain.cpp:2279
Kyra::Screen::_curPage
int _curPage
Definition: screen.h:539
Kyra::KyraEngine_MR::loadLanguageFile
int loadLanguageFile(const char *file, uint8 *&buffer)
Definition: kyra_mr.cpp:1234
Cruise::direction
int direction(int x1, int y1, int x2, int y2, int inc_jo1, int inc_jo2)
Definition: perso.cpp:62
Kyra::KyraEngine_MR::snd_playWanderScoreViaMap
void snd_playWanderScoreViaMap(int track, int force) override
Definition: kyra_mr.cpp:404
Kyra::KyraEngine_MR::albumRestoreRect
void albumRestoreRect()
Definition: gui_mr.cpp:944
Kyra::Screen::SCREEN_H
Definition: screen.h:356
Tony::playSoundEffect
void playSoundEffect(CORO_PARAM, uint32 nMusic, uint32 nFX, uint32 bNoLoop, uint32)
Definition: custom.cpp:2106
Kyra::KyraEngine_v1::_eventList
Common::List< Event > _eventList
Definition: kyra_v1.h:288
Kyra::TimerManager::resetNextRun
void resetNextRun()
Definition: timer.cpp:139
Kyra::GUI_v2::_gameOptions
Menu _gameOptions
Definition: gui_v2.h:139
Kyra::GUI_MR::getTableString
char * getTableString(int id) override
Definition: gui_mr.cpp:1086
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::Screen::copyPalette
void copyPalette(const int dst, const int src)
Definition: screen.cpp:3062
Engine::_targetName
const Common::String _targetName
Definition: engine.h:73
Kyra::KyraEngine_MR::_useActorBuffer
bool _useActorBuffer
Definition: kyra_mr.h:506
Kyra::Screen::getPalette
Palette & getPalette(int num)
Definition: screen.cpp:3057
Kyra::KyraEngine_v2::_screenBuffer
uint8 * _screenBuffer
Definition: kyra_v2.h:162
Kyra::Button::index
uint16 index
Definition: gui.h:49
Kyra::KyraEngine_MR::albumNewPage
void albumNewPage()
Definition: gui_mr.cpp:847
Kyra::Button::y
int16 y
Definition: gui.h:70
Kyra::KyraEngine_MR::_malcolmsMood
int _malcolmsMood
Definition: kyra_mr.h:396
Kyra::KyraEngine_v1::kVolumeSpeech
Definition: kyra_v1.h:218
Kyra::GUI_v2::_saveMenu
Menu _saveMenu
Definition: gui_v2.h:139
Kyra::KyraEngine_MR::updateMouse
void updateMouse()
Definition: kyra_mr.cpp:1079
Kyra::GUI_MR::resetState
void resetState(int item)
Definition: gui_mr.cpp:1107
Kyra::WSAMovie_v1::close
void close() override
Definition: wsamovie.cpp:126
Kyra::KyraEngine_v1::_mouseX
int _mouseX
Definition: kyra_v1.h:276
Kyra::Button::buttonCallback
Callback buttonCallback
Definition: gui.h:89
Kyra::Button::data0Callback
Callback data0Callback
Definition: gui.h:64
Kyra::KyraEngine_MR::albumAnim1
void albumAnim1()
Definition: gui_mr.cpp:913
Kyra::KyraEngine_MR::Album::PageMovie::curFrame
int curFrame
Definition: kyra_mr.h:544
Kyra::KyraEngine_MR::_stringBuffer
char * _stringBuffer
Definition: kyra_mr.h:521
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::GUI_MR::redrawShadedButtonCallback
int redrawShadedButtonCallback(Button *button) override
Definition: gui_mr.cpp:1099
Kyra::Screen::hideMouse
void hideMouse()
Definition: screen.cpp:2979
resource.h
createThumbnail
static bool createThumbnail(Graphics::Surface &out, Graphics::Surface &in)
Definition: thumbnail_intern.cpp:216
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::GUI_v1::initMenu
void initMenu(Menu &menu)
Definition: gui_v1.cpp:70
Kyra::GUI_v1::_menuButtonList
Button * _menuButtonList
Definition: gui_v1.h:108
Kyra::KyraEngine_MR::_restoreCommandLine
bool _restoreCommandLine
Definition: kyra_mr.h:243
Kyra::KyraEngine_v1::_gameToLoad
int _gameToLoad
Definition: kyra_v1.h:389
Kyra::Screen::setMouseCursor
virtual void setMouseCursor(int x, int y, const byte *shape)
Definition: screen.cpp:3009
timer.h
Kyra::GUI_MR::drawSliderBar
void drawSliderBar(int slider, const uint8 *shape)
Definition: gui_mr.cpp:1570
Kyra::KyraEngine_MR::albumBackUpRect
void albumBackUpRect()
Definition: gui_mr.cpp:940
Kyra::KyraEngine_MR::printAlbumPageText
void printAlbumPageText()
Definition: gui_mr.cpp:744
Kyra::PauseTimer
Definition: timer.h:96
Kyra::EMCData
Definition: script.h:36
Kyra::KyraEngine_MR::getTableEntry
uint8 * getTableEntry(uint8 *buffer, int id)
Definition: kyra_mr.cpp:1246
Kyra::GUI_v2::processButton
void processButton(Button *button) override
Definition: gui_v2.cpp:56
Kyra::KyraEngine_MR::_inventoryState
bool _inventoryState
Definition: kyra_mr.h:244
sound_digital_mr.h
Kyra::KyraEngine_MR::drawJestersStaff
void drawJestersStaff(int type, int page)
Definition: gui_mr.cpp:355
Kyra::GUI_v2::choiceDialog
bool choiceDialog(int name, bool type)
Definition: gui_v2.cpp:841
Kyra::GUI_v2::_savenameMenu
Menu _savenameMenu
Definition: gui_v2.h:139
Kyra::Screen::fadePalette
virtual void fadePalette(const Palette &pal, int delay, const UpdateFunctor *upFunc=0)
Definition: screen.cpp:766
Kyra::KyraEngine_v1::setGameFlag
int setGameFlag(int flag)
Definition: kyra_v1.cpp:516
Kyra::KyraEngine_MR::_score
int _score
Definition: kyra_mr.h:523
filename
Common::String filename
Definition: action.cpp:1197
Kyra::KyraEngine_v2::_lang
int _lang
Definition: kyra_v2.h:95
Kyra::KyraEngine_MR::drawAnimObjects
void drawAnimObjects() override
Definition: animator_mr.cpp:81
Kyra::KyraEngine_MR::printAlbumText
void printAlbumText(int page, const char *str, int x, int y, uint8 c0)
Definition: gui_mr.cpp:768
Kyra::KyraEngine_MR::getScoreX
int getScoreX(const char *str)
Definition: gui_mr.cpp:417
Kyra::Button::height
uint16 height
Definition: gui.h:71
Kyra::Screen::CR_NO_P_CHECK
Definition: screen.h:364
Kyra::KyraEngine_MR::_inventoryX
static const uint8 _inventoryX[]
Definition: kyra_mr.h:258
Kyra::KyraEngine_MR::Album::curPage
int curPage
Definition: kyra_mr.h:551
Kyra::KyraEngine_MR::albumClose
int albumClose(Button *caller)
Definition: gui_mr.cpp:1029
Common::String::c_str
const char * c_str() const
Definition: str.h:206
Kyra::Screen::copyRegionToBuffer
void copyRegionToBuffer(int pageNum, int x, int y, int w, int h, uint8 *dest)
Definition: screen.cpp:1021
Kyra::Button::data2Callback
Callback data2Callback
Definition: gui.h:66
Kyra::Screen::SCREEN_W
Definition: screen.h:355
Kyra::GUI_v2::_reloadTemporarySave
bool _reloadTemporarySave
Definition: gui_v2.h:170
Kyra::Resource::exists
bool exists(const char *file, bool errorOutOnFail=false)
Definition: resource.cpp:308
Kyra::Screen::loadBitmap
virtual void loadBitmap(const char *filename, int tempPage, int dstPage, Palette *pal, bool skip=false)
Definition: screen.cpp:3214
Kyra::KyraEngine_MR::restoreCommandLine
void restoreCommandLine()
Definition: gui_mr.cpp:150