ScummVM
staticres.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/resource/resource.h"
24 #include "kyra/engine/kyra_lok.h"
25 #include "kyra/engine/kyra_hof.h"
26 #include "kyra/engine/kyra_mr.h"
27 #include "kyra/graphics/screen.h"
31 #include "kyra/gui/gui_lok.h"
32 #include "kyra/gui/gui_hof.h"
33 #include "kyra/gui/gui_mr.h"
36 
37 #include "common/endian.h"
38 #include "common/md5.h"
39 
40 namespace Kyra {
41 
42 #define RESFILE_VERSION 96
43 
44 namespace {
45 bool checkKyraDat(Common::SeekableReadStream *file) {
46  if (!file)
47  return false;
48 
49  uint32 size = file->size() - 16;
50  uint8 digest[16];
51  file->seek(size, SEEK_SET);
52  if (file->read(digest, 16) != 16)
53  return false;
54 
55  uint8 digestCalc[16];
56  file->seek(0, SEEK_SET);
57  if (!Common::computeStreamMD5(*file, digestCalc, size))
58  return false;
59 
60  for (int i = 0; i < 16; ++i)
61  if (digest[i] != digestCalc[i])
62  return false;
63  return true;
64 }
65 
66 struct IndexTable {
67  int type;
68  int value;
69 
70  bool operator==(int t) const {
71  return (type == t);
72  }
73 };
74 
75 const IndexTable iGameTable[] = {
76  { GI_KYRA1, 0 },
77  { GI_KYRA2, 1 },
78  { GI_KYRA3, 2 },
79  { GI_EOB1, 3 },
80  { GI_EOB2, 4 },
81  { GI_LOL, 5 },
82  { -1, -1 }
83 };
84 
85 byte getGameID(const GameFlags &flags) {
86  return Common::find(iGameTable, ARRAYEND(iGameTable) - 1, flags.gameID)->value;
87 }
88 
89 const IndexTable iLanguageTable[] = {
90  { Common::EN_ANY, 1 },
91  { Common::FR_FRA, 2 },
92  { Common::DE_DEU, 3 },
93  { Common::ES_ESP, 4 },
94  { Common::IT_ITA, 5 },
95  { Common::JA_JPN, 6 },
96  { Common::RU_RUS, 7 },
97  { -1, -1 }
98 };
99 
100 byte getLanguageID(const GameFlags &flags) {
101  return Common::find(iLanguageTable, ARRAYEND(iLanguageTable) - 1, flags.lang)->value;
102 }
103 
104 const IndexTable iPlatformTable[] = {
105  { Common::kPlatformDOS, 0 },
106  { Common::kPlatformAmiga, 1 },
108  { Common::kPlatformPC98, 3 },
109  { Common::kPlatformMacintosh, 0 }, // HACK: Should be type "4", but as long as we can't extract Macintosh data, we need to use DOS data.
110  { -1, -1 }
111 };
112 
113 byte getPlatformID(const GameFlags &flags) {
114  return Common::find(iPlatformTable, ARRAYEND(iPlatformTable) - 1, flags.platform)->value;
115 }
116 
117 byte getSpecialID(const GameFlags &flags) {
118  if (flags.isOldFloppy)
119  return 4;
120  else if (flags.isDemo && flags.isTalkie)
121  return 3;
122  else if (flags.isDemo)
123  return 2;
124  else if (flags.isTalkie)
125  return 1;
126  else
127  return 0;
128 }
129 
130 } // end of anonymous namespace
131 
133  Resource *res = _vm->resource();
134 
135  if (res->isInCacheList(staticDataFilename()))
136  return true;
137 
138  Common::ArchiveMemberList kyraDatFiles;
139  res->listFiles(staticDataFilename(), kyraDatFiles);
140 
141  bool foundWorkingKyraDat = false;
142  for (Common::ArchiveMemberList::iterator i = kyraDatFiles.begin(); i != kyraDatFiles.end(); ++i) {
143  Common::SeekableReadStream *file = (*i)->createReadStream();
144  if (!checkKyraDat(file)) {
145  delete file;
146  continue;
147  }
148 
149  delete file; file = 0;
150 
151  if (!res->loadPakFile(staticDataFilename(), *i))
152  continue;
153 
154  if (tryKyraDatLoad()) {
155  foundWorkingKyraDat = true;
156  break;
157  }
158 
159  res->unloadPakFile(staticDataFilename(), true);
160  unloadId(-1);
161  }
162 
163  if (!foundWorkingKyraDat) {
164  Common::String errorMessage = "You're missing the '" + StaticResource::staticDataFilename() + "' engine data file or it got corrupted.";
165  GUIErrorMessage(errorMessage);
166  error("%s", errorMessage.c_str());
167  }
168 
169  return true;
170 }
171 
174  if (!index)
175  return false;
176 
177  const uint32 version = index->readUint32BE();
178 
179  if (version != RESFILE_VERSION) {
180  delete index;
181  return false;
182  }
183 
184  const uint32 includedGames = index->readUint32BE();
185 
186  if (includedGames * 2 + 8 != (uint32)index->size()) {
187  delete index;
188  return false;
189  }
190 
191  const GameFlags &flags = _vm->gameFlags();
192  const byte game = getGameID(flags) & 0xF;
193  const byte platform = getPlatformID(flags) & 0xF;
194  const byte special = getSpecialID(flags) & 0xF;
195  const byte lang = getLanguageID(flags) & 0xF;
196 
197  const uint16 gameDef = (game << 12) | (platform << 8) | (special << 4) | (lang << 0);
198 
199  bool found = false;
200  for (uint32 i = 0; i < includedGames; ++i) {
201  if (index->readUint16BE() == gameDef) {
202  found = true;
203  break;
204  }
205  }
206 
207  delete index;
208  index = 0;
209 
210  if (!found)
211  return false;
212 
213  // load the ID map for our game
214  const Common::String filenamePattern = Common::String::format("0%01X%01X%01X000%01X", game, platform, special, lang);
215  Common::SeekableReadStream *idMap = _vm->resource()->createReadStream(filenamePattern);
216  if (!idMap)
217  return false;
218 
219  uint16 numIDs = idMap->readUint16BE();
220  while (numIDs--) {
221  uint16 id = idMap->readUint16BE();
222  uint8 type = idMap->readByte();
223  uint32 filename = idMap->readUint32BE();
224 
226  }
227 
228  const bool fileError = idMap->err();
229  delete idMap;
230  if (fileError)
231  return false;
232 
233  // load all tables for now
234  if (!prefetchId(-1))
235  return false;
236 
237  return true;
238 }
239 
241 #define proc(x) &StaticResource::x
242  static const FileType fileTypeTable[] = {
243  { kStringList, proc(loadStringTable), proc(freeStringTable) },
245  { kShapeList, proc(loadShapeTable), proc(freeShapeTable) },
247  { kRawData, proc(loadRawData), proc(freeRawData) },
248 
252 
253 #ifdef ENABLE_LOL
254  { kLoLCharData, proc(loadCharData), proc(freeCharData) },
255  { kLoLSpellData, proc(loadSpellData), proc(freeSpellData) },
258 #else
259  { kLoLCharData, proc(loadDummy), proc(freeDummy) },
260  { kLoLSpellData, proc(loadDummy), proc(freeDummy) },
261  { kLoLCompassData, proc(loadDummy), proc(freeDummy) },
262  { kLoLFlightShpData, proc(loadDummy), proc(freeDummy) },
263 #endif
264 #if defined(ENABLE_EOB) || defined(ENABLE_LOL)
265  { kRawDataBe16, proc(loadRawDataBe16), proc(freeRawDataBe16) },
266  { kRawDataBe32, proc(loadRawDataBe32), proc(freeRawDataBe32) },
267 #endif
268 #ifdef ENABLE_LOL
269  { kLoLButtonData, proc(loadButtonDefs), proc(freeButtonDefs) },
270 #else
271  { kLoLButtonData, proc(loadDummy), proc(freeDummy) },
272 #endif
273 
274 #ifdef ENABLE_EOB
277  { kEoBNpcData, proc(loadEoBNpcData), proc(freeEoBNpcData) },
278 #endif
279 
280  { 0, 0, 0 }
281  };
282 #undef proc
283  _fileLoader = fileTypeTable;
284 
285  return loadStaticResourceFile();
286 }
287 
289  unloadId(-1);
290 }
291 
292 const char *const *StaticResource::loadStrings(int id, int &strings) {
293  return (const char *const *)getData(id, kStringList, strings);
294 }
295 
296 const uint8 *StaticResource::loadRawData(int id, int &size) {
297  return (const uint8 *)getData(id, kRawData, size);
298 }
299 
300 const Shape *StaticResource::loadShapeTable(int id, int &entries) {
301  return (const Shape *)getData(id, kShapeList, entries);
302 }
303 
304 const AmigaSfxTable *StaticResource::loadAmigaSfxTable(int id, int &entries) {
305  return (const AmigaSfxTable *)getData(id, kAmigaSfxTable, entries);
306 }
307 
308 const Room *StaticResource::loadRoomTable(int id, int &entries) {
309  return (const Room *)getData(id, StaticResource::kRoomList, entries);
310 }
311 
312 const HoFSeqData *StaticResource::loadHoFSequenceData(int id, int &entries) {
313  return (const HoFSeqData *)getData(id, k2SeqData, entries);
314 }
315 
317  return (const HoFSeqItemAnimData *)getData(id, k2SeqItemAnimData, entries);
318 }
319 
321  return (const ItemAnimDefinition *)getData(id, k2ItemAnimDefinition, entries);
322 }
323 
325  if (id == -1) {
326  for (DataMap::const_iterator i = _dataTable.begin(); i != _dataTable.end(); ++i) {
327  if (!prefetchId(i->_key))
328  return false;
329  }
330  return true;
331  }
332 
333  const void *ptr = 0;
334  int type = -1, size = -1;
335 
336  if (checkResList(id, type, ptr, size))
337  return true;
338 
339  DataMap::const_iterator dDesc = _dataTable.find(id);
340  if (dDesc == _dataTable.end())
341  return false;
342 
343  const FileType *filetype = getFiletype(dDesc->_value.type);
344  if (!filetype)
345  return false;
346 
347  ResData data;
348  data.id = id;
349  data.type = dDesc->_value.type;
350  Common::SeekableReadStream *fileStream = _vm->resource()->createReadStream(Common::String::format("%08X", dDesc->_value.filename));
351  if (!fileStream)
352  return false;
353 
354  if (!(this->*(filetype->load))(*fileStream, data.data, data.size)) {
355  delete fileStream;
356  return false;
357  }
358  delete fileStream;
359  _resList.push_back(data);
360 
361  return true;
362 }
363 
366  for (; pos != _resList.end();) {
367  if (pos->id == id || id == -1) {
368  const FileType *filetype = getFiletype(pos->type);
369  (this->*(filetype->free))(pos->data, pos->size);
370  pos = _resList.erase(pos);
371  if (id != -1)
372  break;
373  } else {
374  ++pos;
375  }
376  }
377 }
378 
379 bool StaticResource::checkResList(int id, int &type, const void *&ptr, int &size) {
381  for (; pos != _resList.end(); ++pos) {
382  if (pos->id == id) {
383  size = pos->size;
384  type = pos->type;
385  ptr = pos->data;
386  return true;
387  }
388  }
389  return false;
390 }
391 
393  if (!_fileLoader)
394  return 0;
395 
396  for (int i = 0; _fileLoader[i].load; ++i) {
397  if (_fileLoader[i].type == type)
398  return &_fileLoader[i];
399  }
400 
401  return 0;
402 }
403 
404 const void *StaticResource::getData(int id, int requesttype, int &size) {
405  const void *ptr = 0;
406  int type = -1;
407  size = 0;
408 
409  if (checkResList(id, type, ptr, size)) {
410  if (type == requesttype)
411  return ptr;
412  return 0;
413  }
414 
415  if (!prefetchId(id))
416  return 0;
417 
418  if (checkResList(id, type, ptr, size)) {
419  if (type == requesttype)
420  return ptr;
421  }
422 
423  return 0;
424 }
425 
427  return true;
428 }
429 
431  uint32 count = stream.readUint32BE();
432  size = count;
433  char **output = new char *[count];
434  assert(output);
435 
436  for (uint32 i = 0; i < count; ++i) {
437  Common::String string;
438  char c = 0;
439  while ((c = (char)stream.readByte()) != 0)
440  string += c;
441 
442  output[i] = new char[string.size() + 1];
443  strcpy(output[i], string.c_str());
444  }
445 
446  ptr = output;
447  return true;
448 }
449 
451  ptr = new uint8[stream.size()];
452  stream.read(ptr, stream.size());
453  size = stream.size();
454  return true;
455 }
456 
458  uint32 count = stream.readUint32BE();
459  size = count;
460  Shape *loadTo = new Shape[count];
461  assert(loadTo);
462 
463  for (uint32 i = 0; i < count; ++i) {
464  loadTo[i].imageIndex = stream.readByte();
465  loadTo[i].x = stream.readByte();
466  loadTo[i].y = stream.readByte();
467  loadTo[i].w = stream.readByte();
468  loadTo[i].h = stream.readByte();
469  loadTo[i].xOffset = stream.readSByte();
470  loadTo[i].yOffset = stream.readSByte();
471  }
472 
473  ptr = loadTo;
474  return true;
475 }
476 
478  size = stream.readUint32BE();
479  AmigaSfxTable *loadTo = new AmigaSfxTable[size];
480  assert(loadTo);
481 
482  for (int i = 0; i < size; ++i) {
483  loadTo[i].note = stream.readByte();
484  loadTo[i].patch = stream.readByte();
485  loadTo[i].duration = stream.readUint16BE();
486  loadTo[i].volume = stream.readByte();
487  loadTo[i].pan = stream.readByte();
488  }
489 
490  ptr = loadTo;
491  return true;
492 }
493 
495  uint32 count = stream.readUint32BE();
496  size = count;
497  Room *loadTo = new Room[count];
498  assert(loadTo);
499 
500  for (uint32 i = 0; i < count; ++i) {
501  loadTo[i].nameIndex = stream.readByte();
502  loadTo[i].northExit = stream.readUint16BE();
503  loadTo[i].eastExit = stream.readUint16BE();
504  loadTo[i].southExit = stream.readUint16BE();
505  loadTo[i].westExit = stream.readUint16BE();
506  memset(&loadTo[i].itemsTable[0], 0xFF, sizeof(byte) * 6);
507  memset(&loadTo[i].itemsTable[6], 0, sizeof(byte) * 6);
508  memset(loadTo[i].itemsXPos, 0, sizeof(uint16) * 12);
509  memset(loadTo[i].itemsYPos, 0, sizeof(uint8) * 12);
510  memset(loadTo[i].needInit, 0, sizeof(loadTo[i].needInit));
511  }
512 
513  ptr = loadTo;
514  return true;
515 }
516 
518  int numSeq = stream.readUint16BE();
519  uint32 offset = 2;
520  HoFSequence *tmp_s = new HoFSequence[numSeq];
521 
522  size = sizeof(HoFSeqData) + numSeq * (sizeof(HoFSequence) + 28);
523 
524  for (int i = 0; i < numSeq; i++) {
525  stream.seek(offset, SEEK_SET); offset += 2;
526  stream.seek(stream.readUint16BE(), SEEK_SET);
527 
528  tmp_s[i].flags = stream.readUint16BE();
529  tmp_s[i].wsaFile = new char[14];
530  stream.read(const_cast<char *>(tmp_s[i].wsaFile), 14);
531  tmp_s[i].cpsFile = new char[14];
532  stream.read(const_cast<char *>(tmp_s[i].cpsFile), 14);
533  tmp_s[i].fadeInTransitionType = stream.readByte();
534  tmp_s[i].fadeOutTransitionType = stream.readByte();
535  tmp_s[i].stringIndex1 = stream.readUint16BE();
536  tmp_s[i].stringIndex2 = stream.readUint16BE();
537  tmp_s[i].startFrame = stream.readUint16BE();
538  tmp_s[i].numFrames = stream.readUint16BE();
539  tmp_s[i].duration = stream.readUint16BE();
540  tmp_s[i].xPos = stream.readUint16BE();
541  tmp_s[i].yPos = stream.readUint16BE();
542  tmp_s[i].timeout = stream.readUint16BE();
543  }
544 
545  stream.seek(offset, SEEK_SET); offset += 2;
546  int numSeqN = stream.readUint16BE();
547  HoFNestedSequence *tmp_n = new HoFNestedSequence[numSeqN];
548  size += (numSeqN * (sizeof(HoFNestedSequence) + 14));
549 
550  for (int i = 0; i < numSeqN; i++) {
551  stream.seek(offset, SEEK_SET); offset += 2;
552  stream.seek(stream.readUint16BE(), SEEK_SET);
553 
554  tmp_n[i].flags = stream.readUint16BE();
555  tmp_n[i].wsaFile = new char[14];
556  stream.read(const_cast<char *>(tmp_n[i].wsaFile), 14);
557  tmp_n[i].startframe = stream.readUint16BE();
558  tmp_n[i].endFrame = stream.readUint16BE();
559  tmp_n[i].frameDelay = stream.readUint16BE();
560  tmp_n[i].x = stream.readUint16BE();
561  tmp_n[i].y = stream.readUint16BE();
562  uint16 ctrlOffs = stream.readUint16BE();
563  tmp_n[i].fadeInTransitionType = stream.readUint16BE();
564  tmp_n[i].fadeOutTransitionType = stream.readUint16BE();
565 
566  if (ctrlOffs) {
567  stream.seek(ctrlOffs, SEEK_SET);
568  int num_c = stream.readByte();
569  FrameControl *tmp_f = new FrameControl[num_c];
570 
571  for (int ii = 0; ii < num_c; ii++) {
572  tmp_f[ii].index = stream.readUint16BE();
573  tmp_f[ii].delay = stream.readUint16BE();
574  }
575 
576  tmp_n[i].wsaControl = (const FrameControl *)tmp_f;
577  size += (num_c * sizeof(FrameControl));
578 
579  } else {
580  tmp_n[i].wsaControl = 0;
581  }
582  }
583 
584  HoFSeqData *loadTo = new HoFSeqData;
585  assert(loadTo);
586 
587  loadTo->seq = tmp_s;
588  loadTo->nestedSeq = tmp_n;
589  loadTo->numSeq = numSeq;
590  loadTo->numNestedSeq = numSeqN;
591 
592  ptr = loadTo;
593  return true;
594 }
595 
597  size = stream.readByte();
599  assert(loadTo);
600 
601  for (int i = 0; i < size; i++) {
602  loadTo[i].itemIndex = stream.readSint16BE();
603  loadTo[i].y = stream.readUint16BE();
604  uint16 *tmp_f = new uint16[20];
605  for (int ii = 0; ii < 20; ii++)
606  tmp_f[ii] = stream.readUint16BE();
607  loadTo[i].frames = tmp_f;
608  }
609 
610  ptr = loadTo;
611  return true;
612 }
613 
615  size = stream.readByte();
617  assert(loadTo);
618 
619  for (int i = 0; i < size; i++) {
620  loadTo[i].itemIndex = stream.readSint16BE();
621  loadTo[i].numFrames = stream.readByte();
622  FrameControl *tmp_f = new FrameControl[loadTo[i].numFrames];
623  for (int ii = 0; ii < loadTo[i].numFrames; ii++) {
624  tmp_f[ii].index = stream.readUint16BE();
625  tmp_f[ii].delay = stream.readUint16BE();
626  }
627  loadTo[i].frames = tmp_f;
628  }
629 
630  ptr = loadTo;
631  return true;
632 }
633 
634 void StaticResource::freeDummy(void *&ptr, int &size) {
635 }
636 
637 void StaticResource::freeRawData(void *&ptr, int &size) {
638  uint8 *data = (uint8 *)ptr;
639  delete[] data;
640  ptr = 0;
641  size = 0;
642 }
643 
644 void StaticResource::freeStringTable(void *&ptr, int &size) {
645  char **data = (char **)ptr;
646  while (size--)
647  delete[] data[size];
648  delete[] data;
649  ptr = 0;
650  size = 0;
651 }
652 
653 void StaticResource::freeShapeTable(void *&ptr, int &size) {
654  Shape *data = (Shape *)ptr;
655  delete[] data;
656  ptr = 0;
657  size = 0;
658 }
659 
660 void StaticResource::freeAmigaSfxTable(void *&ptr, int &size) {
661  AmigaSfxTable *data = (AmigaSfxTable *)ptr;
662  delete[] data;
663  ptr = 0;
664  size = 0;
665 }
666 
667 void StaticResource::freeRoomTable(void *&ptr, int &size) {
668  Room *data = (Room *)ptr;
669  delete[] data;
670  ptr = 0;
671  size = 0;
672 }
673 
675  HoFSeqData *h = (HoFSeqData *)ptr;
676 
677  for (int i = 0; i < h->numSeq; i++) {
678  delete[] h->seq[i].wsaFile;
679  delete[] h->seq[i].cpsFile;
680  }
681  delete[] h->seq;
682 
683  for (int i = 0; i < h->numNestedSeq; i++) {
684  delete[] h->nestedSeq[i].wsaFile;
685  delete[] h->nestedSeq[i].wsaControl;
686  }
687  delete[] h->nestedSeq;
688 
689  delete h;
690  ptr = 0;
691  size = 0;
692 }
693 
696  for (int i = 0; i < size; i++)
697  delete[] d[i].frames;
698  delete[] d;
699  ptr = 0;
700  size = 0;
701 }
702 
705  for (int i = 0; i < size; i++)
706  delete[] d[i].frames;
707  delete[] d;
708  ptr = 0;
709  size = 0;
710 }
711 
712 #pragma mark -
713 
715  int temp = 0;
727 
732 
752 
764 
766 
768 
770 
771  const uint8 **palTable = new const uint8 *[k1SpecialPalette33 - k1SpecialPalette1 + 1];
772  for (int i = k1SpecialPalette1; i <= k1SpecialPalette33; ++i)
773  palTable[i - k1SpecialPalette1] = _staticres->loadRawData(i, temp);
774  _specialPalettes = palTable;
775 
778 
780 
781  // room list
782  const Room *tempRoomList = _staticres->loadRoomTable(k1RoomList, _roomTableSize);
783 
784  if (_roomTableSize > 0) {
786  assert(_roomTable);
787 
788  memcpy(_roomTable, tempRoomList, _roomTableSize * sizeof(Room));
789  tempRoomList = 0;
790 
792  }
793 
794  // default shape table
796 
797  if (_defaultShapeTableSize > 0) {
799  assert(_defaultShapeTable);
800 
801  memcpy(_defaultShapeTable, tempShapeTable, _defaultShapeTableSize * sizeof(Shape));
802  tempShapeTable = 0;
803 
805  }
806 
807  // audio resource assignment
808  int soundFilesSize;
809  const char *const *soundFiles = _staticres->loadStrings(k1AudioTracks, soundFilesSize);
810  int soundFilesIntroSize = 0;
811  int cdaTableSize = 0;
812 
813  const char *const *soundFilesIntro = _staticres->loadStrings(k1AudioTracksIntro, soundFilesIntroSize);
814  const int32 *cdaTable = (const int32 *)_staticres->loadRawData(k1TownsCDATable, cdaTableSize);
815 
816  // FIXME: It seems Kyra1 MAC CD includes AdLib and MIDI music and sfx, thus we enable
817  // support for those for now. (Based on patch #2767489 "Support for Mac Kyrandia 1 CD" by satz).
819  SoundResourceInfo_PC resInfoIntro(soundFilesIntro, soundFilesIntroSize);
820  SoundResourceInfo_PC resInfoIngame(soundFiles, soundFilesSize);
821  _sound->initAudioResourceInfo(kMusicIntro, &resInfoIntro);
822  _sound->initAudioResourceInfo(kMusicIngame, &resInfoIngame);
823  } else if (_flags.platform == Common::kPlatformFMTowns) {
824  SoundResourceInfo_Towns resInfoIntro(soundFiles, soundFilesSize, cdaTable, cdaTableSize);
825  SoundResourceInfo_Towns resInfoIngame(soundFiles, soundFilesSize, cdaTable, cdaTableSize);
826  _sound->initAudioResourceInfo(kMusicIntro, &resInfoIntro);
827  _sound->initAudioResourceInfo(kMusicIngame, &resInfoIngame);
828  } else if (_flags.platform == Common::kPlatformPC98) {
829  SoundResourceInfo_PC98 resInfoIntro("INTRO%d.DAT");
830  SoundResourceInfo_PC98 resInfoIngame("KYRAM%d.DAT");
831  _sound->initAudioResourceInfo(kMusicIntro, &resInfoIntro);
832  _sound->initAudioResourceInfo(kMusicIngame, &resInfoIngame);
833  }
834 }
835 
837  _screen->loadBitmap("MOUSE.CPS", 3, 3, 0);
838  _screen->_curPage = 2;
839  _shapes[0] = _screen->encodeShape(0, 0, 8, 10, 0);
840  _shapes[1] = _screen->encodeShape(0, 0x17, 0x20, 7, 0);
841  _shapes[2] = _screen->encodeShape(0x50, 0x12, 0x10, 9, 0);
842  _shapes[3] = _screen->encodeShape(0x60, 0x12, 0x10, 11, 0);
843  _shapes[4] = _screen->encodeShape(0x70, 0x12, 0x10, 9, 0);
844  _shapes[5] = _screen->encodeShape(0x80, 0x12, 0x10, 11, 0);
845  _shapes[6] = _screen->encodeShape(0x90, 0x12, 0x10, 10, 0);
846  _shapes[360] = _screen->encodeShape(0x28, 0, 0x10, 13, 0);
847  _screen->setMouseCursor(1, 1, 0);
848  _screen->setMouseCursor(1, 1, _shapes[0]);
849  _screen->setShapePages(5, 3);
850 }
851 
853  int curImage = 0xFF;
854  int videoPage = _screen->_curPage;
855  _screen->_curPage = 2;
856  for (int i = 0; i < 115; ++i) {
857  assert(i < _defaultShapeTableSize);
858  Shape *shape = &_defaultShapeTable[i];
859  if (shape->imageIndex == 0xFF) {
860  _shapes[i + 7] = 0;
861  continue;
862  }
863  if (shape->imageIndex != curImage) {
864  assert(shape->imageIndex < _characterImageTableSize);
866  curImage = shape->imageIndex;
867  }
868  _shapes[i + 7] = _screen->encodeShape(shape->x << 3, shape->y, shape->w << 3, shape->h, 1);
869  }
870  _screen->_curPage = videoPage;
871 }
872 
874  _screen->loadBitmap("EFFECTS.CPS", 3, 3, 0);
875  _screen->_curPage = 2;
876 
877  int currShape;
878  for (currShape = 173; currShape < 183; currShape++)
879  _shapes[currShape] = _screen->encodeShape((currShape - 173) * 24, 0, 24, 24, 1);
880 
881  for (currShape = 183; currShape < 190; currShape++)
882  _shapes[currShape] = _screen->encodeShape((currShape - 183) * 24, 24, 24, 24, 1);
883 
884  for (currShape = 190; currShape < 201; currShape++)
885  _shapes[currShape] = _screen->encodeShape((currShape - 190) * 24, 48, 24, 24, 1);
886 
887  for (currShape = 201; currShape < 206; currShape++)
888  _shapes[currShape] = _screen->encodeShape((currShape - 201) * 16, 106, 16, 16, 1);
889 }
890 
892  int shape;
893 
894  _screen->loadBitmap("JEWELS3.CPS", 3, 3, 0);
895  _screen->_curPage = 2;
896 
897  _shapes[323] = 0;
898 
899  for (shape = 1; shape < 6; shape++)
900  _shapes[323 + shape] = _screen->encodeShape((shape - 1) * 32, 0, 32, 17, 0);
901 
902  for (shape = 330; shape <= 334; shape++)
903  _shapes[shape] = _screen->encodeShape((shape - 330) * 32, 102, 32, 17, 0);
904 
905  for (shape = 335; shape <= 339; shape++)
906  _shapes[shape] = _screen->encodeShape((shape - 335) * 32, 17, 32, 17, 0);
907 
908  for (shape = 340; shape <= 344; shape++)
909  _shapes[shape] = _screen->encodeShape((shape - 340) * 32, 34, 32, 17, 0);
910 
911  for (shape = 345; shape <= 349; shape++)
912  _shapes[shape] = _screen->encodeShape((shape - 345) * 32, 51, 32, 17, 0);
913 
914  for (shape = 350; shape <= 354; shape++)
915  _shapes[shape] = _screen->encodeShape((shape - 350) * 32, 68, 32, 17, 0);
916 
917  for (shape = 355; shape <= 359; shape++)
918  _shapes[shape] = _screen->encodeShape((shape - 355) * 32, 85, 32, 17, 0);
919 
920 
921  _screen->loadBitmap("ITEMS.CPS", 3, 3, 0);
922  _screen->_curPage = 2;
923 
924  for (int i = 0; i < 107; i++) {
925  shape = findDuplicateItemShape(i);
926 
927  if (shape != -1)
928  _shapes[216 + i] = _shapes[216 + shape];
929  else
930  _shapes[216 + i] = _screen->encodeShape((i % 20) * 16, i / 20 * 16, 16, 16, 0);
931  }
932 
933  _res->loadFileToBuf("_ITEM_HT.DAT", &_itemHtDat, sizeof(_itemHtDat));
934 }
935 
937  _screen->loadBitmap("BUTTONS2.CPS", 3, 3, 0);
938  _screen->_curPage = 2;
940  _gui->_scrollUpButton.data1ShapePtr = _screen->encodeShape(24, 0, 24, 14, 1);
941  _gui->_scrollUpButton.data2ShapePtr = _screen->encodeShape(48, 0, 24, 14, 1);
943  _gui->_scrollDownButton.data1ShapePtr = _screen->encodeShape(24, 15, 24, 14, 1);
944  _gui->_scrollDownButton.data2ShapePtr = _screen->encodeShape(48, 15, 24, 14, 1);
945  _screen->_curPage = 0;
946 }
947 
949  _screen->clearPage(page);
950 
952  _screen->loadBitmap("MAIN15.CPS", page, page, &_screen->getPalette(0));
954  _screen->loadBitmap("MAIN_ENG.CPS", page, page, 0);
955  else if (_flags.lang == Common::FR_FRA)
956  _screen->loadBitmap("MAIN_FRE.CPS", page, page, 0);
957  else if (_flags.lang == Common::DE_DEU)
958  _screen->loadBitmap("MAIN_GER.CPS", page, page, 0);
959  else if (_flags.lang == Common::ES_ESP)
960  _screen->loadBitmap("MAIN_SPA.CPS", page, page, 0);
961  else if (_flags.lang == Common::IT_ITA)
962  _screen->loadBitmap("MAIN_ITA.CPS", page, page, 0);
963  else
964  warning("no main graphics file found");
965 
966  _screen->copyRegion(0, 0, 0, 0, 320, 200, page, 0, Screen::CR_NO_P_CHECK);
967 
969  _screen->copyPalette(1, 0);
970  _screen->setInterfacePalette(_screen->getPalette(1), 0x3F, 0x3F, 0x3F);
971 
972  // TODO: Move this to a better place
974  }
975 }
976 
990 
991  // assign music data
996  _sound->initAudioResourceInfo(kMusicIntro, &resInfoIntro);
997  _sound->initAudioResourceInfo(kMusicIngame, &resInfoIngame);
998  _sound->initAudioResourceInfo(kMusicFinale, &resInfoFinale);
999  } else if (_flags.platform == Common::kPlatformFMTowns) {
1000  SoundResourceInfo_TownsPC98V2 resInfoIntro(0, 0, "intro%d.twn", (const uint16*)_cdaTrackTableIntro, _cdaTrackTableIntroSize >> 1);
1001  SoundResourceInfo_TownsPC98V2 resInfoIngame(0, 0, "km%02d.twn", (const uint16*)_cdaTrackTableIngame, _cdaTrackTableIngameSize >> 1);
1002  SoundResourceInfo_TownsPC98V2 resInfoFinale(0, 0, "finale%d.twn", (const uint16*)_cdaTrackTableFinale, _cdaTrackTableFinaleSize >> 1);
1003  _sound->initAudioResourceInfo(kMusicIntro, &resInfoIntro);
1004  _sound->initAudioResourceInfo(kMusicIngame, &resInfoIngame);
1005  _sound->initAudioResourceInfo(kMusicFinale, &resInfoFinale);
1006  } else if (_flags.platform == Common::kPlatformPC98) {
1007  SoundResourceInfo_TownsPC98V2 resInfoIntro(0, 0, "intro%d.86", 0, 0);
1008  SoundResourceInfo_TownsPC98V2 resInfoIngame(0, 0, "km%02d.86", 0, 0);
1009  SoundResourceInfo_TownsPC98V2 resInfoFinale(0, 0, "finale%d.86", 0, 0);
1010  _sound->initAudioResourceInfo(kMusicIntro, &resInfoIntro);
1011  _sound->initAudioResourceInfo(kMusicIngame, &resInfoIngame);
1012  _sound->initAudioResourceInfo(kMusicFinale, &resInfoFinale);
1013  }
1014 }
1015 
1017  int tmp = 0;
1026 }
1027 
1028 const uint8 Screen_LoK_16::_palette16[48] = {
1029  0x00, 0x00, 0x00, 0x02, 0x07, 0x0B, 0x0C, 0x06, 0x04,
1030  0x0E, 0x09, 0x07, 0x00, 0x06, 0x03, 0x00, 0x0C, 0x07,
1031  0x0A, 0x0A, 0x0A, 0x08, 0x03, 0x03, 0x02, 0x02, 0x02,
1032  0x08, 0x0B, 0x0E, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x0A,
1033  0x05, 0x05, 0x05, 0x00, 0x0F, 0x0F, 0x0F, 0x0D, 0x00,
1034  0x0F, 0x0F, 0x0F
1035 };
1036 
1037 const ScreenDim Screen_LoK::_screenDimTable[] = {
1038  { 0x00, 0x00, 0x28, 0xC8, 0x0F, 0x0C, 0x00, 0x00 },
1039  { 0x08, 0x48, 0x18, 0x38, 0x0F, 0x0C, 0x00, 0x00 },
1040  { 0x01, 0x08, 0x26, 0x80, 0x0F, 0x0C, 0x00, 0x00 },
1041  { 0x00, 0xC2, 0x28, 0x06, 0x0F, 0x0C, 0x00, 0x00 },
1042  { 0x00, 0x90, 0x28, 0x38, 0x04, 0x0C, 0x00, 0x00 },
1043  { 0x01, 0x94, 0x26, 0x30, 0x04, 0x1B, 0x00, 0x00 },
1044  { 0x00, 0x90, 0x28, 0x38, 0x0F, 0x0D, 0x00, 0x00 },
1045  { 0x01, 0x96, 0x26, 0x32, 0x0F, 0x0D, 0x00, 0x00 },
1046  { 0x00, 0x00, 0x28, 0x88, 0x0F, 0x0C, 0x00, 0x00 },
1047  { 0x01, 0x20, 0x26, 0x80, 0x0F, 0x0C, 0x00, 0x00 },
1048  { 0x03, 0x28, 0x22, 0x46, 0x0F, 0x0D, 0x00, 0x00 }
1049 };
1050 
1052 
1053 const ScreenDim Screen_HoF::_screenDimTable[] = {
1054  { 0x00, 0x00, 0x28, 0xC8, 0xC7, 0xCF, 0x00, 0x00 },
1055  { 0x08, 0x48, 0x18, 0x38, 0xC7, 0xCF, 0x00, 0x00 },
1056  { 0x00, 0x00, 0x28, 0x90, 0xC7, 0xCF, 0x00, 0x00 },
1057  { 0x00, 0xC2, 0x28, 0x06, 0xC7, 0xCF, 0x00, 0x00 },
1058  { 0x00, 0x90, 0x28, 0x38, 0x96, 0xCF, 0x00, 0x00 },
1059  { 0x01, 0x94, 0x26, 0x30, 0x96, 0x1B, 0x00, 0x00 },
1060  { 0x00, 0x90, 0x28, 0x38, 0xC7, 0xCC, 0x00, 0x00 },
1061  { 0x01, 0x96, 0x26, 0x32, 0xC7, 0xCC, 0x00, 0x00 },
1062  { 0x00, 0x00, 0x28, 0x88, 0xC7, 0xCF, 0x00, 0x00 },
1063  { 0x00, 0x08, 0x28, 0xB8, 0xC7, 0xCF, 0x00, 0x00 },
1064  { 0x01, 0x28, 0x26, 0x46, 0xC7, 0xCC, 0x00, 0x00 },
1065  { 0x0A, 0x96, 0x14, 0x30, 0x19, 0xF0, 0x00, 0x00 } // menu, just present for current menu code
1066 };
1067 
1069 
1070 const ScreenDim Screen_MR::_screenDimTable[] = {
1071  { 0x00, 0x00, 0x28, 0xC8, 0xFF, 0xF0, 0x00, 0x00 },
1072  { 0x08, 0x48, 0x18, 0x38, 0xFF, 0xF0, 0x00, 0x00 },
1073  { 0x00, 0x00, 0x28, 0xBC, 0xFF, 0xF0, 0x00, 0x00 },
1074  { 0x0A, 0x96, 0x14, 0x30, 0x19, 0xF0, 0x00, 0x00 }
1075 };
1076 
1078 
1080  4, 4, 0, -4, -4, -4, 0, 4
1081 };
1082 
1084  0, -2, -2, -2, 0, 2, 2, 2
1085 };
1086 
1088  0, 4, 4, 4, 0, -4, -4, -4
1089 };
1090 
1092  -2, -2, 0, 2, 2, 2, 0, -2
1093 };
1094 
1096  95, 115, 135, 155, 175, 95, 115, 135, 155, 175
1097 };
1098 
1099 const uint8 KyraEngine_LoK::_itemPosY[] = {
1100  160, 160, 160, 160, 160, 181, 181, 181, 181, 181
1101 };
1102 
1104  GUI_V1_BUTTON(_scrollUpButton, 0x12, 1, 1, 1, 0x483, 0, 0, 0, 0x18, 0x0F, 0);
1105  GUI_V1_BUTTON(_scrollDownButton, 0x13, 1, 1, 1, 0x483, 0, 0, 0, 0x18, 0x0F, 0);
1106 
1107  GUI_V1_BUTTON(_menuButtonData[0], 0x0C, 1, 1, 1, 0x487, 0, 0, 0, 0, 0, 0);
1108  GUI_V1_BUTTON(_menuButtonData[1], 0x0D, 1, 1, 1, 0x487, 0, 0, 0, 0, 0, 0);
1109  GUI_V1_BUTTON(_menuButtonData[2], 0x0E, 1, 1, 1, 0x487, 0, 0, 0, 0, 0, 0);
1110  GUI_V1_BUTTON(_menuButtonData[3], 0x0F, 1, 1, 1, 0x487, 0, 0, 0, 0, 0, 0);
1111  GUI_V1_BUTTON(_menuButtonData[4], 0x10, 1, 1, 1, 0x487, 0, 0, 0, 0, 0, 0);
1112  GUI_V1_BUTTON(_menuButtonData[5], 0x11, 1, 1, 1, 0x487, 0, 0, 0, 0, 0, 0);
1113 
1114  delete[] _menu;
1115  _menu = new Menu[6];
1116  assert(_menu);
1117 
1118  Button::Callback quitPlayingFunctor = BUTTON_FUNCTOR(GUI_LoK, this, &GUI_LoK::quitPlaying);
1119  Button::Callback loadGameMenuFunctor = BUTTON_FUNCTOR(GUI_LoK, this, &GUI_LoK::loadGameMenu);
1120  Button::Callback cancelSubMenuFunctor = BUTTON_FUNCTOR(GUI_LoK, this, &GUI_LoK::cancelSubMenu);
1121 
1122  GUI_V1_MENU(_menu[0], -1, -1, 0x100, 0x8B, 248, 249, 250, 0, 251, -1, 8, 0, 5, -1, -1, -1, -1);
1123  GUI_V1_MENU_ITEM(_menu[0].item[0], 1, 0, 0, 0, -1, -1, 0x1E, 0xDC, 0x0F, 252, 253, -1, 0, 248, 249, 250, -1, 0, 0, 0, 0, 0);
1124  GUI_V1_MENU_ITEM(_menu[0].item[1], 1, 0, 0, 0, -1, -1, 0x2F, 0xDC, 0x0F, 252, 253, -1, 0, 248, 249, 250, -1, 0, 0, 0, 0, 0);
1125  GUI_V1_MENU_ITEM(_menu[0].item[2], 1, 0, 0, 0, -1, -1, 0x40, 0xDC, 0x0F, 252, 253, -1, 0, 248, 249, 250, -1, 0, 0, 0, 0, 0);
1126  GUI_V1_MENU_ITEM(_menu[0].item[3], 1, 0, 0, 0, -1, -1, 0x51, 0xDC, 0x0F, 252, 253, -1, 0, 248, 249, 250, -1, 0, 0, 0, 0, 0);
1127  GUI_V1_MENU_ITEM(_menu[0].item[4], 1, 0, 0, 0, -1, 0, 0x6E, 0xDC, 0x0F, 252, 253, -1, 255, 248, 249, 250, -1, 0, 0, 0, 0, 0);
1128  _menu[0].item[0].callback = loadGameMenuFunctor;
1129  _menu[0].item[1].callback = BUTTON_FUNCTOR(GUI_LoK, this, &GUI_LoK::saveGameMenu);
1130  _menu[0].item[2].callback = BUTTON_FUNCTOR(GUI_LoK, this, &GUI_LoK::gameControlsMenu);
1131  _menu[0].item[3].callback = quitPlayingFunctor;
1132  _menu[0].item[4].callback = BUTTON_FUNCTOR(GUI_LoK, this, &GUI_LoK::resumeGame);
1133 
1134  GUI_V1_MENU(_menu[1], -1, -1, 0x140, 0x38, 248, 249, 250, 0, 254, -1, 8, 0, 2, -1, -1, -1, -1);
1135  GUI_V1_MENU_ITEM(_menu[1].item[0], 1, 0, 0, 0, 0x18, 0, 0x1E, 0x48, 0x0F, 252, 253, -1, 255, 248, 249, 250, -1, 0, 0, 0, 0, 0);
1136  GUI_V1_MENU_ITEM(_menu[1].item[1], 1, 0, 0, 0, 0xD8, 0, 0x1E, 0x48, 0x0F, 252, 253, -1, 255, 248, 249, 250, -1, 0, 0, 0, 0, 0);
1137  _menu[1].item[0].callback = BUTTON_FUNCTOR(GUI_LoK, this, &GUI_LoK::quitConfirmYes);
1138  _menu[1].item[1].callback = BUTTON_FUNCTOR(GUI_LoK, this, &GUI_LoK::quitConfirmNo);
1139 
1140  GUI_V1_MENU(_menu[2], -1, -1, 0x120, 0xA0, 248, 249, 250, 0, 251, -1, 8, 0, 6, 132, 22, 132, 124);
1141  GUI_V1_MENU_ITEM(_menu[2].item[0], 1, 0, 0, 0, -1, 255, 0x27, 0x100, 0x0F, 252, 253, 5, 0, 248, 249, 250, -1, 0, 0, 0, 0, 0);
1142  GUI_V1_MENU_ITEM(_menu[2].item[1], 1, 0, 0, 0, -1, 255, 0x38, 0x100, 0x0F, 252, 253, 5, 0, 248, 249, 250, -1, 0, 0, 0, 0, 0);
1143  GUI_V1_MENU_ITEM(_menu[2].item[2], 1, 0, 0, 0, -1, 255, 0x49, 0x100, 0x0F, 252, 253, 5, 0, 248, 249, 250, -1, 0, 0, 0, 0, 0);
1144  GUI_V1_MENU_ITEM(_menu[2].item[3], 1, 0, 0, 0, -1, 255, 0x5A, 0x100, 0x0F, 252, 253, 5, 0, 248, 249, 250, -1, 0, 0, 0, 0, 0);
1145  GUI_V1_MENU_ITEM(_menu[2].item[4], 1, 0, 0, 0, -1, 255, 0x6B, 0x100, 0x0F, 252, 253, 5, 0, 248, 249, 250, -1, 0, 0, 0, 0, 0);
1146  GUI_V1_MENU_ITEM(_menu[2].item[5], 1, 0, 0, 0, 0xB8, 0, 0x86, 0x58, 0x0F, 252, 253, -1, 255, 248, 249, 250, -1, 0, 0, 0, 0, 0);
1147  _menu[2].item[5].callback = cancelSubMenuFunctor;
1148 
1149  GUI_V1_MENU(_menu[3], -1, -1, 288, 67, 248, 249, 250, 0, 251, -1, 8, 0, 2, -1, -1, -1, -1);
1150  GUI_V1_MENU_ITEM(_menu[3].item[0], 1, 0, 0, 0, 24, 0, 44, 85, 15, 252, 253, -1, 255, 248, 249, 250, -1, 0, 0, 0, 0, 0);
1151  GUI_V1_MENU_ITEM(_menu[3].item[1], 1, 0, 0, 0, 179, 0, 44, 85, 15, 252, 253, -1, 255, 248, 249, 250, -1, 0, 0, 0, 0, 0);
1152  _menu[3].item[0].callback = BUTTON_FUNCTOR(GUI_LoK, this, &GUI_LoK::savegameConfirm);
1153  _menu[3].item[1].callback = cancelSubMenuFunctor;
1154 
1155  GUI_V1_MENU(_menu[4], -1, -1, 0xD0, 0x4C, 248, 249, 250, 0, 251, -1, 8, 0, 2, -1, -1, -1, -1);
1156  GUI_V1_MENU_ITEM(_menu[4].item[0], 1, 0, 0, 0, -1, -1, 0x1E, 0xB4, 0x0F, 252, 253, -1, 0, 248, 249, 250, -1, 0, 0, 0, 0, 0);
1157  GUI_V1_MENU_ITEM(_menu[4].item[1], 1, 0, 0, 0, -1, -1, 0x2F, 0xB4, 0x0F, 252, 253, -1, 0, 248, 249, 250, -1, 0, 0, 0, 0, 0);
1158  _menu[4].item[0].callback = loadGameMenuFunctor;
1159  _menu[4].item[1].callback = quitPlayingFunctor;
1160 
1161  GUI_V1_MENU(_menu[5], -1, -1, 0x130, 0x99, 248, 249, 250, 0, 251, -1, 8, 0, 6, -1, -1, -1, -1);
1162  GUI_V1_MENU_ITEM(_menu[5].item[0], 1, 0, 0, 0, 0xA5, 0, 0x1E, 0x80, 0x0F, 252, 253, 5, 0, 248, 249, 250, -1, 0, 0x10, 0x20, 0, 0);
1163  GUI_V1_MENU_ITEM(_menu[5].item[1], 1, 0, 0, 0, 0xA5, 0, 0x2F, 0x80, 0x0F, 252, 253, 5, 0, 248, 249, 250, -1, 0, 0x10, 0x31, 0, 0);
1164  GUI_V1_MENU_ITEM(_menu[5].item[2], 1, 0, 0, 0, 0xA5, 0, 0x40, 0x80, 0x0F, 252, 253, 5, 0, 248, 249, 250, -1, 0, 0x10, 0x42, 0, 0);
1165  GUI_V1_MENU_ITEM(_menu[5].item[3], 1, 0, 0, 0, 0xA5, 0, 0x51, 0x80, 0x0F, 252, 253, 5, 0, 248, 249, 250, -1, 0, 0x10, 0x53, 0, 0);
1166  GUI_V1_MENU_ITEM(_menu[5].item[4], 1, 0, 0, 0, 0xA5, 0, 0x62, 0x80, 0x0F, 252, 253, 5, 0, 248, 249, 250, -1, 0, 0x10, 0x65, 0, 0);
1167  GUI_V1_MENU_ITEM(_menu[5].item[5], 1, 0, 0, 0, -1, 0, 0x7F, 0x6C, 0x0F, 252, 253, -1, 255, 248, 249, 250, -1, 0, 0, 0, 0, 0);
1168  _menu[5].item[0].callback = BUTTON_FUNCTOR(GUI_LoK, this, &GUI_LoK::controlsChangeMusic);
1169  _menu[5].item[1].callback = BUTTON_FUNCTOR(GUI_LoK, this, &GUI_LoK::controlsChangeSounds);
1170  _menu[5].item[2].callback = BUTTON_FUNCTOR(GUI_LoK, this, &GUI_LoK::controlsChangeWalk);
1171  _menu[5].item[4].callback = BUTTON_FUNCTOR(GUI_LoK, this, &GUI_LoK::controlsChangeText);
1172  _menu[5].item[5].callback = BUTTON_FUNCTOR(GUI_LoK, this, &GUI_LoK::controlsApply);
1173 
1174  // The AMIGA version uses different colors, due to its 32 color nature. We did setup the 256 color version
1175  // colors above, so we need to overwrite those with the correct values over here.
1177  for (int i = 0; i < 6; ++i) {
1178  _menu[i].bkgdColor = 17;
1179  _menu[i].color1 = 31;
1180  _menu[i].color2 = 18;
1181 
1182  for (int j = 0; j < _menu[i].numberOfItems; ++j) {
1183  _menu[i].item[j].bkgdColor = 17;
1184  _menu[i].item[j].color1 = 31;
1185  _menu[i].item[j].color2 = 18;
1186  }
1187  }
1188  }
1189 }
1190 
1192  delete[] _buttonData;
1193  delete[] _buttonDataListPtr;
1194 
1195  _buttonData = new Button[15];
1196  assert(_buttonData);
1197  _buttonDataListPtr = new Button *[15];
1198  assert(_buttonDataListPtr);
1199 
1200  GUI_V1_BUTTON(_buttonData[1], 0x01, 1, 1, 1, 0x0487, 0, 0x009, 0xA4, 0x36, 0x1E, 0);
1202 
1203  Button::Callback inventoryFunctor = BUTTON_FUNCTOR(KyraEngine_LoK, this, &KyraEngine_LoK::buttonInventoryCallback);
1204  for (int i = 2; i <= 10; ++i)
1205  _buttonData[i].buttonCallback = inventoryFunctor;
1206  _buttonData[0].buttonCallback = inventoryFunctor;
1207  GUI_V1_BUTTON(_buttonData[0], 0x02, 0, 0, 0, 0x0400, 0, 0x05D, 0x9E, 0x13, 0x13, 0);
1208  GUI_V1_BUTTON(_buttonData[2], 0x03, 0, 0, 0, 0x0400, 0, 0x071, 0x9E, 0x13, 0x14, 0);
1209  GUI_V1_BUTTON(_buttonData[3], 0x04, 0, 0, 0, 0x0400, 0, 0x085, 0x9E, 0x13, 0x14, 0);
1210  GUI_V1_BUTTON(_buttonData[4], 0x05, 0, 0, 0, 0x0400, 0, 0x099, 0x9E, 0x13, 0x14, 0);
1211  GUI_V1_BUTTON(_buttonData[5], 0x06, 0, 0, 0, 0x0400, 0, 0x0AD, 0x9E, 0x13, 0x14, 0);
1212  GUI_V1_BUTTON(_buttonData[6], 0x07, 0, 0, 0, 0x0400, 0, 0x05D, 0xB3, 0x13, 0x14, 0);
1213  GUI_V1_BUTTON(_buttonData[7], 0x08, 0, 0, 0, 0x0400, 0, 0x071, 0xB3, 0x13, 0x14, 0);
1214  GUI_V1_BUTTON(_buttonData[8], 0x09, 0, 0, 0, 0x0400, 0, 0x085, 0xB3, 0x13, 0x14, 0);
1215  GUI_V1_BUTTON(_buttonData[9], 0x0A, 0, 0, 0, 0x0400, 0, 0x099, 0xB3, 0x13, 0x14, 0);
1216  GUI_V1_BUTTON(_buttonData[10], 0x0B, 0, 0, 0, 0x0400, 0, 0x0AD, 0xB3, 0x13, 0x14, 0);
1217 
1218  Button::Callback amuletFunctor = BUTTON_FUNCTOR(KyraEngine_LoK, this, &KyraEngine_LoK::buttonAmuletCallback);
1219  GUI_V1_BUTTON(_buttonData[11], 0x15, 1, 1, 1, 0x0487, 0, 0x0FD, 0x9C, 0x1A, 0x12, 0);
1220  GUI_V1_BUTTON(_buttonData[12], 0x16, 1, 1, 1, 0x0487, 0, 0x0E7, 0xAA, 0x1A, 0x12, 0);
1221  GUI_V1_BUTTON(_buttonData[13], 0x17, 1, 1, 1, 0x0487, 0, 0x0FD, 0xB5, 0x1A, 0x12, 0);
1222  GUI_V1_BUTTON(_buttonData[14], 0x18, 1, 1, 1, 0x0487, 0, 0x113, 0xAA, 0x1A, 0x12, 0);
1223  for (int i = 11; i <= 14; ++i)
1224  _buttonData[i].buttonCallback = amuletFunctor;
1225 
1226  for (int i = 1; i < 15; ++i)
1227  _buttonDataListPtr[i - 1] = &_buttonData[i];
1228  _buttonDataListPtr[14] = 0;
1229 }
1230 
1232  0xAD, 0xB7, 0xBE, 0x00
1233 };
1234 
1236  0xB1, 0xB9, 0xC2, 0x00
1237 };
1238 
1240  0xB2, 0xBA, 0xC3, 0x00
1241 };
1242 
1244  0xB6, 0xBD, 0xC8, 0x00
1245 };
1246 
1247 const uint16 KyraEngine_LoK::_amuletX[] = { 231, 275, 253, 253 };
1248 const uint16 KyraEngine_LoK::_amuletY[] = { 170, 170, 159, 181 };
1249 
1250 const uint16 KyraEngine_LoK::_amuletX2[] = { 0x000, 0x0FD, 0x0E7, 0x0FD, 0x113, 0x000 };
1251 const uint16 KyraEngine_LoK::_amuletY2[] = { 0x000, 0x09F, 0x0AA, 0x0B5, 0x0AA, 0x000 };
1252 
1254  -1, 0, -1, 1, 0, 3, 0, 2,
1255  0, 4, 1, 2, 1, 3, 1, 4,
1256  1, 92, 1, 6, 1, 7, 2, 2,
1257  2, 3, 2, 4, 2, 5, 2, 6,
1258  2, 7, 3, 3, 3, 4, 1, 8,
1259  1, 9, 4, 2, 4, 3, 4, 4,
1260  4, 5, 4, 6, 4, 7, 4, 8,
1261  1, 11, 1, 12, 1, 14, 1, 13,
1262  4, 9, 5, 12, 6, 2, 6, 6,
1263  6, 7, 6, 8, 6, 9, 6, 3,
1264  6, 4, 6, 5, 7, 2, 7, 3,
1265  7, 4, 7, 5, 7, 6, 7, 7,
1266  7, 8, 7, 9, 8, 2, 8, 3,
1267  8, 4, 8, 5, 6, 11, 5, 11
1268 };
1269 
1271 
1273  0, 1, 32, 26, 31, 30, 33, 33,
1274  32, 17, 27, 32, 25, 29, 25, 24,
1275  23, 26, 26, 30, 28, 21, 21, 15,
1276  3, 15, 23, 25, 33, 21, 30, 22,
1277  15, 3, 33, 11, 12, 13, 14, 22,
1278  22, 22, 3, 3, 3, 23, 3, 3,
1279  23, 3, 3, 3, 3, 3, 3, 33
1280 };
1281 
1283 
1284 // kyra engine v2 static data
1285 
1286 const int GUI_v2::_sliderBarsPosition[] = {
1287  0x92, 0x1F, 0x92, 0x30, 0x92, 0x41, 0x92, 0x52
1288 };
1289 
1290 // kyra 2 static res
1291 
1292 const char *const KyraEngine_HoF::_languageExtension[] = {
1293  "ENG",
1294  "FRE",
1295  "GER",/*,
1296  "ITA", Italian and Spanish were never included
1297  "SPA"*/
1298  "JPN",
1299 };
1300 
1301 const char *const KyraEngine_HoF::_scriptLangExt[] = {
1302  "EMC",
1303  "FMC",
1304  "GMC",/*,
1305  "IMC", Italian and Spanish were never included
1306  "SMC"*/
1307  "JMC"
1308 };
1309 
1311  0x19, 0x09, 0x09, 0x12, 0x12, 0x12, 0x09, 0x09
1312 };
1313 
1314 const int KyraEngine_HoF::_inventoryX[] = {
1315  0x4F, 0x63, 0x77, 0x8B, 0x9F, 0x4F, 0x63, 0x77, 0x8B, 0x9F
1316 };
1317 
1318 const int KyraEngine_HoF::_inventoryY[] = {
1319  0x95, 0x95, 0x95, 0x95, 0x95, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA
1320 };
1321 
1322 const byte KyraEngine_HoF::_itemStringMap[] = {
1323  2, 2, 0, 0, 2, 2, 2, 0,
1324  2, 2, 0, 0, 0, 2, 0, 0,
1325  0, 0, 0, 0, 2, 0, 0, 0,
1326  0, 1, 0, 2, 2, 2, 2, 0,
1327  3, 0, 3, 2, 2, 2, 3, 2,
1328  2, 2, 0, 0, 0, 0, 0, 0,
1329  0, 0, 0, 0, 2, 0, 0, 0,
1330  0, 0, 0, 0, 0, 2, 0, 0,
1331  2, 0, 0, 0, 0, 0, 0, 2,
1332  2, 0, 0, 0, 2, 2, 2, 2,
1333  2, 2, 2, 2, 2, 2, 2, 2,
1334  2, 2, 2, 2, 2, 2, 2, 0,
1335  2, 2, 2, 0, 0, 1, 3, 2,
1336  2, 2, 2, 2, 2, 0, 0, 0,
1337  0, 2, 2, 1, 0, 1, 2, 0,
1338  0, 0, 0, 0, 0, 2, 2, 2,
1339  2, 2, 2, 2, 0, 2, 2, 2,
1340  2, 3, 2, 0, 0, 0, 0, 1,
1341  2, 0, 0, 0, 0, 0, 0, 0,
1342  0, 0, 0, 0, 0, 0, 0, 0,
1343  2, 2, 0, 0, 0, 0, 0, 2,
1344  0, 2, 0, 0, 0, 0, 0, 0
1345 };
1346 
1348 
1350  -1, 0, -1, 1, 9, 6, 5, 4,
1351  8, 3, -2, 0, -2, 0, 2, 3,
1352  -2, 0, -2, 0, -2, 0, -2, 0,
1353  0, 2, 0, 3, 1, 2, 1, 3,
1354  2, 2, 2, 0, 3, 2, 3, 3,
1355  3, 4, 4, 2, 5, 2, 5, 3,
1356  5, 4, 6, 2, 6, 3, 6, 4,
1357  6, 5, 6, 6, 6, 7, 6, 8,
1358  6, 0, 6, 9, 7, 2, 7, 3,
1359  7, 4, 7, 5, 8, 6, 7, 6,
1360  7, 7, 7, 8, 7, 9, 8, 2,
1361  14, 2, 8, 4, 8, 7, 8, 8,
1362  8, 9, 9, 2, 9, 3, 9, 4,
1363  9, 5, 9, 7, 9, 8, 9, 9,
1364  10, 2, 10, 3, 10, 4, 10, 5,
1365  10, 6, 10, 7, 11, 2, 11, 3,
1366  11, 4, 11, 5, 11, 6, 11, 7,
1367  11, 8, 11, 9, 12, 2, 12, 3,
1368  12, 4, 12, 5, 12, 6, 12, 7,
1369  12, 8, 12, 9, 13, 2, 4, 7,
1370  14, 3, 14, 4, 14, 5, 4, 2,
1371  4, 3, 4, 4, 4, 5, 4, 6
1372 };
1373 
1375 
1377  -1, -1, -1, -1, -1, -1, -1, -1,
1378  -1, -1, -1, 49, 27, 5, 36, 13,
1379  -1, -1, 68, 55, 37, 73, 43, 61,
1380  49, -1, 56, -1, 62, 38, -1, -1,
1381  61, -1, -1, 31, 70, 2, 45, -1,
1382  45, -1, -1, -1, 10, 14, 24, 25,
1383  -1, -1, 59, 9, 26, -1, 71, 79,
1384  12, 9, -1, -1, 61, -1, -1, 65,
1385  66, 50, 27, 24, 29, 29, 15, 16,
1386  17, 18, 19, 20, 21, 57, -1, -1,
1387  34, 3, -1, 56, 56, -1, -1, 50,
1388  43, 68, 32, 33, 67, 25, 60, 40,
1389  39, 11, 24, 2, 60, 3, 46, 54,
1390  1, 8, -1, -1, 41, 42, 37, 74,
1391  69, 62, 58, 27, -1, -1, -1, -1,
1392  48, 4, -1, 25, 39, 40, 24, 58,
1393  35, 4, 4, 4, -1, 50, -1, 6,
1394  8, -1, -1, -1, -1, -1, 53, 52,
1395  -1, 63, 47, -1, -1, -1, 53, -1,
1396  29, -1, -1, 79, -1, 41, 12, -1,
1397  -1, -1, 26, -1, 7, 27, 72, 51,
1398  23, 51, 64, -1, -1, -1, 27, 76,
1399  77, 78, 28, 47, -1, -1, 53, -1,
1400  -1, -1, -1, -1, 2, 22, -1, 51,
1401  58, -1, -1, 30, -1, 79, -1, -1,
1402  22, 36, 1, -1, 12, 1, -1, -1,
1403  41, -1, 76, 77, 47
1404 };
1405 
1407 
1408 const int8 KyraEngine_HoF::_gmSfxMap[] = {
1409  -1, -1, -1, -1, -1, -1, -1, -1,
1410  -1, -1, -1, 31, 25, 19, 12, 4,
1411  -1, -1, 46, 18, -1, 21, 15, -1,
1412  31, -1, -1, -1, -1, -1, 47, -1,
1413  33, -1, 36, -1, -1, 23, 48, -1,
1414  48, -1, -1, 49, -1, 50, 22, 24,
1415  51, -1, 52, 20, -1, -1, 22, 53,
1416  3, 20, 47, 54, 33, -1, 55, 56,
1417  57, 33, -1, 51, 58, -1, 5, 6,
1418  7, 8, 9, 10, 11, 22, -1, -1,
1419  -1, 24, -1, 26, 17, -1, -1, 33,
1420  15, -1, 23, 23, -1, 22, -1, 23,
1421  24, 21, 22, -1, -1, 24, 16, -1,
1422  1, 48, -1, -1, 13, 14, -1, 29,
1423  64, -1, -1, 25, -1, -1, -1, -1,
1424  -1, 2, 13, 24, 23, 23, 22, -1,
1425  60, 2, 2, 2, -1, 33, -1, 61,
1426  48, 62, -1, 39, -1, -1, 28, 63,
1427  33, -1, 17, -1, 45, 45, 28, 55,
1428  34, -1, -1, 34, 55, 13, -1, 47,
1429  54, -1, -1, 33, 44, 25, -1, -1,
1430  -1, 32, -1, -1, -1, -1, 25, 37,
1431  37, 37, 26, 43, -1, 42, 24, -1,
1432  -1, -1, -1, -1, 23, 32, -1, 32,
1433  -1, -1, -1, 27, 41, 34, -1, 40,
1434  32, -1, 16, 40, -1, 16, 38, 39,
1435  13, -1, 37, 28, 33
1436 };
1437 
1439 
1441  -1, -1, -1, -1, -1, -1, -1, -1,
1442  -1, -1, -1, 0, 1, 2, 3, 4,
1443  5, 6, -1, 7, 8, 9, 10, -1,
1444  6, -1, -1, 11, -1, 12, -1, -1,
1445  -1, -1, -1, 13, -1, 39, 14, 15,
1446  3, 16, 16, -1, -1, -1, 17, 18,
1447  5, -1, -1, -1, -1, -1, 19, 20,
1448  21, -1, 22, 23, -1, -1, -1, -1,
1449  -1, -1, 39, -1, 24, 24, 25, 26,
1450  27, 28, 29, 30, 31, 32, -1, -1,
1451  -1, 2, -1, -1, -1, -1, -1, 21,
1452  10, -1, -1, -1, -1, 17, -1, 17,
1453  40, -1, 18, 38, -1, 40, 33, -1,
1454  34, 35, 36, 37, 38, 39, 40, 41,
1455  -1, -1, -1, -1, -1, -1, -1, -1,
1456  -1, -1, 42, 43, 44, 45, -1, -1,
1457  -1, -1, -1, -1, 46, -1, 5, 47,
1458  48, -1, -1, -1, -1, -1, 49, 50,
1459  -1, 40, -1, 24, -1, -1, 43, -1,
1460  -1, 38, -1, -1, -1, 51, -1, -1,
1461  -1, -1, -1, -1, -1, 9, -1, 52,
1462  53, 40, -1, -1, -1, -1, -1, -1,
1463  -1, -1, 50, -1, -1, -1, 11, 54,
1464  5, -1, -1, -1, -1, 11, 7, 55,
1465  8, 36, -1, -1, -1, -1, -1, -1,
1466  11, -1, -1, -1, -1, -1, -1, -1,
1467  -1, -1, -1, -1, 24
1468 };
1469 
1471 
1473  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1474  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1475  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1476  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1477  -1, -1, -1, -1, -1, -1, 201, -1, 184, 73,
1478 
1479  74, 212, 78, 184, 104, 185, 99, 102, -1, -1,
1480  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1481  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1482  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1483  -1, -1, -1, -1, -1, -1, -1, 121, 108, 20,
1484 
1485  22, 25, 168, 171, 207, 174, 38, 39, 40, 41,
1486  44, 109, 46, 178, 180, 53, 181, 56, 106, 182,
1487  59, 62, 183, -1, -1, -1, -1, -1, -1, -1,
1488  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1489  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1490 
1491  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1492  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1493  -1, -1, -1, -1, 92, 15, 107, 191, -1, 134,
1494  -1, 197, -1, 205, 152, 139, -1, -1, -1, -1
1495 };
1496 
1498  delete[] _inventoryButtons;
1499 
1500  _inventoryButtons = new Button[15];
1501  assert(_inventoryButtons);
1502 
1503  GUI_V2_BUTTON(_inventoryButtons[0], 0x1, 0x4F, 0, 1, 1, 1, 0x4487, 0, 0x00A, 0x95, 0x39, 0x1D, 0xC7, 0xCF, 0xC7, 0xCF, 0xC7, 0xCF, 0);
1505 
1506  GUI_V2_BUTTON(_inventoryButtons[1], 0x2, 0x00, 0, 1, 1, 1, 0x4487, 0, 0x104, 0x90, 0x3C, 0x2C, 0xC7, 0xCF, 0xC7, 0xCF, 0xC7, 0xCF, 0);
1508 
1509  GUI_V2_BUTTON(_inventoryButtons[2], 0x5, 0x00, 0, 1, 1, 1, 0x4487, 0, 0x0FA, 0x90, 0x0A, 0x2C, 0xC7, 0xCF, 0xC7, 0xCF, 0xC7, 0xCF, 0);
1511 
1512  GUI_V2_BUTTON(_inventoryButtons[3], 0x3, 0x00, 0, 1, 1, 1, 0x4487, 0, 0x0CE, 0x90, 0x2C, 0x2C, 0xC7, 0xCF, 0xC7, 0xCF, 0xC7, 0xCF, 0);
1514 
1515  GUI_V2_BUTTON(_inventoryButtons[4], 0x4, 0x00, 0, 1, 1, 1, 0x4487, 0, 0x0B6, 0x9D, 0x18, 0x1E, 0xC7, 0xCF, 0xC7, 0xCF, 0xC7, 0xCF, 0);
1517 
1518  Button::Callback inventoryCallback = BUTTON_FUNCTOR(KyraEngine_HoF, this, &KyraEngine_HoF::buttonInventory);
1519  GUI_V2_BUTTON(_inventoryButtons[5], 0x6, 0x00, 0, 0, 0, 0, 0x1100, 0, 0x04D, 0x92, 0x13, 0x15, 0xC7, 0xCF, 0xC7, 0xCF, 0xC7, 0xCF, 0);
1520  GUI_V2_BUTTON(_inventoryButtons[6], 0x7, 0x00, 0, 0, 0, 0, 0x1100, 0, 0x061, 0x92, 0x13, 0x15, 0xC7, 0xCF, 0xC7, 0xCF, 0xC7, 0xCF, 0);
1521  GUI_V2_BUTTON(_inventoryButtons[7], 0x8, 0x00, 0, 0, 0, 0, 0x1100, 0, 0x075, 0x92, 0x13, 0x15, 0xC7, 0xCF, 0xC7, 0xCF, 0xC7, 0xCF, 0);
1522  GUI_V2_BUTTON(_inventoryButtons[8], 0x9, 0x00, 0, 0, 0, 0, 0x1100, 0, 0x089, 0x92, 0x13, 0x15, 0xC7, 0xCF, 0xC7, 0xCF, 0xC7, 0xCF, 0);
1523  GUI_V2_BUTTON(_inventoryButtons[9], 0xA, 0x00, 0, 0, 0, 0, 0x1100, 0, 0x09D, 0x92, 0x13, 0x15, 0xC7, 0xCF, 0xC7, 0xCF, 0xC7, 0xCF, 0);
1524  GUI_V2_BUTTON(_inventoryButtons[10], 0xB, 0x00, 0, 0, 0, 0, 0x1100, 0, 0x04D, 0xA8, 0x13, 0x14, 0xC7, 0xCF, 0xC7, 0xCF, 0xC7, 0xCF, 0);
1525  GUI_V2_BUTTON(_inventoryButtons[11], 0xC, 0x00, 0, 0, 0, 0, 0x1100, 0, 0x061, 0xA8, 0x13, 0x14, 0xC7, 0xCF, 0xC7, 0xCF, 0xC7, 0xCF, 0);
1526  GUI_V2_BUTTON(_inventoryButtons[12], 0xD, 0x00, 0, 0, 0, 0, 0x1100, 0, 0x075, 0xA8, 0x13, 0x14, 0xC7, 0xCF, 0xC7, 0xCF, 0xC7, 0xCF, 0);
1527  GUI_V2_BUTTON(_inventoryButtons[13], 0xE, 0x00, 0, 0, 0, 0, 0x1100, 0, 0x089, 0xA8, 0x13, 0x14, 0xC7, 0xCF, 0xC7, 0xCF, 0xC7, 0xCF, 0);
1528  GUI_V2_BUTTON(_inventoryButtons[14], 0xF, 0x00, 0, 0, 0, 0, 0x1100, 0, 0x09D, 0xA8, 0x13, 0x14, 0xC7, 0xCF, 0xC7, 0xCF, 0xC7, 0xCF, 0);
1529 
1530  for (int i = 5; i <= 14; ++i)
1531  _inventoryButtons[i].buttonCallback = inventoryCallback;
1532 
1534  for (int i = 1; i < 15; ++i)
1536 }
1537 
1539  GUI_V2_BUTTON(_scrollUpButton, 0x17, 0, 0, 1, 1, 1, 0x4487, 0, 0, 0, 0x18, 0x0F, 0xC7, 0xCF, 0xC7, 0xCF, 0xC7, 0xCF, 0);
1540  GUI_V2_BUTTON(_scrollDownButton, 0x18, 0, 0, 1, 1, 1, 0x4487, 0, 0, 0, 0x18, 0x0F, 0xC7, 0xCF, 0xC7, 0xCF, 0xC7, 0xCF, 0);
1541 
1542  for (int i = 0; i < 4; ++i)
1543  GUI_V2_BUTTON(_sliderButtons[0][i], 0x18 + i, 0, 0, 1, 1, 1, 0x4487, 0, 0, 0, 0x0A, 0x0E, 0xC7, 0xCF, 0xC7, 0xCF, 0xC7, 0xCF, 0);
1544  for (int i = 0; i < 4; ++i)
1545  GUI_V2_BUTTON(_sliderButtons[1][i], 0x1C + i, 0, 0, 1, 1, 1, 0x4487, 0, 0, 0, 0x0A, 0x0E, 0xC7, 0xCF, 0xC7, 0xCF, 0xC7, 0xCF, 0);
1546  for (int i = 0; i < 4; ++i)
1547  GUI_V2_BUTTON(_sliderButtons[2][i], 0x20 + i, 0, 0, 0, 0, 0, 0x2200, 0, 0, 0, 0x6E, 0x0E, 0xC7, 0xCF, 0xC7, 0xCF, 0xC7, 0xCF, 0);
1548 
1549  for (uint i = 0; i < ARRAYSIZE(_menuButtons); ++i)
1550  GUI_V2_BUTTON(_menuButtons[i], 0x10 + i, 0, 0, 1, 1, 1, 0x4487, 0, 0, 0, 0, 0, 0xC7, 0xCF, 0xC7, 0xCF, 0xC7, 0xCF, 0);
1551 
1552  Button::Callback clickLoadSlotFunctor = BUTTON_FUNCTOR(GUI_HoF, this, &GUI_HoF::clickLoadSlot);
1553  Button::Callback clickSaveSlotFunctor = BUTTON_FUNCTOR(GUI_HoF, this, &GUI_HoF::clickSaveSlot);
1554  Button::Callback clickLoadMenuFunctor = BUTTON_FUNCTOR(GUI_HoF, this, &GUI_HoF::loadMenu);
1555  Button::Callback clickQuitGameFunctor = BUTTON_FUNCTOR(GUI_HoF, this, &GUI_HoF::quitGame);
1556  Button::Callback clickQuitOptionsFunctor = BUTTON_FUNCTOR(GUI_HoF, this, &GUI_HoF::quitOptionsMenu);
1557 
1559 
1560  GUI_V2_MENU(_mainMenu, -1, -1, 0x100, 0xAC, 0xF8, 0xF9, 0xFA, menuStr[0 * 8], 0xFB, -1, 8, 0, 7, -1, -1, -1, -1);
1561  GUI_V2_MENU_ITEM(_mainMenu.item[0], 1, 0x02, -1, 0x1E, 0xDC, 0x0F, 0xFC, 0xFD, -1, 0xF8, 0xF9, 0xFA, -1, 0, 0, 0, 0);
1562  _mainMenu.item[0].callback = clickLoadMenuFunctor;
1563  GUI_V2_MENU_ITEM(_mainMenu.item[1], 1, 0x03, -1, 0x2F, 0xDC, 0x0F, 0xFC, 0xFD, -1, 0xF8, 0xF9, 0xFA, -1, 0, 0, 0, 0);
1564  _mainMenu.item[1].callback = BUTTON_FUNCTOR(GUI_HoF, this, &GUI_HoF::saveMenu);
1565  GUI_V2_MENU_ITEM(_mainMenu.item[2], 1, 0x23, -1, 0x40, 0xDC, 0x0F, 0xFC, 0xFD, -1, 0xF8, 0xF9, 0xFA, -1, 0, 0, 0, 0);
1566  _mainMenu.item[2].callback = BUTTON_FUNCTOR(GUI_HoF, this, &GUI_HoF::deleteMenu);
1567  GUI_V2_MENU_ITEM(_mainMenu.item[3], 1, 0x04, -1, 0x51, 0xDC, 0x0F, 0xFC, 0xFD, -1, 0xF8, 0xF9, 0xFA, -1, 0, 0, 0, 0);
1568  _mainMenu.item[3].callback = BUTTON_FUNCTOR(GUI_HoF, this, &GUI_HoF::gameOptionsTalkie);
1569  GUI_V2_MENU_ITEM(_mainMenu.item[4], 1, 0x25, -1, 0x62, 0xDC, 0x0F, 0xFC, 0xFD, -1, 0xF8, 0xF9, 0xFA, -1, 0, 0, 0, 0);
1570  _mainMenu.item[4].callback = BUTTON_FUNCTOR(GUI_HoF, this, &GUI_HoF::audioOptions);
1571  GUI_V2_MENU_ITEM(_mainMenu.item[5], 1, 0x05, -1, 0x73, 0xDC, 0x0F, 0xFC, 0xFD, -1, 0xF8, 0xF9, 0xFA, -1, 0, 0, 0, 0);
1572  _mainMenu.item[5].callback = clickQuitGameFunctor;
1573  GUI_V2_MENU_ITEM(_mainMenu.item[6], 1, 0x06, -1, 0x90, 0xDC, 0x0F, 0xFC, 0xFD, -1, 0xF8, 0xF9, 0xFA, -1, 0, 0, 0, 0);
1574  _mainMenu.item[6].callback = BUTTON_FUNCTOR(GUI_HoF, this, &GUI_HoF::resumeGame);
1575  for (int i = 0; i < 7; ++i)
1576  _mainMenu.item[i].itemId = menuStr[0 * 8 + i + 1];
1577 
1578  if (!_vm->gameFlags().isTalkie) {
1579  _mainMenu.height = 0x9C;
1581  _mainMenu.item[6].enabled = false;
1582  for (int i = 4; i < 6; ++i)
1584  _mainMenu.item[3].callback = BUTTON_FUNCTOR(GUI_HoF, this, &GUI_HoF::gameOptions);
1586  _mainMenu.item[5].y = 0x7F;
1587  }
1588 
1589  GUI_V2_MENU(_gameOptions, -1, -1, 0x120, 0x88, 0xF8, 0xF9, 0xFA, menuStr[1 * 8], 0xFB, -1, 8, 4, 4, -1, -1, -1, -1);
1590  if (_vm->gameFlags().isTalkie) {
1591  GUI_V2_MENU_ITEM(_gameOptions.item[0], 1, 0, 0xA0, 0x1E, 0x74, 0x0F, 0xFC, 0xFD, 5, 0xF8, 0xF9, 0xFA, -1, 0x15, 8, 0x20, 0);
1592  _gameOptions.item[0].callback = BUTTON_FUNCTOR(GUI_HoF, this, &GUI_HoF::toggleWalkspeed);
1593  GUI_V2_MENU_ITEM(_gameOptions.item[1], 1, 0, 0xA0, 0x2F, 0x74, 0x0F, 0xFC, 0xFD, 5, 0xF8, 0xF9, 0xFA, -1, 0x26, 8, 0x31, 0);
1594  _gameOptions.item[1].callback = BUTTON_FUNCTOR(GUI_HoF, this, &GUI_HoF::changeLanguage);
1595  GUI_V2_MENU_ITEM(_gameOptions.item[2], 1, 0, 0xA0, 0x40, 0x74, 0x0F, 0xFC, 0xFD, 5, 0xF8, 0xF9, 0xFA, -1, 0x16, 8, 0x42, 0);
1596  _gameOptions.item[2].callback = BUTTON_FUNCTOR(GUI_HoF, this, &GUI_HoF::toggleText);
1597  GUI_V2_MENU_ITEM(_gameOptions.item[3], 1, 0x10, -1, 0x6E, 0x6C, 0x0F, 0xFD, 0xFD, -1, 0xF8, 0xF9, 0xFA, -1, 0, 0, 0, 0);
1598  _gameOptions.item[3].callback = clickQuitOptionsFunctor;
1599  } else {
1601  GUI_V2_MENU_ITEM(_gameOptions.item[0], 0, 0x2B, 0xA0, 0x1E, 0x74, 0x0F, 0xFC, 0xFD, 5, 0xF8, 0xF9, 0xFA, -1, 0x1F, 0x10, 0x20, 0);
1602  GUI_V2_MENU_ITEM(_gameOptions.item[1], 0, 0x2C, 0xA0, 0x2F, 0x74, 0x0F, 0xFC, 0xFD, 5, 0xF8, 0xF9, 0xFA, -1, 0x20, 0x10, 0x31, 0);
1603  GUI_V2_MENU_ITEM(_gameOptions.item[2], 0, 0x2D, 0xA0, 0x40, 0x74, 0x0F, 0xFC, 0xFD, 5, 0xF8, 0xF9, 0xFA, -1, 0x1D, 0x10, 0x42, 0);
1604  GUI_V2_MENU_ITEM(_gameOptions.item[3], 0, 0x2E, 0xA0, 0x51, 0x74, 0x0F, 0xFC, 0xFD, 5, 0xF8, 0xF9, 0xFA, -1, 0x1E, 0x10, 0x53, 0);
1605  GUI_V2_MENU_ITEM(_gameOptions.item[4], 1, 0x18, -1, 0x6E, 0x6C, 0x0F, 0xFC, 0xFD, -1, 0xF8, 0xF9, 0xFA, -1, 0, 0, 0, 0);
1606  _gameOptions.item[4].callback = clickQuitOptionsFunctor;
1607  }
1608 
1609  for (int i = _gameOptions.numberOfItems; i <= 6; ++i)
1610  _gameOptions.item[i].enabled = false;
1611  for (int i = 0; i < 7; ++i)
1612  _gameOptions.item[i].itemId = menuStr[1 * 8 + i + 1];
1613 
1614  GUI_V2_MENU(_audioOptions, -1, -1, 0x120, 0x88, 0xF8, 0xF9, 0xFA, menuStr[2 * 8], 0xFB, -1, 8, 3, 4, -1, -1, -1, -1);
1615  GUI_V2_MENU_ITEM(_audioOptions.item[0], 0, 0, 0xA0, 0x1E, 0x74, 0x0F, 0xFC, 0xFD, 5, 0xF8, 0xF9, 0xFA, -1, 0x17, 8, 0x20, 0);
1616  GUI_V2_MENU_ITEM(_audioOptions.item[1], 0, 0, 0xA0, 0x2F, 0x74, 0x0F, 0xFC, 0xFD, 5, 0xF8, 0xF9, 0xFA, -1, 0x18, 8, 0x31, 0);
1617  GUI_V2_MENU_ITEM(_audioOptions.item[2], 0, 0, 0xA0, 0x40, 0x74, 0x0F, 0xFC, 0xFD, 5, 0xF8, 0xF9, 0xFA, -1, 0x27, 8, 0x42, 0);
1618  GUI_V2_MENU_ITEM(_audioOptions.item[3], 1, 0x10, -1, 0x6E, 0x5C, 0x0F, 0xFC, 0xFD, 5, 0xF8, 0xF9, 0xFA, -1, 0, 0, 0, 0);
1619  _audioOptions.item[3].callback = clickQuitOptionsFunctor;
1620  for (int i = 4; i <= 6; ++i)
1621  _audioOptions.item[i].enabled = false;
1622  for (int i = 0; i < 7; ++i)
1623  _audioOptions.item[i].itemId = menuStr[2 * 8 + i + 1];
1624 
1625  GUI_V2_MENU(_choiceMenu, -1, -1, 0x140, 0x38, 0xF8, 0xF9, 0xFA, 0, 0xFE, -1, 8, 0, 2, -1, -1, -1, -1);
1626  GUI_V2_MENU_ITEM(_choiceMenu.item[0], 1, 0x14, 0x18, 0x1E, 0x48, 0x0F, 0xFC, 0xFD, -1, 0xF8, 0xF9, 0xFA, -1, 0, 0, 0, 0);
1627  _choiceMenu.item[0].callback = BUTTON_FUNCTOR(GUI_HoF, this, &GUI_HoF::choiceYes);
1628  GUI_V2_MENU_ITEM(_choiceMenu.item[1], 1, 0x13, 0xD8, 0x1E, 0x48, 0x0F, 0xFC, 0xFD, -1, 0xF8, 0xF9, 0xFA, -1, 0, 0, 0, 0);
1629  _choiceMenu.item[1].callback = BUTTON_FUNCTOR(GUI_HoF, this, &GUI_HoF::choiceNo);
1630  for (int i = 2; i <= 6; ++i)
1631  _choiceMenu.item[i].enabled = false;
1632  for (int i = 0; i < 7; ++i)
1633  _choiceMenu.item[i].itemId = menuStr[3 * 8 + i + 1];
1634 
1635  GUI_V2_MENU(_loadMenu, -1, -1, 0x120, 0xA0, 0xF8, 0xF9, 0xFA, menuStr[4 * 8], 0xFB, -1, 8, 0, 6, 0x84, 0x16, 0x84, 0x7C);
1636  GUI_V2_MENU_ITEM(_loadMenu.item[0], 1, 0x29, -1, 0x27, 0x100, 0xF, 0xFC, 0xFD, 5, 0xF8, 0xF9, 0xFA, -1, 0, 0, 0, 0);
1637  GUI_V2_MENU_ITEM(_loadMenu.item[1], 1, 0x2A, -1, 0x38, 0x100, 0xF, 0xFC, 0xFD, 5, 0xF8, 0xF9, 0xFA, -1, 0, 0, 0, 0);
1638  GUI_V2_MENU_ITEM(_loadMenu.item[2], 1, 0x2B, -1, 0x49, 0x100, 0xF, 0xFC, 0xFD, 5, 0xF8, 0xF9, 0xFA, -1, 0, 0, 0, 0);
1639  GUI_V2_MENU_ITEM(_loadMenu.item[3], 1, 0x2C, -1, 0x5A, 0x100, 0xF, 0xFC, 0xFD, 5, 0xF8, 0xF9, 0xFA, -1, 0, 0, 0, 0);
1640  GUI_V2_MENU_ITEM(_loadMenu.item[4], 1, 0x2D, -1, 0x6B, 0x100, 0xF, 0xFC, 0xFD, 5, 0xF8, 0xF9, 0xFA, -1, 0, 0, 0, 0);
1641  for (int i = 0; i <= 4; ++i)
1642  _loadMenu.item[i].callback = clickLoadSlotFunctor;
1643  GUI_V2_MENU_ITEM(_loadMenu.item[5], 1, 0x0B, 0xB8, 0x86, 0x58, 0xF, 0xFC, 0xFD, -1, 0xF8, 0xF9, 0xFA, -1, 0, 0, 0, 0);
1644  _loadMenu.item[5].callback = BUTTON_FUNCTOR(GUI_HoF, this, &GUI_HoF::cancelLoadMenu);
1645  _loadMenu.item[6].enabled = false;
1646  for (int i = 0; i < 7; ++i)
1647  _loadMenu.item[i].itemId = menuStr[4 * 8 + i + 1];
1648 
1649  GUI_V2_MENU(_saveMenu, -1, -1, 0x120, 0xA0, 0xF8, 0xF9, 0xFA, menuStr[5 * 8], 0xFB, -1, 8, 0, 6, 0x84, 0x16, 0x84, 0x7C);
1650  GUI_V2_MENU_ITEM(_saveMenu.item[0], 1, 0x29, -1, 0x27, 0x100, 0xF, 0xFC, 0xFD, 5, 0xF8, 0xF9, 0xFA, -1, 0, 0, 0, 0);
1651  GUI_V2_MENU_ITEM(_saveMenu.item[1], 1, 0x2A, -1, 0x38, 0x100, 0xF, 0xFC, 0xFD, 5, 0xF8, 0xF9, 0xFA, -1, 0, 0, 0, 0);
1652  GUI_V2_MENU_ITEM(_saveMenu.item[2], 1, 0x2B, -1, 0x49, 0x100, 0xF, 0xFC, 0xFD, 5, 0xF8, 0xF9, 0xFA, -1, 0, 0, 0, 0);
1653  GUI_V2_MENU_ITEM(_saveMenu.item[3], 1, 0x2C, -1, 0x5A, 0x100, 0xF, 0xFC, 0xFD, 5, 0xF8, 0xF9, 0xFA, -1, 0, 0, 0, 0);
1654  GUI_V2_MENU_ITEM(_saveMenu.item[4], 1, 0x2D, -1, 0x6B, 0x100, 0xF, 0xFC, 0xFD, 5, 0xF8, 0xF9, 0xFA, -1, 0, 0, 0, 0);
1655  for (int i = 0; i <= 4; ++i)
1656  _saveMenu.item[i].callback = clickSaveSlotFunctor;
1657  GUI_V2_MENU_ITEM(_saveMenu.item[5], 1, 0x0B, 0xB8, 0x86, 0x58, 0xF, 0xFC, 0xFD, -1, 0xF8, 0xF9, 0xFA, -1, 0, 0, 0, 0);
1658  _saveMenu.item[5].callback = BUTTON_FUNCTOR(GUI_HoF, this, &GUI_HoF::cancelSaveMenu);
1659  _saveMenu.item[6].enabled = false;
1660  for (int i = 0; i < 7; ++i)
1661  _saveMenu.item[i].itemId = menuStr[5 * 8 + i + 1];
1662 
1663  GUI_V2_MENU(_savenameMenu, -1, -1, 0x140, 0x43, 0xF8, 0xF9, 0xFA, menuStr[6 * 8], 0xFB, -1, 8, 0, 2, -1, -1, -1, -1);
1664  GUI_V2_MENU_ITEM(_savenameMenu.item[0], 1, 0xD, 0x18, 0x2C, 0x58, 0x0F, 0xFC, 0xFD, -1, 0xF8, 0xF9, 0xFA, -1, 0, 0, 0, 0);
1665  _savenameMenu.item[0].callback = BUTTON_FUNCTOR(GUI_HoF, this, &GUI_HoF::finishSavename);
1666  GUI_V2_MENU_ITEM(_savenameMenu.item[1], 1, 0xB, 0xD0, 0x2C, 0x58, 0x0F, 0xFC, 0xFD, -1, 0xF8, 0xF9, 0xFA, -1, 0, 0, 0, 0);
1667  _savenameMenu.item[1].callback = BUTTON_FUNCTOR(GUI_HoF, this, &GUI_HoF::cancelSavename);
1668  for (int i = 2; i <= 6; ++i)
1669  _savenameMenu.item[i].enabled = false;
1670  for (int i = 0; i < 7; ++i)
1671  _savenameMenu.item[i].itemId = menuStr[6 * 8 + i + 1];
1672 
1673  GUI_V2_MENU(_deathMenu, -1, -1, 0xD0, 0x4C, 0xF8, 0xF9, 0xFA, menuStr[7 * 8], 0xFB, -1, 8, 0, 2, -1, -1, -1, -1);
1674  GUI_V2_MENU_ITEM(_deathMenu.item[0], 1, 2, -1, 0x1E, 0xB4, 0x0F, 0xFC, 0xFD, 8, 0xF8, 0xF9, 0xFA, -1, 0, 0, 0, 0);
1675  _deathMenu.item[0].callback = clickLoadMenuFunctor;
1676  GUI_V2_MENU_ITEM(_deathMenu.item[1], 1, 5, -1, 0x2F, 0xB4, 0x0F, 0xFC, 0xFD, 8, 0xF8, 0xF9, 0xFA, -1, 0, 0, 0, 0);
1677  _deathMenu.item[1].callback = clickQuitGameFunctor;
1678  for (int i = 2; i <= 6; ++i)
1679  _deathMenu.item[i].enabled = false;
1680  for (int i = 0; i < 2; ++i)
1681  _deathMenu.item[i].itemId = menuStr[7 * 8 + i + 1];
1682 }
1683 
1685  0x001, 0x002, 0x003, 0x023, 0x004, 0x025, 0x005, 0x006, // Main Menu String IDs
1686  0x025, 0x000, 0x000, 0x000, 0x010, 0x000, 0x000, 0x000, // Options Menu String IDs
1687  0x007, 0x000, 0x000, 0x000, 0x010, 0x000, 0x000, 0x000, // Audio Menu String IDs
1688  0x000, 0x014, 0x013, 0x000, 0x000, 0x000, 0x000, 0x000, // Menu3 Menu String IDs
1689  0x008, 0x029, 0x02A, 0x02B, 0x02C, 0x02D, 0x00B, 0x000, // Load Menu String IDs
1690  0x009, 0x029, 0x02A, 0x02B, 0x02C, 0x02D, 0x00B, 0x000, // Save Menu String IDs
1691  0x00C, 0x00D, 0x00B, 0x000, 0x000, 0x000, 0x000, 0x000, // Menu6 Menu String IDs
1692  0x00E, 0x002, 0x005, 0x000, 0x000, 0x000, 0x000, 0x000 // Death Menu String IDs
1693 };
1694 
1696  0x009, 0x00A, 0x00B, 0x001, 0x00C, 0x00D, 0x00E, 0x000, // Main Menu String IDs
1697  0x00F, 0x02B, 0x02C, 0x02D, 0x02E, 0x018, 0x000, 0x000, // Options Menu String IDs
1698  0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, // Dummy
1699  0x000, 0x01C, 0x01B, 0x000, 0x000, 0x000, 0x000, 0x000, // Menu3 Menu String IDs
1700  0x010, 0x02F, 0x030, 0x031, 0x032, 0x033, 0x013, 0x000, // Load Menu String IDs
1701  0x011, 0x02F, 0x030, 0x031, 0x032, 0x033, 0x013, 0x000, // Save Menu String IDs
1702  0x014, 0x015, 0x013, 0x3E8, 0x000, 0x000, 0x000, 0x000, // Menu6 String IDs
1703  0x016, 0x00A, 0x00D, 0x000, 0x000, 0x000, 0x000, 0x000 // Death Menu String IDs
1704 };
1705 
1707  0x0D, 0x0A, 0x0B, 0,
1708  0x0D, 0x0B, 0x0A, 0,
1709  0x0D, 0x38, 0x37, 0,
1710  0x0D, 0x37, 0x38, 0,
1711  0x0D, 0x35, 0x36, 0,
1712  0x0D, 0x36, 0x35, 0,
1713  0x34, 0x27, 0x33, 0,
1714  0x41, 0x29, 0x49, 0,
1715  0x45, 0x29, 0x4A, 1,
1716  0x46, 0x29, 0x4A, 1,
1717  0x3C, 0x29, 0x4B, 1,
1718  0x34, 0x29, 0x4C, 0,
1719  0x3C, 0x49, 0x3B, 1,
1720  0x41, 0x4B, 0x3B, 0,
1721  0x3C, 0x4A, 0x3B, 1,
1722  0x34, 0x49, 0x3B, 0,
1723  0x41, 0x4C, 0x3B, 0,
1724  0x45, 0x4C, 0x3B, 1,
1725  0x46, 0x4C, 0x3B, 1,
1726  0x34, 0x4A, 0x3B, 0,
1727  0x0D, 0x67, 0x68, 0,
1728  0x0D, 0x68, 0x67, 0,
1729  0x0D, 0x69, 0x6A, 0,
1730  0x0D, 0x6A, 0x69, 0,
1731  0x0D, 0x6B, 0x6C, 0,
1732  0x0D, 0x6C, 0x6B, 0,
1733  0x0D, 0x88, 0x87, 0,
1734  0x0D, 0x87, 0x88, 0,
1735  0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF
1736 };
1737 
1738 const int KyraEngine_HoF::_bookPageYOffset[] = {
1739  0, 0, 2, 2,
1740  0, 0, 2, 2,
1741  0, 0, 2, 2
1742 };
1743 
1744 const byte KyraEngine_HoF::_bookTextColorMap[] = {
1745  0x00, 0xC7, 0xCF, 0x00
1746 };
1747 
1749  0x07, 0x0D, 0x47, 0x48,
1750  0x29, 0x1A, 0x1C, 0x6D,
1751  0x4D, 0x3A, 0x0E, 0x0F,
1752  0x10, 0x11, 0x26, 0x3E,
1753  0x35, 0x40, 0x42, 0xA6,
1754  0xA4, 0xA5, 0x91, 0x95,
1755  0x99, 0xAC, 0xAE, 0xAF,
1756  0x8A, 0x79, 0x61, -1
1757 };
1758 
1760  0x0027, 0x0029,
1761  0x0028, 0x0029,
1762  0x0033, 0x0029,
1763  0x0049, 0x0029,
1764  0x004A, 0x0029,
1765  0x004B, 0x0029,
1766  0x004C, 0x0029,
1767  0x003B, 0x0029,
1768  0x0034, 0x0034,
1769  -1, -1
1770 };
1771 
1773  0x0, 0x16, 0x2, 0x1A,
1774  0x7, 0xA4, 0x5, 0x4D,
1775  0x1, 0xA5, 0x3, 0xA6,
1776  0x6, 0x6D, 0x4, 0x91,
1777  0xA, 0x99, 0xC, 0x95,
1778  0x9, 0xAC, -1, -1
1779 };
1780 
1782  0x0, 0x16, 0x2, 0x1A,
1783  0x7, 0xAB, 0x5, 0x4D,
1784  0x1, 0xAE, 0x3, 0xAF,
1785  0x6, 0x6D, 0x4, 0x91,
1786  0xA, 0x99, 0xC, 0x95,
1787  0x9, 0xAC, -1, -1
1788 };
1789 
1791  3, 1, 3, 1, 1, 4, 4, 2,
1792  3, 1, 1, 3, 1, 3, 3, 3,
1793  3, 3, 3, 3, 3, 3, 3
1794 };
1795 
1797  0x19, 0x14, 0x15, 0x16, 0x17, 0x18, 0x34,
1798  0x1B, 0x39, 0x1A, 0x3A, 0x4D, 0x72, kItemNone
1799 };
1800 
1802  0x02, 0xA9, 0x9E, 0x75, 0x73, 0x17, 0x00, 0xA0,
1803  0x08, 0x01, 0x19, 0x9F, 0x66, 0x05, 0x22, 0x7D,
1804  0x20, 0x25, 0x1D, 0x64, 0xA0, 0x78, 0x85, 0x3B,
1805  0x3C, 0x5E, 0x38, 0x45, 0x8F, 0x61, 0xA1, 0x71,
1806  0x47, 0x77, 0x86, 0x41, 0xA2, 0x5F, 0x03, 0x72,
1807  0x83, 0x9E, 0x84, 0x8E, 0xAD, 0xA8, 0x04, 0x79,
1808  0xAA, 0xA3, 0x06, 0x27, 0x8F, 0x9F, 0x0A, 0x76,
1809  0x46, 0x1E, 0x24, 0x63, 0x18, 0x69, 0x39, 0x1F,
1810  0x7E, 0xAD, 0x28, 0x60, 0x67, 0x21, 0x84, 0x34
1811 };
1812 
1813 // kyra 3 static res
1814 
1815 const char *const KyraEngine_MR::_languageExtension[] = {
1816  "TRE",
1817  "TRF",
1818  "TRG"/*,
1819  "TRI", Italian and Spanish were never included, the supported fan translations are using
1820  "TRS" English/French extensions thus overwriting these languages */
1821 };
1822 
1824 
1825 const char *const KyraEngine_MR::_mainMenuSpanishFan[] = {
1826  "Nueva Partida",
1827  "Ver Intro",
1828  "Restaurar",
1829  "Finalizar"
1830 };
1831 
1832 const char *const KyraEngine_MR::_mainMenuItalianFan[] = {
1833  "Nuova Partita",
1834  "Introduzione",
1835  "Carica una partita",
1836  "Esci dal gioco"
1837 };
1838 
1839 const KyraEngine_MR::ShapeDesc KyraEngine_MR::_shapeDescs[] = {
1840  { 57, 91, -31, -82 },
1841  { 57, 91, -31, -82 },
1842  { 57, 91, -31, -82 },
1843  { 57, 91, -31, -82 },
1844  { 57, 91, -31, -82 },
1845  { 82, 96, -43, -86 },
1846  { 57, 91, -31, -82 },
1847  { 57, 91, -31, -82 },
1848  { 57, 91, -31, -82 },
1849  { 69, 91, -31, -82 },
1850  { 57, 91, -31, -82 },
1851  { 57, 91, -31, -82 }
1852 };
1853 
1855 
1857  0x36, 0x35, 0x35, 0x33, 0x32, 0x32, 0x34, 0x34
1858 };
1859 
1861  0x13, 0x13, 0x13, 0x18, 0x13, 0x13, 0x13, 0x13,
1862  0x13, 0x13, 0x13, 0x10, 0x13, 0x13, 0x13, 0x13,
1863  0x13, 0x13, 0x13, 0x18, 0x13, 0x13, 0x13, 0x13,
1864  0x15, 0x15, 0x14, 0x18, 0x14, 0x14, 0x14, 0x14,
1865  0x24, 0x24, 0x24, 0x24, 0x24, 0x1D, 0x1D, 0x1D
1866 };
1867 
1869  0x13, 0x13, 0x13, 0x13, 0x13,
1870  0x13, 0x13, 0x13, 0x13, 0x13,
1871  0x13, 0x13, 0x13, 0x13, 0x13,
1872  0x15, 0x15, 0x15, 0x15, 0x15,
1873  0x1E, 0x1E, 0x1E, 0x1E, 0x1E
1874 };
1875 
1877  0x00, 0x00, 0x19, 0x2B, 0x33, 0x3B
1878 };
1879 
1881  0x64, 0x76, 0x82, 0x83, 0x92
1882 };
1883 
1885  0x45, 0x61, 0x7D, 0x99, 0xB5,
1886  0x45, 0x61, 0x7D, 0x99, 0xB5
1887 };
1888 
1890  0x9C, 0x9C, 0x9C, 0x9C, 0x9C,
1891  0xB2, 0xB2, 0xB2, 0xB2, 0xB2
1892 };
1893 
1895  0x1E, 0x1D, 0x1C, 0x1F, 0x0F, 0x05, 0x04, 0x00,
1896  0x03, 0x22, 0x0B, 0x20, 0x21, 0x10, 0x11, 0x3A,
1897  0x39, 0x40, 0x3E, 0x3D, 0x3C, 0x3F, kItemNone
1898 };
1899 
1901  0x4, 0x7, 0x0, 0xA
1902 };
1903 
1905  0x5, 0x8, 0x1, 0xB
1906 };
1907 
1909  0x6, 0x9, 0x2, 0xC
1910 };
1911 
1914  _mainButtonData = new Button[14];
1915  assert(_mainButtonData);
1916 
1917  GUI_V2_BUTTON(_mainButtonData[0], 1, 0, 0, 4, 4, 4, 0x4487, 0, 5, 162, 50, 25, 0xFF, 0xF0, 0xFF, 0xF0, 0xFF, 0xF0, 0);
1919  GUI_V2_BUTTON(_mainButtonData[1], 2, 0, 0, 1, 1, 1, 0x4487, 0, 245, 156, 69, 33, 0xFF, 0xF0, 0xFF, 0xF0, 0xFF, 0xF0, 0);
1921  GUI_V2_BUTTON(_mainButtonData[2], 3, 0, 0, 1, 1, 1, 0x4487, 0, 215, 191, 24, 9, 0xFF, 0xF0, 0xFF, 0xF0, 0xFF, 0xF0, 0);
1923  GUI_V2_BUTTON(_mainButtonData[3], 4, 0, 0, 1, 1, 1, 0x4487, 0, 215, 155, 25, 36, 0xFF, 0xF0, 0xFF, 0xF0, 0xFF, 0xF0, 0);
1925 
1926  Button::Callback buttonInventoryFunctor = BUTTON_FUNCTOR(KyraEngine_MR, this, &KyraEngine_MR::buttonInventory);
1927  for (int i = 0; i < 5; ++i) {
1928  GUI_V2_BUTTON(_mainButtonData[i + 4], i + 5, 0, 0, 0, 0, 0, 0x1100, 0, 67 + i * 28, 155, 27, 21, 0xFF, 0xF0, 0xFF, 0xF0, 0xFF, 0xF0, 0);
1929  _mainButtonData[i + 4].buttonCallback = buttonInventoryFunctor;
1930  }
1931 
1932  for (int i = 0; i < 5; ++i) {
1933  GUI_V2_BUTTON(_mainButtonData[i + 9], i + 10, 0, 0, 0, 0, 0, 0x1100, 0, 67 + i * 28, 177, 27, 21, 0xFF, 0xF0, 0xFF, 0xF0, 0xFF, 0xF0, 0);
1934  _mainButtonData[i + 9].buttonCallback = buttonInventoryFunctor;
1935  }
1936 
1937  for (int i = 0; i < 14; ++i)
1939 
1941  }
1942 
1943  for (int i = 0; i < 14; ++i) {
1944  if (disable)
1946  else
1948  }
1949 }
1950 
1952  GUI_V2_BUTTON(_scrollUpButton, 22, 0, 0, 4, 4, 4, 0x4487, 0, 0, 0, 0x18, 0x0F, 0xFF, 0xF0, 0xFF, 0xF0, 0xFF, 0xF0, 0);
1953  GUI_V2_BUTTON(_scrollDownButton, 23, 0, 0, 4, 4, 4, 0x4487, 0, 0, 0, 0x18, 0x0F, 0xFF, 0xF0, 0xFF, 0xF0, 0xFF, 0xF0, 0);
1954 
1955  for (int i = 0; i < 4; ++i)
1956  GUI_V2_BUTTON(_sliderButtons[0][i], 0x18 + i, 0, 0, 1, 1, 1, 0x4487, 0, 0, 0, 0x0A, 0x0E, 0xFF, 0xF0, 0xFF, 0xF0, 0xFF, 0xF0, 0);
1957  for (int i = 0; i < 4; ++i)
1958  GUI_V2_BUTTON(_sliderButtons[1][i], 0x1C + i, 0, 0, 1, 1, 1, 0x4487, 0, 0, 0, 0x0A, 0x0E, 0xFF, 0xF0, 0xFF, 0xF0, 0xFF, 0xF0, 0);
1959  for (int i = 0; i < 4; ++i)
1960  GUI_V2_BUTTON(_sliderButtons[2][i], 0x20 + i, 0, 0, 0, 0, 0, 0x2200, 0, 0, 0, 0x6E, 0x0E, 0xFF, 0xF0, 0xFF, 0xF0, 0xFF, 0xF0, 0);
1961 
1962  for (uint i = 0; i < ARRAYSIZE(_menuButtons); ++i)
1963  GUI_V2_BUTTON(_menuButtons[i], 0x0F + i, 0, 0, 1, 1, 1, 0x4487, 0, 0, 0, 0, 0, 0xFF, 0xF0, 0xFF, 0xF0, 0xFF, 0xF0, 0);
1964 
1965  Button::Callback clickLoadSlotFunctor = BUTTON_FUNCTOR(GUI_MR, this, &GUI_MR::clickLoadSlot);
1966  Button::Callback clickSaveSlotFunctor = BUTTON_FUNCTOR(GUI_MR, this, &GUI_MR::clickSaveSlot);
1967  Button::Callback clickLoadMenuFunctor = BUTTON_FUNCTOR(GUI_MR, this, &GUI_MR::loadMenu);
1968  Button::Callback clickQuitOptionsFunctor = BUTTON_FUNCTOR(GUI_MR, this, &GUI_MR::quitOptionsMenu);
1969 
1970  GUI_V2_MENU(_mainMenu, -1, -1, 256, 172, 0xD0, 0xD1, 0xCF, 1, 0xBD, -1, 8, 0, 7, -1, -1, -1, -1);
1971  GUI_V2_MENU_ITEM(_mainMenu.item[0], 1, 2, -1, 30, 220, 15, 0xFA, 0xFF, -1, 0xD0, 0xD1, 0xCF, -1, 0, 0, 0, 0x0000);
1972  _mainMenu.item[0].callback = clickLoadMenuFunctor;
1973  GUI_V2_MENU_ITEM(_mainMenu.item[1], 1, 3, -1, 47, 220, 15, 0xFA, 0xFF, -1, 0xD0, 0xD1, 0xCF, -1, 0, 0, 0, 0x0000);
1974  _mainMenu.item[1].callback = BUTTON_FUNCTOR(GUI_MR, this, &GUI_MR::saveMenu);
1975  GUI_V2_MENU_ITEM(_mainMenu.item[2], 1, 35, -1, 64, 220, 15, 0xFA, 0xFF, -1, 0xD0, 0xD1, 0xCF, -1, 0, 0, 0, 0x0000);
1976  _mainMenu.item[2].callback = BUTTON_FUNCTOR(GUI_MR, this, &GUI_MR::deleteMenu);
1977  GUI_V2_MENU_ITEM(_mainMenu.item[3], 1, 4, -1, 81, 220, 15, 0xFA, 0xFF, -1, 0xD0, 0xD1, 0xCF, -1, 0, 0, 0, 0x0000);
1978  _mainMenu.item[3].callback = BUTTON_FUNCTOR(GUI_MR, this, &GUI_MR::gameOptions);
1979  GUI_V2_MENU_ITEM(_mainMenu.item[4], 1, 37, -1, 98, 220, 15, 0xFA, 0xFF, -1, 0xD0, 0xD1, 0xCF, -1, 0, 0, 0, 0x0000);
1980  _mainMenu.item[4].callback = BUTTON_FUNCTOR(GUI_MR, this, &GUI_MR::audioOptions);
1981  GUI_V2_MENU_ITEM(_mainMenu.item[5], 1, 5, -1, 115, 220, 15, 0xFA, 0xFF, -1, 0xD0, 0xD1, 0xCF, -1, 0, 0, 0, 0x0000);
1982  _mainMenu.item[5].callback = BUTTON_FUNCTOR(GUI_MR, this, &GUI_MR::quitGame);
1983  GUI_V2_MENU_ITEM(_mainMenu.item[6], 1, 6, -1, 144, 220, 15, 0xFA, 0xFF, -1, 0xD0, 0xD1, 0xCF, -1, 0, 0, 0, 0x0000);
1984  _mainMenu.item[6].callback = BUTTON_FUNCTOR(GUI_MR, this, &GUI_MR::resumeGame);
1985 
1986  GUI_V2_MENU(_audioOptions, -1, -1, 288, 136, 0xD0, 0xD1, 0xCF, 37, 0xBD, -1, 8, 4, 5, -1, -1, -1, -1);
1987  GUI_V2_MENU_ITEM(_audioOptions.item[0], 0, 0, 160, 30, 116, 15, 0xFA, 0xFF, 5, 0xD0, 0xD1, 0xCF, -1, 23, 8, 32, 0x0000);
1988  GUI_V2_MENU_ITEM(_audioOptions.item[1], 0, 0, 160, 47, 116, 15, 0xFA, 0xFF, 5, 0xD0, 0xD1, 0xCF, -1, 24, 8, 49, 0x0000);
1989  GUI_V2_MENU_ITEM(_audioOptions.item[2], 0, 0, 160, 64, 116, 15, 0xFA, 0xFF, 5, 0xD0, 0xD1, 0xCF, -1, 39, 8, 66, 0x0000);
1990  GUI_V2_MENU_ITEM(_audioOptions.item[3], 1, 0, 152, 81, 116, 15, 0xFA, 0xFF, 5, 0xD0, 0xD1, 0xCF, -1, 47, 8, 83, 0x0000);
1991  _audioOptions.item[3].callback = BUTTON_FUNCTOR(GUI_MR, this, &GUI_MR::toggleHeliumMode);
1992  GUI_V2_MENU_ITEM(_audioOptions.item[4], 1, 16, -1, 110, 92, 15, 0xFA, 0xFF, -1, 0xD0, 0xD1, 0xCF, -1, 0, 0, 0, 0x0000);
1993  _audioOptions.item[4].callback = clickQuitOptionsFunctor;
1994  for (int i = 5; i < 7; ++i)
1995  _audioOptions.item[i].enabled = false;
1996 
1997  GUI_V2_MENU(_gameOptions, -1, -1, 288, 154, 0xD0, 0xD1, 0xCF, 7, 0xBD, -1, 8, 0, 6, -1, -1, -1, -1);
1998  GUI_V2_MENU_ITEM(_gameOptions.item[0], 1, 0, 160, 30, 116, 15, 0xFA, 0xFF, 5, 0xD0, 0xD1, 0xCF, -1, 21, 8, 32, 0x0000);
1999  _gameOptions.item[0].callback = BUTTON_FUNCTOR(GUI_MR, this, &GUI_MR::toggleWalkspeed);
2000  GUI_V2_MENU_ITEM(_gameOptions.item[1], 1, 0, 160, 47, 116, 15, 0xFA, 0xFF, 5, 0xD0, 0xD1, 0xCF, -1, 26, 8, 49, 0x0000);
2001  _gameOptions.item[1].callback = BUTTON_FUNCTOR(GUI_MR, this, &GUI_MR::changeLanguage);
2002  GUI_V2_MENU_ITEM(_gameOptions.item[2], 1, 0, 160, 64, 116, 15, 0xFA, 0xFF, 5, 0xD0, 0xD1, 0xCF, -1, 40, 8, 66, 0x0000);
2003  _gameOptions.item[2].callback = BUTTON_FUNCTOR(GUI_MR, this, &GUI_MR::toggleStudioSFX);
2004  GUI_V2_MENU_ITEM(_gameOptions.item[3], 1, 0, 160, 81, 116, 15, 0xFA, 0xFF, 5, 0xD0, 0xD1, 0xCF, -1, 46, 8, 83, 0x0000);
2005  _gameOptions.item[3].callback = BUTTON_FUNCTOR(GUI_MR, this, &GUI_MR::toggleSkipSupport);
2006  GUI_V2_MENU_ITEM(_gameOptions.item[4], 1, 0, 160, 98, 116, 15, 0xFA, 0xFF, 5, 0xD0, 0xD1, 0xCF, -1, 22, 8, 100, 0x0000);
2007  _gameOptions.item[4].callback = BUTTON_FUNCTOR(GUI_MR, this, &GUI_MR::toggleText);
2008  GUI_V2_MENU_ITEM(_gameOptions.item[5], 1, 16, -1, 127, 125, 15, 0xFA, 0xFF, -1, 0xD0, 0xD1, 0xCF, -1, 0, 0, 0, 0x0000);
2009  _gameOptions.item[5].callback = clickQuitOptionsFunctor;
2010  _gameOptions.item[6].enabled = false;
2011 
2012  GUI_V2_MENU(_choiceMenu, -1, -1, 320, 56, 0xD0, 0xD1, 0xCF, 0, 0xBA, -1, 8, 0, 2, -1, -1, -1, -1);
2013  GUI_V2_MENU_ITEM(_choiceMenu.item[0], 1, 20, 24, 30, 72, 15, 0xFA, 0xFF, -1, 0xD0, 0xD1, 0xCF, -1, 0, 0, 0, 0x0000);
2014  _choiceMenu.item[0].callback = BUTTON_FUNCTOR(GUI_MR, this, &GUI_MR::choiceYes);
2015  GUI_V2_MENU_ITEM(_choiceMenu.item[1], 1, 19, 216, 30, 72, 15, 0xFA, 0xFF, -1, 0xD0, 0xD1, 0xCF, -1, 0, 0, 0, 0x0000);
2016  _choiceMenu.item[1].callback = BUTTON_FUNCTOR(GUI_MR, this, &GUI_MR::choiceNo);
2017  for (int i = 2; i < 7; ++i)
2018  _choiceMenu.item[i].enabled = false;
2019 
2020  GUI_V2_MENU(_loadMenu, -1, -1, 288, 160, 0xD0, 0xD1, 0xCF, 8, 0xBD, -1, 8, 0, 6, 132, 22, 132, 124);
2021  GUI_V2_MENU_ITEM(_loadMenu.item[0], 1, 41, -1, 39, 256, 15, 0xFA, 0xFF, 5, 0xD0, 0xD1, 0xCF, -1, 0, 0, 0, 0x0000);
2022  GUI_V2_MENU_ITEM(_loadMenu.item[1], 1, 42, -1, 56, 256, 15, 0xFA, 0xFF, 5, 0xD0, 0xD1, 0xCF, -1, 0, 0, 0, 0x0000);
2023  GUI_V2_MENU_ITEM(_loadMenu.item[2], 1, 43, -1, 73, 256, 15, 0xFA, 0xFF, 5, 0xD0, 0xD1, 0xCF, -1, 0, 0, 0, 0x0000);
2024  GUI_V2_MENU_ITEM(_loadMenu.item[3], 1, 44, -1, 90, 256, 15, 0xFA, 0xFF, 5, 0xD0, 0xD1, 0xCF, -1, 0, 0, 0, 0x0000);
2025  GUI_V2_MENU_ITEM(_loadMenu.item[4], 1, 45, -1, 107, 256, 15, 0xFA, 0xFF, 5, 0xD0, 0xD1, 0xCF, -1, 0, 0, 0, 0x0000);
2026  for (int i = 0; i <= 4; ++i)
2027  _loadMenu.item[i].callback = clickLoadSlotFunctor;
2028  GUI_V2_MENU_ITEM(_loadMenu.item[5], 1, 11, 184, 134, 88, 15, 0xFA, 0xFF, -1, 0xD0, 0xD1, 0xCF, -1, 0, 0, 0, 0x0000);
2029  _loadMenu.item[5].callback = BUTTON_FUNCTOR(GUI_MR, this, &GUI_MR::cancelLoadMenu);
2030  _loadMenu.item[6].enabled = false;
2031 
2032  GUI_V2_MENU(_saveMenu, -1, -1, 288, 160, 0xD0, 0xD1, 0xCF, 9, 0xBD, -1, 8, 0, 6, 132, 22, 132, 124);
2033  GUI_V2_MENU_ITEM(_saveMenu.item[0], 1, 41, -1, 39, 256, 15, 0xFA, 0xFF, 5, 0xD0, 0xD1, 0xCF, -1, 0, 0, 0, 0x0000);
2034  GUI_V2_MENU_ITEM(_saveMenu.item[1], 1, 42, -1, 56, 256, 15, 0xFA, 0xFF, 5, 0xD0, 0xD1, 0xCF, -1, 0, 0, 0, 0x0000);
2035  GUI_V2_MENU_ITEM(_saveMenu.item[2], 1, 43, -1, 73, 256, 15, 0xFA, 0xFF, 5, 0xD0, 0xD1, 0xCF, -1, 0, 0, 0, 0x0000);
2036  GUI_V2_MENU_ITEM(_saveMenu.item[3], 1, 44, -1, 90, 256, 15, 0xFA, 0xFF, 5, 0xD0, 0xD1, 0xCF, -1, 0, 0, 0, 0x0000);
2037  GUI_V2_MENU_ITEM(_saveMenu.item[4], 1, 45, -1, 107, 256, 15, 0xFA, 0xFF, 5, 0xD0, 0xD1, 0xCF, -1, 0, 0, 0, 0x0000);
2038  for (int i = 0; i <= 4; ++i)
2039  _saveMenu.item[i].callback = clickSaveSlotFunctor;
2040  GUI_V2_MENU_ITEM(_saveMenu.item[5], 1, 11, 184, 134, 88, 15, 0xFA, 0xFF, -1, 0xD0, 0xD1, 0xCF, -1, 0, 0, 0, 0x0000);
2041  _saveMenu.item[5].callback = BUTTON_FUNCTOR(GUI_MR, this, &GUI_MR::cancelSaveMenu);
2042  _saveMenu.item[6].enabled = false;
2043 
2044  GUI_V2_MENU(_savenameMenu, -1, -1, 320, 67, 0xD0, 0xD1, 0xCF, 12, 0xBD, -1, 8, 0, 2, -1, -1, -1, -1);
2045  GUI_V2_MENU_ITEM(_savenameMenu.item[0], 1, 13, 24, 44, 88, 15, 0xFA, 0xFF, -1, 0xD0, 0xD1, 0xCF, -1, 0, 0, 0, 0x0000);
2046  _savenameMenu.item[0].callback = BUTTON_FUNCTOR(GUI_MR, this, &GUI_MR::finishSavename);
2047  GUI_V2_MENU_ITEM(_savenameMenu.item[1], 1, 11, 208, 44, 88, 15, 0xFA, 0xFF, -1, 0xD0, 0xD1, 0xCF, -1, 0, 0, 0, 0x0000);
2048  _savenameMenu.item[1].callback = BUTTON_FUNCTOR(GUI_MR, this, &GUI_MR::cancelSavename);
2049  for (int i = 2; i < 7; ++i)
2050  _savenameMenu.item[i].enabled = false;
2051 
2052  GUI_V2_MENU(_deathMenu, -1, -1, 208, 76, 0xD0, 0xD1, 0xCF, 14, 0xBD, -1, 8, 0, 2, -1, -1, -1, -1);
2053  GUI_V2_MENU_ITEM(_deathMenu.item[0], 1, 2, -1, 30, 180, 15, 0xFA, 0xFF, 8, 0xD0, 0xD1, 0xCF, -1, 0, 0, 0, 0x0000);
2054  _deathMenu.item[0].callback = clickLoadMenuFunctor;
2055  GUI_V2_MENU_ITEM(_deathMenu.item[1], 1, 38, -1, 47, 180, 15, 0xFA, 0xFF, 8, 0xD0, 0xD1, 0xCF, -1, 0, 0, 0, 0x0000);
2056  _deathMenu.item[1].callback = BUTTON_FUNCTOR(GUI_MR, this, &GUI_MR::loadSecondChance);
2057  for (int i = 2; i < 7; ++i)
2058  _deathMenu.item[i].enabled = false;
2059 }
2060 
2061 const int8 KyraEngine_MR::_albumWSAX[] = {
2062  0, 77, -50, 99, -61, 82, -58, 85,
2063  -64, 80, -63, 88, -63, 88, -64, 0
2064 };
2065 
2066 const int8 KyraEngine_MR::_albumWSAY[] = {
2067  0, -1, 3, 0, -1, 0, -2, 0,
2068  -1, -2, 2, 2, -6, -6, -6, 0
2069 };
2070 
2071 } // End of namespace Kyra
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::k3SfxFiles
Definition: resource.h:248
Kyra::KyraEngine_LoK::loadItems
void loadItems()
Definition: staticres.cpp:891
Kyra::KyraEngine_MR::_itemAnimDefinition
const ItemAnimDefinition * _itemAnimDefinition
Definition: kyra_mr.h:222
Kyra::HoFNestedSequence::flags
uint16 flags
Definition: sequences_hof.h:49
Kyra::KyraEngine_HoF::bookButton
int bookButton(Button *button)
Definition: gui_hof.cpp:294
Kyra::HoFNestedSequence::y
uint16 y
Definition: sequences_hof.h:54
Kyra::k1Demo4Seq
Definition: resource.h:115
Kyra::GUI_MR::toggleStudioSFX
int toggleStudioSFX(Button *caller)
Definition: gui_mr.cpp:1415
Kyra::GUI_LoK::saveGameMenu
int saveGameMenu(Button *button)
Definition: gui_lok.cpp:592
Kyra::k1BranStoneShapes
Definition: resource.h:167
Kyra::Shape::y
uint8 y
Definition: kyra_lok.h:54
Tinsel::platform
platform
Definition: sysvar.cpp:36
Kyra::KyraEngine_LoK::_seq_Reunion
const uint8 * _seq_Reunion
Definition: kyra_lok.h:539
Kyra::GUI_v2::_sliderBarsPosition
static const int _sliderBarsPosition[]
Definition: gui_v2.h:180
Kyra::GUI_LoK::loadGameMenu
int loadGameMenu(Button *button)
Definition: gui_lok.cpp:632
Common::SeekableReadStream
Interface for a seekable & readable data stream.
Definition: stream.h:569
Kyra::k1Winter3Shapes
Definition: resource.h:163
Kyra::GUI_v2::_choiceMenu
Menu _choiceMenu
Definition: gui_v2.h:139
Kyra::k3ItemStringMap
Definition: resource.h:252
Kyra::KyraEngine_MR::_mainMenuStrings
const char *const * _mainMenuStrings
Definition: kyra_mr.h:185
Kyra::Button::data0ShapePtr
const uint8 * data0ShapePtr
Definition: gui.h:61
Kyra::GUI_LoK::_scrollUpButton
Button _scrollUpButton
Definition: gui_lok.h:111
Kyra::KyraEngine_HoF::_cauldronBowlTable
static const int16 _cauldronBowlTable[]
Definition: kyra_hof.h:308
Kyra::KyraEngine_HoF::_itemStringMap
static const byte _itemStringMap[]
Definition: kyra_hof.h:239
Kyra::GUI_v2::_sliderButtons
Button _sliderButtons[3][4]
Definition: gui_v2.h:153
sound_intern.h
Common::kPlatformFMTowns
Definition: platform.h:44
Kyra::KyraEngine_LoK::_seq_COLTable_Size
int _seq_COLTable_Size
Definition: kyra_lok.h:550
Kyra::GUI_LoK::quitPlaying
int quitPlaying(Button *button)
Definition: gui_lok.cpp:810
Kyra::KyraEngine_LoK::loadCharacterShapes
void loadCharacterShapes()
Definition: staticres.cpp:852
Kyra::KyraEngine_LoK::loadSpecialEffectShapes
void loadSpecialEffectShapes()
Definition: staticres.cpp:873
Kyra::KyraEngine_LoK::_buttonData
Button * _buttonData
Definition: kyra_lok.h:651
Kyra::KyraEngine_LoK::_newGameString
const char *const * _newGameString
Definition: kyra_lok.h:573
Kyra::GUI_MR::toggleSkipSupport
int toggleSkipSupport(Button *caller)
Definition: gui_mr.cpp:1423
Kyra::StaticResource::DataDescriptor
Definition: resource.h:1204
Kyra::KyraEngine_MR::initMainButtonList
void initMainButtonList(bool disable)
Definition: staticres.cpp:1912
Kyra::Shape::yOffset
int8 yOffset
Definition: kyra_lok.h:53
Kyra::KyraEngine_LoK::findDuplicateItemShape
int findDuplicateItemShape(int shape)
Definition: items_lok.cpp:30
Kyra::KyraEngine_LoK::_posionDeathShapeTableSize
int _posionDeathShapeTableSize
Definition: kyra_lok.h:613
Kyra::k1BlackJewelString
Definition: resource.h:141
Kyra::KyraEngine_HoF::cauldronClearButton
int cauldronClearButton(Button *button)
Definition: gui_hof.cpp:548
Common::ReadStream::readUint32BE
uint32 readUint32BE()
Read an unsigned 32-bit word stored in big endian (MSB first) order from the stream and return it.
Definition: stream.h:393
Kyra::KyraEngine_LoK::_waitForAmulet
const char *const * _waitForAmulet
Definition: kyra_lok.h:561
Kyra::KyraEngine_HoF::_itemAnimDefinitionSize
int _itemAnimDefinitionSize
Definition: kyra_hof.h:654
Kyra::MenuItem::color2
uint8 color2
Definition: gui_v1.h:43
Kyra::KyraEngine_LoK::_blackJewel_Size
int _blackJewel_Size
Definition: kyra_lok.h:582
Kyra::KyraEngine_MR::_itemStringInv
static const uint8 _itemStringInv[]
Definition: kyra_mr.h:307
Kyra::AmigaSfxTable::patch
uint8 patch
Definition: sound_intern.h:312
Kyra::Room::eastExit
uint16 eastExit
Definition: kyra_lok.h:60
Kyra::GUI_HoF::optionsButton
int optionsButton(Button *button)
Definition: gui_hof.cpp:645
Kyra::k1FlaskFullString
Definition: resource.h:150
Kyra::Button
Definition: gui.h:39
Kyra::HoFSequence::stringIndex2
int16 stringIndex2
Definition: sequences_hof.h:37
Kyra::KyraEngine_LoK::_amuletX
static const uint16 _amuletX[]
Definition: kyra_lok.h:659
Kyra::StaticResource::freeAmigaSfxTable
void freeAmigaSfxTable(void *&ptr, int &size)
Definition: staticres.cpp:660
Kyra::KyraEngine_HoF::initInventoryButtonList
void initInventoryButtonList()
Definition: staticres.cpp:1497
Kyra::GUI_v2::quitOptionsMenu
int quitOptionsMenu(Button *caller)
Definition: gui_v2.cpp:526
Kyra::StaticResource::_resList
Common::List< ResData > _resList
Definition: resource.h:1200
Kyra::StaticResource::loadEoBNpcData
const EoBCharacter * loadEoBNpcData(int id, int &entries)
Definition: staticres_eob.cpp:41
Kyra::k1IntroWSAStrings
Definition: resource.h:123
Kyra::KyraEngine_LoK::_seq_KallakMalcolm
const uint8 * _seq_KallakMalcolm
Definition: kyra_lok.h:532
Kyra::Resource::unloadPakFile
void unloadPakFile(Common::String filename, bool remFromCache=false)
Definition: resource.cpp:257
Kyra::GI_KYRA2
Definition: kyra_v1.h:138
Kyra::KyraEngine_MR::_shapeDescs
static const ShapeDesc _shapeDescs[]
Definition: kyra_mr.h:329
Kyra::StaticResource::loadEoB2SeqData
const DarkMoonAnimCommand * loadEoB2SeqData(int id, int &entries)
Definition: staticres_eob.cpp:33
kyra_mr.h
Kyra::KyraEngine_LoK::_seq_textsTable
const char *const * _seq_textsTable
Definition: kyra_lok.h:544
Kyra::k1WispJewelStrings
Definition: resource.h:144
Kyra::GUI_v2::_mainMenu
Menu _mainMenu
Definition: gui_v2.h:139
Kyra::KyraEngine_LoK::_seq_MalcolmTree
const uint8 * _seq_MalcolmTree
Definition: kyra_lok.h:533
Common::EN_ANY
Definition: language.h:43
Kyra::KyraEngine_LoK::_seq_WSATable_Size
int _seq_WSATable_Size
Definition: kyra_lok.h:548
gui_mr.h
Kyra::GUI_HoF::loadMenu
int loadMenu(Button *caller)
Definition: gui_hof.cpp:1113
Kyra::k2IngameTalkObjIndex
Definition: resource.h:240
Kyra::KyraEngine_HoF::_musicFileListIngame
const char *const * _musicFileListIngame
Definition: kyra_hof.h:636
Glk::JACL::output
const char * output
Definition: interpreter.cpp:269
Kyra::k1Winter1Shapes
Definition: resource.h:161
Kyra::k1FluteShapes
Definition: resource.h:160
Kyra::KyraEngine_MR::_scoreTableSize
int _scoreTableSize
Definition: kyra_mr.h:527
GUIErrorMessage
void GUIErrorMessage(const Common::String &msg)
Initializes graphics and shows error message.
Definition: engine.cpp:394
Kyra::KyraEngine_MR::_sfxFileMapSize
int _sfxFileMapSize
Definition: kyra_mr.h:127
Kyra::KyraEngine_LoK::_dosTrackMapSize
static const int _dosTrackMapSize
Definition: kyra_lok.h:520
Kyra::StaticResource::tryKyraDatLoad
bool tryKyraDatLoad()
Definition: staticres.cpp:172
Kyra::Room::nameIndex
uint8 nameIndex
Definition: kyra_lok.h:58
Kyra::KyraEngine_LoK::_magicAnimationTable
const Shape * _magicAnimationTable
Definition: kyra_lok.h:631
Kyra::KyraEngine_v1::_charAddXPosTable
static const int8 _charAddXPosTable[]
Definition: kyra_v1.h:385
Kyra::KyraEngine_LoK::_veryClever
const char *const * _veryClever
Definition: kyra_lok.h:571
Kyra::k1Healing1Shapes
Definition: resource.h:157
Kyra::KyraEngine_v1::gameFlags
const GameFlags & gameFlags() const
Definition: kyra_v1.h:192
Kyra::KyraEngine_LoK::_buttonDataListPtr
Button ** _buttonDataListPtr
Definition: kyra_lok.h:652
Kyra::k2IngameSfxIndex
Definition: resource.h:237
Kyra::KyraEngine_LoK::buttonInventoryCallback
int buttonInventoryCallback(Button *caller)
Definition: gui_lok.cpp:43
Kyra::KyraEngine_v1::_staticres
StaticResource * _staticres
Definition: kyra_v1.h:266
Kyra::SoundResourceInfo_TownsPC98V2
Definition: sound.h:60
Kyra::KyraEngine_LoK::_waitForAmulet_Size
int _waitForAmulet_Size
Definition: kyra_lok.h:581
Kyra::KyraEngine_LoK::_defaultShapeTableSize
int _defaultShapeTableSize
Definition: kyra_lok.h:605
Kyra::k1KyrandiaLogoSeq
Definition: resource.h:107
Common::SeekableReadStream::seek
virtual bool seek(int32 offset, int whence=SEEK_SET)=0
Sets the stream position indicator for the stream.
Kyra::AmigaSfxTable
Definition: sound_intern.h:310
Kyra::GUI_HoF::changeLanguage
int changeLanguage(Button *caller)
Definition: gui_hof.cpp:981
Kyra::KyraEngine_LoK::_gui
GUI_LoK * _gui
Definition: kyra_lok.h:500
Kyra::GameFlags
Definition: kyra_v1.h:110
Kyra::GI_EOB2
Definition: kyra_v1.h:142
Kyra::KyraEngine_LoK::_wispJewelStrings
const char *const * _wispJewelStrings
Definition: kyra_lok.h:567
Kyra::HoFNestedSequence::endFrame
uint16 endFrame
Definition: sequences_hof.h:51
Kyra::kMusicIntro
Definition: kyra_v1.h:162
Kyra::KyraEngine_LoK::_winterScrollTable
const Shape * _winterScrollTable
Definition: kyra_lok.h:618
Kyra::KyraEngine_MR
Definition: kyra_mr.h:43
Kyra::k1ThePoisonStrings
Definition: resource.h:147
Kyra::k1DrinkShapes
Definition: resource.h:164
Kyra::Screen::encodeShape
uint8 * encodeShape(int x, int y, int w, int h, int flags)
Definition: screen.cpp:2647
Kyra::KyraEngine_MR::buttonInventory
int buttonInventory(Button *button)
Definition: gui_mr.cpp:474
Kyra::KyraEngine_HoF::_cdaTrackTableFinaleSize
int _cdaTrackTableFinaleSize
Definition: kyra_hof.h:643
Kyra::HoFNestedSequence::wsaControl
const FrameControl * wsaControl
Definition: sequences_hof.h:48
Kyra::KyraEngine_HoF::_ingameTalkObjIndexSize
int _ingameTalkObjIndexSize
Definition: kyra_hof.h:649
Kyra::GUI_v2::_menuButtons
Button _menuButtons[7]
Definition: gui_v2.h:136
Kyra::KyraEngine_LoK::_brandonStoneTableSize
int _brandonStoneTableSize
Definition: kyra_lok.h:635
Kyra::GUI_LoK::gameControlsMenu
int gameControlsMenu(Button *button)
Definition: gui_lok.cpp:861
Kyra::GUI_HoF::_menuStringsTalkie
static const uint16 _menuStringsTalkie[]
Definition: gui_hof.h:78
Kyra::AmigaSfxTable::duration
uint16 duration
Definition: sound_intern.h:313
version
byte version
Definition: thumbnail.cpp:40
Kyra::HoFSequence::numFrames
uint16 numFrames
Definition: sequences_hof.h:39
int8
signed char int8
Definition: cdtypes.h:31
Kyra::StaticResource::_dataTable
DataMap _dataTable
Definition: resource.h:1212
Kyra::KyraEngine_LoK::_seq_CPSTable_Size
int _seq_CPSTable_Size
Definition: kyra_lok.h:549
Kyra::k1DefaultShapes
Definition: resource.h:156
Kyra::SoundResourceInfo_PC
Definition: sound.h:41
Kyra::KyraEngine_LoK::_seq_CPSTable
const char *const * _seq_CPSTable
Definition: kyra_lok.h:542
Kyra::StaticResource::init
bool init()
Definition: staticres.cpp:240
Kyra::KyraEngine_LoK::_flaskFull
const char *const * _flaskFull
Definition: kyra_lok.h:569
Kyra::KyraEngine_MR::_itemStringMapSize
int _itemStringMapSize
Definition: kyra_mr.h:304
Kyra::Screen::enableDualPaletteMode
void enableDualPaletteMode(int splitY)
Definition: screen.cpp:921
Common::SharedPtr< CallbackFunctor >
Kyra::StaticResource::freeEoB2SeqData
void freeEoB2SeqData(void *&ptr, int &size)
Definition: staticres_eob.cpp:131
Kyra::KyraEngine_LoK::_noDropList
const char *const * _noDropList
Definition: kyra_lok.h:559
Common::String
Simple string class for ScummVM.
Definition: str.h:49
Kyra::KyraEngine_LoK::_brandonToWispTable
const Shape * _brandonToWispTable
Definition: kyra_lok.h:628
Kyra::Room::westExit
uint16 westExit
Definition: kyra_lok.h:62
Kyra::HoFNestedSequence::fadeOutTransitionType
uint16 fadeOutTransitionType
Definition: sequences_hof.h:56
Kyra::KyraEngine_HoF::_ingameSoundList
const char *const * _ingameSoundList
Definition: kyra_hof.h:644
Kyra::KyraEngine_LoK::_fluteString
const char *const * _fluteString
Definition: kyra_lok.h:566
Kyra::GUI_LoK::_menu
Menu * _menu
Definition: gui_lok.h:117
screen_hof.h
Kyra::KyraEngine_LoK::_guiStrings
const char *const * _guiStrings
Definition: kyra_lok.h:598
Common::ReadStream::readUint16BE
uint16 readUint16BE()
Read an unsigned 16-bit word stored in big endian (MSB first) order from the stream and return it.
Definition: stream.h:380
Kyra::MenuItem::color1
uint8 color1
Definition: gui_v1.h:43
Kyra::KyraEngine_HoF::_ingamePakList
const char *const * _ingamePakList
Definition: kyra_hof.h:629
Kyra::k1WaitAmuletString
Definition: resource.h:140
Kyra::KyraEngine_LoK::_roomFilenameTableSize
int _roomFilenameTableSize
Definition: kyra_lok.h:640
Kyra::GUI_v2::resumeGame
int resumeGame(Button *caller)
Definition: gui_v2.cpp:520
Kyra::KyraEngine_HoF::_ingameSoundIndex
const int16 * _ingameSoundIndex
Definition: kyra_hof.h:646
Kyra::k1ItemNames
Definition: resource.h:133
Kyra::GUI_LoK::savegameConfirm
int savegameConfirm(Button *button)
Definition: gui_lok.cpp:787
Kyra::StaticResource::loadShapeTable
const Shape * loadShapeTable(int id, int &entries)
Definition: staticres.cpp:300
uint32
unsigned int uint32
Definition: cdtypes.h:26
Common::kPlatformPC98
Definition: platform.h:56
Kyra::KyraEngine_LoK::_putDownFirst
const char *const * _putDownFirst
Definition: kyra_lok.h:560
Kyra::StaticResource::loadHoFSeqItemAnimData
const HoFSeqItemAnimData * loadHoFSeqItemAnimData(int id, int &entries)
Definition: staticres.cpp:316
Kyra::GUI_v2::finishSavename
int finishSavename(Button *caller)
Definition: gui_v2.cpp:802
index
SceneIndex index
Definition: action.cpp:432
Kyra::GUI_LoK::controlsChangeMusic
int controlsChangeMusic(Button *button)
Definition: gui_lok.cpp:1009
Kyra::HoFSequence::startFrame
uint16 startFrame
Definition: sequences_hof.h:38
Kyra::KyraEngine_LoK::_storyStrings
const char *const * _storyStrings
Definition: kyra_lok.h:546
Kyra::StaticResource::loadRawDataBe32
const uint32 * loadRawDataBe32(int id, int &entries)
Definition: staticres_rpg.cpp:33
Kyra::StaticResource::kEoB2SequenceData
Definition: resource.h:1179
Kyra::Menu::numberOfItems
uint8 numberOfItems
Definition: gui_v1.h:72
Kyra::StaticResource::getFiletype
const FileType * getFiletype(int type)
Definition: staticres.cpp:392
Kyra::StaticResource::kEoBNpcData
Definition: resource.h:1181
Common::JA_JPN
Definition: language.h:54
Kyra::GUI_v2::toggleText
int toggleText(Button *caller)
Definition: gui_v2.cpp:544
Kyra::StaticResource::unloadId
void unloadId(int id)
Definition: staticres.cpp:364
Kyra::KyraEngine_LoK::_roomTable
Room * _roomTable
Definition: kyra_lok.h:637
Kyra::StaticResource::kLoLCompassData
Definition: resource.h:1173
Kyra::KyraEngine_LoK::_guiStringsSize
int _guiStringsSize
Definition: kyra_lok.h:599
Kyra::k1AmuleteAnimSeq
Definition: resource.h:117
Kyra::KyraEngine_v1::_sound
Sound * _sound
Definition: kyra_v1.h:264
Kyra::MenuItem::itemId
uint16 itemId
Definition: gui_v1.h:34
Kyra::k2IngameShapeAnimData
Definition: resource.h:242
Kyra::KyraEngine_HoF::_gmSfxMapSize
static const int _gmSfxMapSize
Definition: kyra_hof.h:85
Kyra::StaticResource::loadFlyingObjectData
const FlyingObjectShape * loadFlyingObjectData(int id, int &entries)
Definition: staticres_lol.cpp:45
error
void NORETURN_PRE error(const char *s,...)
Definition: textconsole.cpp:67
Kyra::Menu::item
MenuItem item[7]
Definition: gui_v1.h:77
Kyra::KyraEngine_HoF::_ingameSoundIndexSize
int _ingameSoundIndexSize
Definition: kyra_hof.h:647
Kyra::AmigaSfxTable::note
uint8 note
Definition: sound_intern.h:311
Kyra::GUI_HoF::quitGame
int quitGame(Button *caller)
Definition: gui_hof.cpp:818
Kyra::KyraEngine_LoK::_flaskFull_Size
int _flaskFull_Size
Definition: kyra_lok.h:589
Kyra::KyraEngine_MR::_scoreTable
const uint8 * _scoreTable
Definition: kyra_mr.h:526
Common::kPlatformMacintosh
Definition: platform.h:43
Kyra::k1GUIStrings
Definition: resource.h:203
Kyra::KyraEngine_LoK::_amuletX2
static const uint16 _amuletX2[]
Definition: kyra_lok.h:661
Kyra::k3ItemAnimData
Definition: resource.h:250
Kyra::GUI_LoK
Definition: gui_lok.h:95
Kyra::StaticResource::loadButtonDefs
const LoLButtonDef * loadButtonDefs(int id, int &entries)
Definition: staticres_lol.cpp:49
Kyra::KyraEngine_LoK::_blackJewel
const char *const * _blackJewel
Definition: kyra_lok.h:562
Kyra::k1RoomFilenames
Definition: resource.h:128
Kyra::GUI_v2::_audioOptions
Menu _audioOptions
Definition: gui_v2.h:139
Kyra::StaticResource::kLoLSpellData
Definition: resource.h:1172
Kyra::KyraEngine_HoF::_ingameTimJpStr
const char *const * _ingameTimJpStr
Definition: kyra_hof.h:650
Kyra::k1FullFlaskString
Definition: resource.h:151
Kyra::KyraEngine_HoF::_itemStringMapSize
static const int _itemStringMapSize
Definition: kyra_hof.h:240
Kyra::KyraEngine_MR::_soundList
const char *const * _soundList
Definition: kyra_mr.h:116
Kyra::HoFNestedSequence::startframe
uint16 startframe
Definition: sequences_hof.h:50
Kyra::Menu
Definition: gui_v1.h:57
Kyra::KyraEngine_MR::_chapterLowestScene
static const uint8 _chapterLowestScene[]
Definition: kyra_mr.h:511
Kyra::StaticResource::kAmigaSfxTable
Definition: resource.h:1165
Kyra::KyraEngine_LoK::_roomFilenameTable
const char *const * _roomFilenameTable
Definition: kyra_lok.h:639
Kyra::KyraEngine_HoF::_bookTextColorMap
static const byte _bookTextColorMap[]
Definition: kyra_hof.h:282
Kyra::KyraEngine_LoK::_roomTableSize
int _roomTableSize
Definition: kyra_lok.h:638
Kyra::KyraEngine_LoK::_wispJewelStrings_Size
int _wispJewelStrings_Size
Definition: kyra_lok.h:587
Kyra::KyraEngine_MR::_mainButtonList
Button * _mainButtonList
Definition: kyra_mr.h:145
Kyra::k1Demo3Seq
Definition: resource.h:114
Kyra::GUI_v2::choiceNo
int choiceNo(Button *caller)
Definition: gui_v2.cpp:872
Kyra::KyraEngine_v1::_charAddYPosTable
static const int8 _charAddYPosTable[]
Definition: kyra_v1.h:386
Kyra::k1IntroCOLStrings
Definition: resource.h:122
Kyra::KyraEngine_LoK::_takenList
const char *const * _takenList
Definition: kyra_lok.h:556
Kyra::KyraEngine_MR::_albumWSAY
static const int8 _albumWSAY[]
Definition: kyra_mr.h:557
Kyra::k1PoisonGoneString
Definition: resource.h:142
Kyra::KyraEngine_HoF::_cdaTrackTableIngameSize
int _cdaTrackTableIngameSize
Definition: kyra_hof.h:641
Kyra::Screen::clearPage
void clearPage(int pageNum)
Definition: screen.cpp:557
Kyra::KyraEngine_HoF::_cdaTrackTableIntroSize
int _cdaTrackTableIntroSize
Definition: kyra_hof.h:639
Kyra::KyraEngine_LoK::_screen
Screen_LoK * _screen
Definition: kyra_lok.h:486
Kyra::GUI_LoK::initStaticResource
void initStaticResource()
Definition: staticres.cpp:1103
Kyra::k1FluteStrings
Definition: resource.h:148
Kyra::KyraEngine_LoK::_posionDeathShapeTable
const Shape * _posionDeathShapeTable
Definition: kyra_lok.h:612
Kyra::GUI_v2::_loadMenu
Menu _loadMenu
Definition: gui_v2.h:139
Kyra::HoFNestedSequence::x
uint16 x
Definition: sequences_hof.h:53
Kyra::HoFSequence::fadeOutTransitionType
uint8 fadeOutTransitionType
Definition: sequences_hof.h:35
Kyra::GUI_LoK::_vm
KyraEngine_LoK * _vm
Definition: gui_lok.h:160
Kyra::KyraEngine_LoK::_placedList
const char *const * _placedList
Definition: kyra_lok.h:557
Kyra::Menu::color1
uint8 color1
Definition: gui_v1.h:62
Kyra::HoFSequence::stringIndex1
int16 stringIndex1
Definition: sequences_hof.h:36
Kyra::KyraEngine_LoK::_veryClever_Size
int _veryClever_Size
Definition: kyra_lok.h:591
Kyra::KyraEngine_LoK::_itemPosX
static const uint16 _itemPosX[]
Definition: kyra_lok.h:647
Kyra::StaticResource::ResData::type
int type
Definition: resource.h:1195
Kyra::HoFSeqItemAnimData::itemIndex
int16 itemIndex
Definition: sequences_hof.h:67
Kyra::KyraEngine_v1::_flags
GameFlags _flags
Definition: kyra_v1.h:324
Kyra::KyraEngine_v1::_res
Resource * _res
Definition: kyra_v1.h:263
Common::find
In find(In first, In last, const T &v)
Finds the first data value in the range [first, last) matching v.
Definition: algorithm.h:115
Kyra::StaticResource::kRoomList
Definition: resource.h:1163
Kyra::GUI_MR::quitGame
int quitGame(Button *button)
Definition: gui_mr.cpp:1123
Common::ReadStream::readByte
byte readByte()
Read an unsigned byte from the stream and return it.
Definition: stream.h:318
Kyra::KyraEngine_LoK::loadMainScreen
void loadMainScreen(int page=3)
Definition: staticres.cpp:948
Kyra::Shape::w
uint8 w
Definition: kyra_lok.h:54
Kyra::k1PutDownString
Definition: resource.h:139
Kyra::GUI_MR::changeLanguage
int changeLanguage(Button *caller)
Definition: gui_mr.cpp:1404
Kyra::k1PlacedStrings
Definition: resource.h:135
Kyra::GUI_v2::addButtonToList
Button * addButtonToList(Button *list, Button *newButton) override
Definition: gui_v2.cpp:50
Kyra::StaticResource::kLoLButtonData
Definition: resource.h:1175
Kyra::KyraEngine_MR::buttonShowScore
int buttonShowScore(Button *button)
Definition: gui_mr.cpp:588
Kyra::KyraEngine_HoF::_cdaTrackTableIntro
const uint8 * _cdaTrackTableIntro
Definition: kyra_hof.h:638
Kyra::GUI_MR::flagButtonEnable
void flagButtonEnable(Button *button)
Definition: gui_mr.cpp:1045
Kyra::GUI_LoK::_menuButtonData
Button _menuButtonData[6]
Definition: gui_lok.h:110
Kyra::HoFSequence::timeout
uint16 timeout
Definition: sequences_hof.h:43
Kyra::StaticResource::freeDummy
void freeDummy(void *&ptr, int &size)
Definition: staticres.cpp:634
Kyra::KyraEngine_LoK::_configStringsSize
int _configStringsSize
Definition: kyra_lok.h:602
Common::IT_ITA
Definition: language.h:53
Kyra::GUI_v2::clickLoadSlot
int clickLoadSlot(Button *caller)
Definition: gui_v2.cpp:564
Kyra::HoFSequence::cpsFile
const char * cpsFile
Definition: sequences_hof.h:32
Kyra::AmigaSfxTable::volume
uint8 volume
Definition: sound_intern.h:314
Kyra::KyraEngine_MR::_itemStringDrop
static const uint8 _itemStringDrop[]
Definition: kyra_mr.h:306
uint8
unsigned char uint8
Definition: cdtypes.h:28
Kyra::KyraEngine_LoK::loadMouseShapes
void loadMouseShapes()
Definition: staticres.cpp:836
Kyra::SoundResourceInfo_PC98
Definition: sound.h:55
Kyra::k1AudioTracksIntro
Definition: resource.h:207
Kyra::FrameControl::delay
uint16 delay
Definition: kyra_v2.h:38
Kyra::KyraEngine_MR::initStaticResource
void initStaticResource()
Definition: staticres.cpp:1016
Kyra::k2IngameSfxFiles
Definition: resource.h:236
screen_lok.h
Kyra::k1Demo2Seq
Definition: resource.h:113
Kyra::KyraEngine_v1::_addXPosTable
static const int8 _addXPosTable[]
Definition: kyra_v1.h:380
Kyra::k1TownsCDATable
Definition: resource.h:214
warning
void warning(const char *s,...)
Print a warning message to the text console (stderr).
Definition: textconsole.cpp:49
Kyra::StaticResource::freeEoBNpcData
void freeEoBNpcData(void *&ptr, int &size)
Definition: staticres_eob.cpp:145
Kyra::StaticResource::ResData::data
void * data
Definition: resource.h:1197
Kyra::k1OutroHomeString
Definition: resource.h:126
Kyra::KyraEngine_LoK::_seq_Demo3
const uint8 * _seq_Demo3
Definition: kyra_lok.h:537
Kyra::KyraEngine_LoK::initStaticResource
void initStaticResource()
Definition: staticres.cpp:714
Kyra::KyraEngine_LoK::_healingShapeTableSize
int _healingShapeTableSize
Definition: kyra_lok.h:608
Kyra::k1MalcolmTreeSeq
Definition: resource.h:109
Kyra::HoFNestedSequence::frameDelay
uint16 frameDelay
Definition: sequences_hof.h:52
Glk::JACL::strings
int strings
Definition: jacl_main.cpp:104
Kyra::Button::Callback
Common::SharedPtr< CallbackFunctor > Callback
Definition: gui.h:41
Kyra::HoFSeqData::numSeq
int numSeq
Definition: sequences_hof.h:61
Kyra::k1AudioTracks
Definition: resource.h:206
Common::computeStreamMD5
bool computeStreamMD5(ReadStream &stream, uint8 digest[16], uint32 length)
Compute the MD5 checksum of the content of the given ReadStream.
Definition: md5.cpp:247
Kyra::HoFNestedSequence
Definition: sequences_hof.h:46
Kyra::StaticResource::loadAmigaSfxTable
const AmigaSfxTable * loadAmigaSfxTable(int id, int &entries)
Definition: staticres.cpp:304
Kyra::GUI_LoK::controlsChangeWalk
int controlsChangeWalk(Button *button)
Definition: gui_lok.cpp:1025
for
else for(int i=0;i< height_;i++)
Definition: soft_render_surface.inl:272
Kyra::KyraEngine_LoK::_amigaTrackMap
static const int8 _amigaTrackMap[]
Definition: kyra_lok.h:522
Kyra::Screen_LoK::setInterfacePalette
void setInterfacePalette(const Palette &pal, uint8 r, uint8 g, uint8 b)
Definition: screen_lok.cpp:248
Common::kPlatformDOS
Definition: platform.h:39
Kyra::KyraEngine_MR::_gui
GUI_MR * _gui
Definition: kyra_mr.h:142
Kyra::KyraEngine_LoK::_seq_textsTable_Size
int _seq_textsTable_Size
Definition: kyra_lok.h:551
Kyra::KyraEngine_MR::_albumWSAX
static const int8 _albumWSAX[]
Definition: kyra_mr.h:556
Kyra::k3ScoreTable
Definition: resource.h:247
Kyra::Screen_HoF::_screenDimTable
static const ScreenDim _screenDimTable[]
Definition: screen_hof.h:44
Kyra::KyraEngine_HoF::_inventoryButtons
Button * _inventoryButtons
Definition: kyra_hof.h:271
Kyra::KyraEngine_LoK::_fluteAnimShapeTableSize
int _fluteAnimShapeTableSize
Definition: kyra_lok.h:616
Kyra::k1Demo1Seq
Definition: resource.h:112
kyra_hof.h
Kyra::StaticResource::kStringList
Definition: resource.h:1161
Kyra::k1WispShapes
Definition: resource.h:165
Kyra::GUI_HoF::_menuStringsOther
static const uint16 _menuStringsOther[]
Definition: gui_hof.h:79
Kyra::k3MusicFiles
Definition: resource.h:246
Kyra::KyraEngine_LoK::_winterScroll1TableSize
int _winterScroll1TableSize
Definition: kyra_lok.h:621
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
Common::ReadStream::read
virtual uint32 read(void *dataPtr, uint32 dataSize)=0
Read data from the stream.
Common::kPlatformAmiga
Definition: platform.h:40
Kyra::GUI_LoK::controlsChangeText
int controlsChangeText(Button *button)
Definition: gui_lok.cpp:1034
Neverhood::x1
int16 x1
Definition: module1400_sprites.cpp:667
Kyra::kMusicIngame
Definition: kyra_v1.h:163
Kyra::HoFSequence::duration
uint16 duration
Definition: sequences_hof.h:40
Kyra::KyraEngine_HoF::_inventoryX
static const int _inventoryX[]
Definition: kyra_hof.h:246
Kyra::HoFSequence
Definition: sequences_hof.h:30
Kyra::Screen_LoK::_screenDimTableCount
static const int _screenDimTableCount
Definition: screen_lok.h:70
Kyra::KyraEngine_HoF::_cauldronMagicTableScene77
static const int16 _cauldronMagicTableScene77[]
Definition: kyra_hof.h:310
Kyra::k1IntroStrings
Definition: resource.h:124
Kyra::KyraEngine_LoK::_magicMouseItemStartFrame
static const uint8 _magicMouseItemStartFrame[]
Definition: kyra_lok.h:654
Kyra::KyraEngine_HoF::_gui
GUI_HoF * _gui
Definition: kyra_hof.h:264
Kyra::Resource::loadPakFile
bool loadPakFile(Common::String filename)
Definition: resource.cpp:165
Kyra::StaticResource::freeFlyingObjectData
void freeFlyingObjectData(void *&ptr, int &size)
Definition: staticres_lol.cpp:202
Kyra::k3MainMenuStrings
Definition: resource.h:245
Kyra::KyraEngine_MR::_characterFrameTable
static const uint8 _characterFrameTable[]
Definition: kyra_mr.h:388
Kyra::KyraEngine_LoK::loadButtonShapes
void loadButtonShapes()
Definition: staticres.cpp:936
Kyra::HoFSeqData::nestedSeq
const HoFNestedSequence * nestedSeq
Definition: sequences_hof.h:62
Kyra::KyraEngine_LoK::_poisonGone_Size
int _poisonGone_Size
Definition: kyra_lok.h:583
Kyra::KyraEngine_LoK::_takenList_Size
int _takenList_Size
Definition: kyra_lok.h:576
Kyra::k1RoomList
Definition: resource.h:129
Kyra::GUI_HoF::gameOptionsTalkie
int gameOptionsTalkie(Button *caller)
Definition: gui_hof.cpp:931
Kyra::Sound::initAudioResourceInfo
virtual void initAudioResourceInfo(int set, void *info)=0
Assigns static resource data with information on how to load audio resources to.
Kyra::KyraEngine_LoK::_brandonStoneTable
const Shape * _brandonStoneTable
Definition: kyra_lok.h:634
Kyra::KyraEngine_LoK::_magicMouseItemEndFrame2
static const uint8 _magicMouseItemEndFrame2[]
Definition: kyra_lok.h:657
Kyra::StaticResource::freeRawDataBe16
void freeRawDataBe16(void *&ptr, int &size)
Definition: staticres_rpg.cpp:61
Kyra::KyraEngine_LoK::_amigaTrackMapSize
static const int _amigaTrackMapSize
Definition: kyra_lok.h:523
Kyra::k1ConfigStrings
Definition: resource.h:204
Kyra::StaticResource::loadEoB2ShapeData
const DarkMoonShapeDef * loadEoB2ShapeData(int id, int &entries)
Definition: staticres_eob.cpp:37
Kyra::Screen_LoK::_screenDimTable
static const ScreenDim _screenDimTable[]
Definition: screen_lok.h:69
Kyra::k1MagicAnimShapes
Definition: resource.h:166
Kyra::KyraEngine_HoF::_dosTrackMap
static const int8 _dosTrackMap[]
Definition: kyra_hof.h:80
Kyra::HoFSequence::xPos
uint16 xPos
Definition: sequences_hof.h:41
Kyra::KyraEngine_LoK::_putDownFirst_Size
int _putDownFirst_Size
Definition: kyra_lok.h:580
Kyra::GameFlags::lang
Common::Language lang
Definition: kyra_v1.h:111
Kyra::KyraEngine_HoF::_cauldronStateTable
static const uint8 _cauldronStateTable[]
Definition: kyra_hof.h:311
Kyra::GUI_HoF
Definition: gui_hof.h:33
Kyra::StaticResource::kRawDataBe32
Definition: resource.h:1177
Kyra::KyraEngine_LoK::_poisonGone
const char *const * _poisonGone
Definition: kyra_lok.h:563
Kyra::StaticResource::FileType::free
FreeFunc free
Definition: resource.h:1190
Kyra::KyraEngine_LoK::_seq_Demo2
const uint8 * _seq_Demo2
Definition: kyra_lok.h:536
Kyra::k2IngameTracks
Definition: resource.h:238
Kyra::SoundResourceInfo_Towns
Definition: sound.h:47
Kyra::StaticResource::freeCompassData
void freeCompassData(void *&ptr, int &size)
Definition: staticres_lol.cpp:195
Kyra::GUI_v2::saveMenu
int saveMenu(Button *caller)
Definition: gui_v2.cpp:586
Kyra::Resource::loadFileToBuf
bool loadFileToBuf(const char *file, void *buf, uint32 maxSize)
Definition: resource.cpp:326
Kyra::HoFSequence::flags
uint16 flags
Definition: sequences_hof.h:33
Common::ReadStream::readSByte
FORCEINLINE int8 readSByte()
Read a signed byte from the stream and return it.
Definition: stream.h:330
Kyra::Shape::imageIndex
uint8 imageIndex
Definition: kyra_lok.h:52
Kyra::k1DroppedStrings
Definition: resource.h:136
Kyra::StaticResource::ResData::size
int size
Definition: resource.h:1196
Kyra::KyraEngine_LoK::_drinkAnimationTableSize
int _drinkAnimationTableSize
Definition: kyra_lok.h:626
Kyra::KyraEngine_HoF::_ingameSoundListSize
int _ingameSoundListSize
Definition: kyra_hof.h:645
Kyra::k2IngamePakFiles
Definition: resource.h:235
Kyra::KyraEngine_LoK::_thePoison
const char *const * _thePoison
Definition: kyra_lok.h:565
Kyra::GUI_MR::optionsButton
int optionsButton(Button *button)
Definition: gui_mr.cpp:1141
Fullpipe::id
int id
Definition: utils.cpp:266
Kyra::KyraEngine_LoK::setupButtonData
void setupButtonData()
Definition: staticres.cpp:1191
Kyra::KyraEngine_LoK::_seq_Demo4
const uint8 * _seq_Demo4
Definition: kyra_lok.h:538
Kyra::GUI_MR::toggleHeliumMode
int toggleHeliumMode(Button *caller)
Definition: gui_mr.cpp:1431
Kyra::KyraEngine_MR::_mainMenuSpanishFan
static const char *const _mainMenuSpanishFan[]
Definition: kyra_mr.h:188
Kyra::KyraEngine_HoF::_itemAnimDefinition
const ItemAnimDefinition * _itemAnimDefinition
Definition: kyra_hof.h:653
Common::String::format
static String format(const char *fmt,...) GCC_PRINTF(1
Print formatted data into a String object.
Definition: str.cpp:641
Kyra::StaticResource::loadSpellData
const SpellProperty * loadSpellData(int id, int &entries)
Definition: staticres_lol.cpp:37
Kyra::GUI_v2::cancelLoadMenu
int cancelLoadMenu(Button *caller)
Definition: gui_v2.cpp:579
Kyra::Resource::isInCacheList
bool isInCacheList(Common::String name)
Definition: resource.cpp:279
Kyra::KyraEngine_MR::_trashItemList
static const Item _trashItemList[]
Definition: kyra_mr.h:284
Kyra::k1NoDropStrings
Definition: resource.h:137
Neverhood::x2
int16 x2
Definition: module1400_sprites.cpp:667
Kyra::StaticResource::freeSpellData
void freeSpellData(void *&ptr, int &size)
Definition: staticres_lol.cpp:188
Kyra::GUI_v2::deleteMenu
int deleteMenu(Button *caller)
Definition: gui_v2.cpp:682
Kyra::KyraEngine_LoK::_droppedList_Size
int _droppedList_Size
Definition: kyra_lok.h:578
Kyra::KyraEngine_HoF::_pcSpkSfxMap
static const int8 _pcSpkSfxMap[]
Definition: kyra_hof.h:86
Kyra::KyraEngine_HoF::_dosTrackMapSize
static const int _dosTrackMapSize
Definition: kyra_hof.h:81
Kyra::KyraEngine_LoK
Definition: kyra_lok.h:98
Kyra::StaticResource::kRawData
Definition: resource.h:1162
Kyra::GUI_LoK::quitConfirmYes
int quitConfirmYes(Button *button)
Definition: gui_lok.cpp:845
Kyra::GUI_LoK::quitConfirmNo
int quitConfirmNo(Button *button)
Definition: gui_lok.cpp:853
Common::ListInternal::operator==
bool operator==(const Iterator< T > &a, const ConstIterator< T > &b)
Definition: list_intern.h:158
Kyra::KyraEngine_LoK::_healingShape2Table
const Shape * _healingShape2Table
Definition: kyra_lok.h:609
Kyra::KyraEngine_LoK::_drinkAnimationTable
const Shape * _drinkAnimationTable
Definition: kyra_lok.h:625
Kyra::StaticResource::loadStaticResourceFile
bool loadStaticResourceFile()
Definition: staticres.cpp:132
Kyra::KyraEngine_LoK::_magicJewelString
const char *const * _magicJewelString
Definition: kyra_lok.h:568
Kyra::StaticResource::freeHoFSeqItemAnimData
void freeHoFSeqItemAnimData(void *&ptr, int &size)
Definition: staticres.cpp:694
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_LoK::_thePoison_Size
int _thePoison_Size
Definition: kyra_lok.h:585
Kyra::KyraEngine_MR::_languageExtension
static const char *const _languageExtension[]
Definition: kyra_mr.h:662
Kyra::KyraEngine_LoK::_itemPosY
static const uint8 _itemPosY[]
Definition: kyra_lok.h:648
Kyra::StaticResource::loadRawData
const uint8 * loadRawData(int id, int &size)
Definition: staticres.cpp:296
Kyra::KyraEngine_HoF::_gmSfxMap
static const int8 _gmSfxMap[]
Definition: kyra_hof.h:84
Kyra::Screen_HoF::_screenDimTableCount
static const int _screenDimTableCount
Definition: screen_hof.h:45
Kyra::KyraEngine_HoF::buttonInventory
int buttonInventory(Button *button)
Definition: gui_hof.cpp:114
int16
signed short int16
Definition: cdtypes.h:30
Kyra::StaticResource::loadCharData
const LoLCharacter * loadCharData(int id, int &entries)
Definition: staticres_lol.cpp:33
Kyra::KyraEngine_LoK::_configStrings
const char *const * _configStrings
Definition: kyra_lok.h:601
Kyra::KyraEngine_LoK::_healingShapeTable
const Shape * _healingShapeTable
Definition: kyra_lok.h:607
Kyra::HoFSeqItemAnimData::frames
const uint16 * frames
Definition: sequences_hof.h:69
Kyra::StaticResource::prefetchId
bool prefetchId(int id)
Definition: staticres.cpp:324
Kyra::StaticResource::kShapeList
Definition: resource.h:1164
Kyra::GUI_HoF::gameOptions
int gameOptions(Button *caller)
Definition: gui_hof.cpp:886
Kyra::GUI_MR::loadSecondChance
int loadSecondChance(Button *button)
Definition: gui_mr.cpp:1300
Kyra::GUI_LoK::cancelSubMenu
int cancelSubMenu(Button *button)
Definition: gui_lok.cpp:802
Kyra::KyraEngine_LoK::_homeString_Size
int _homeString_Size
Definition: kyra_lok.h:592
Kyra::KyraEngine_LoK::_droppedList
const char *const * _droppedList
Definition: kyra_lok.h:558
Kyra::StaticResource::freeButtonDefs
void freeButtonDefs(void *&ptr, int &size)
Definition: staticres_lol.cpp:209
uint
unsigned int uint
Definition: scummsys.h:440
Kyra::HoFSequence::yPos
uint16 yPos
Definition: sequences_hof.h:42
Kyra::HoFSequence::fadeInTransitionType
uint8 fadeInTransitionType
Definition: sequences_hof.h:34
Kyra::GI_EOB1
Definition: kyra_v1.h:141
Kyra::k1Winter2Shapes
Definition: resource.h:162
Kyra::KyraEngine_MR::_sfxFileList
const char *const * _sfxFileList
Definition: kyra_mr.h:128
Kyra::KyraEngine_LoK::_placedList_Size
int _placedList_Size
Definition: kyra_lok.h:577
Kyra::Item
int16 Item
Definition: item.h:30
Ultima::Std::memcpy
void * memcpy(void *destination, const void *source, size_t num)
Definition: misc.cpp:37
Kyra::k1HealingTipString
Definition: resource.h:143
Kyra::ItemAnimDefinition
Definition: kyra_v2.h:41
Kyra::GUI_v2::_scrollUpButton
Button _scrollUpButton
Definition: gui_v2.h:137
Kyra::GI_LOL
Definition: kyra_v1.h:140
Kyra::KyraEngine_MR::_shapeDescsSize
static const int _shapeDescsSize
Definition: kyra_mr.h:330
Kyra::KyraEngine_LoK::_fullFlask
const char *const * _fullFlask
Definition: kyra_lok.h:570
Kyra::StaticResource::kRawDataBe16
Definition: resource.h:1176
Kyra::k1SpecialPalette33
Definition: resource.h:201
Kyra::KyraEngine_MR::_languageExtensionSize
static const int _languageExtensionSize
Definition: kyra_mr.h:663
Kyra::KyraEngine_LoK::_winterScroll2TableSize
int _winterScroll2TableSize
Definition: kyra_lok.h:623
Kyra::Menu::color2
uint8 color2
Definition: gui_v1.h:62
Kyra::MenuItem::enabled
bool enabled
Definition: gui_v1.h:31
Kyra::KyraEngine_HoF::_languageExtension
static const char *const _languageExtension[]
Definition: kyra_hof.h:348
Kyra::k1PC98StoryStrings
Definition: resource.h:216
Common::ArchiveMemberList
List< ArchiveMemberPtr > ArchiveMemberList
Definition: archive.h:54
screen_mr.h
Kyra::StaticResource::ResData::id
int id
Definition: resource.h:1194
Kyra::GUI_MR::gameOptions
int gameOptions(Button *button)
Definition: gui_mr.cpp:1311
Kyra::StaticResource::loadItemAnimDefinition
const ItemAnimDefinition * loadItemAnimDefinition(int id, int &entries)
Definition: staticres.cpp:320
Kyra::GUI_HoF::initStaticData
void initStaticData() override
Definition: staticres.cpp:1538
Kyra::StaticResource::deinit
void deinit()
Definition: staticres.cpp:288
Kyra::KyraEngine_MR::_itemStringMap
const uint8 * _itemStringMap
Definition: kyra_mr.h:303
Kyra::KyraEngine_LoK::_seq_Demo1
const uint8 * _seq_Demo1
Definition: kyra_lok.h:535
size
u32 size
Definition: cdaudio.cpp:39
Kyra::KyraEngine_LoK::_fluteString_Size
int _fluteString_Size
Definition: kyra_lok.h:586
Kyra::StaticResource::freeEoB2ShapeData
void freeEoB2ShapeData(void *&ptr, int &size)
Definition: staticres_eob.cpp:138
Kyra::KyraEngine_HoF::initStaticResource
void initStaticResource()
Definition: staticres.cpp:977
Kyra::StaticResource::freeCharData
void freeCharData(void *&ptr, int &size)
Definition: staticres_lol.cpp:181
Kyra::k1SpecialPalette1
Definition: resource.h:169
Kyra::k3SfxMap
Definition: resource.h:249
Kyra::KyraEngine_MR::_sfxFileListSize
int _sfxFileListSize
Definition: kyra_mr.h:129
Kyra::KyraEngine_HoF::_rainbowRoomData
static const uint8 _rainbowRoomData[]
Definition: kyra_hof.h:686
Kyra::HoFSeqData
Definition: sequences_hof.h:59
Kyra::kItemNone
Constant for invalid item.
Definition: item.h:36
Kyra::KyraEngine_LoK::_healingShape2TableSize
int _healingShape2TableSize
Definition: kyra_lok.h:610
Kyra::KyraEngine_LoK::_itemList
const char *const * _itemList
Definition: kyra_lok.h:555
Kyra::MenuItem::callback
Button::Callback callback
Definition: gui_v1.h:46
Kyra::KyraEngine_HoF::_characterFrameTable
static const uint8 _characterFrameTable[]
Definition: kyra_hof.h:366
Kyra::StaticResource::loadDummy
bool loadDummy(Common::SeekableReadStream &stream, void *&ptr, int &size)
Definition: staticres.cpp:426
Kyra::KyraEngine_HoF::_musicFileListIngameSize
int _musicFileListIngameSize
Definition: kyra_hof.h:637
Kyra::StaticResource::FileType::load
LoadFunc load
Definition: resource.h:1189
Kyra::KyraEngine_HoF::_musicFileListFinaleSize
int _musicFileListFinaleSize
Definition: kyra_hof.h:635
Kyra::KyraEngine_LoK::_seq_WSATable
const char *const * _seq_WSATable
Definition: kyra_lok.h:541
Kyra::FrameControl
Definition: kyra_v2.h:36
Kyra::KyraEngine_LoK::_healingTip_Size
int _healingTip_Size
Definition: kyra_lok.h:584
Kyra::KyraEngine_LoK::_seq_WestwoodLogo
const uint8 * _seq_WestwoodLogo
Definition: kyra_lok.h:534
Kyra::KyraEngine_MR::buttonJesterStaff
int buttonJesterStaff(Button *button)
Definition: gui_mr.cpp:611
flags
u16 flags
Definition: zipreader.h:215
type
uint32 type
Definition: mididrv.cpp:83
Common::RU_RUS
Definition: language.h:61
Kyra::Screen_MR::_screenDimTableCount
static const int _screenDimTableCount
Definition: screen_mr.h:48
Kyra::Screen_LoK::loadBitmap
void loadBitmap(const char *filename, int tempPage, int dstPage, Palette *pal, bool skip=false) override
Definition: screen_lok.cpp:73
screen.h
Kyra::k1NewGameString
Definition: resource.h:154
Kyra::k1VeryCleverString
Definition: resource.h:153
Kyra::KyraEngine_HoF::_mt32SfxMap
static const int8 _mt32SfxMap[]
Definition: kyra_hof.h:82
Kyra::HoFSeqData::numNestedSeq
int numNestedSeq
Definition: sequences_hof.h:63
Kyra::ItemAnimDefinition::itemIndex
Item itemIndex
Definition: kyra_v2.h:42
Kyra::Button::data2ShapePtr
const uint8 * data2ShapePtr
Definition: gui.h:63
Kyra::KyraEngine_LoK::_magicMouseItemEndFrame
static const uint8 _magicMouseItemEndFrame[]
Definition: kyra_lok.h:655
Kyra::k1WestwoodLogoSeq
Definition: resource.h:110
Kyra::Resource::createReadStream
Common::SeekableReadStream * createReadStream(const Common::String &file)
Definition: resource.cpp:337
Kyra::Resource
Definition: resource.h:48
Kyra::k1ForestSeq
Definition: resource.h:105
Kyra::KyraEngine_LoK::_itemList_Size
int _itemList_Size
Definition: kyra_lok.h:575
Kyra::MenuItem::bkgdColor
uint8 bkgdColor
Definition: gui_v1.h:44
Kyra::HoFSeqItemAnimData
Definition: sequences_hof.h:66
Kyra::KyraEngine_LoK::_storyStringsSize
int _storyStringsSize
Definition: kyra_lok.h:553
Kyra::KyraEngine_MR::buttonMoodChange
int buttonMoodChange(Button *button)
Definition: gui_mr.cpp:521
offset
uint32 offset
Definition: voc.cpp:110
sequences_hof.h
Kyra::GUI_MR::audioOptions
int audioOptions(Button *button)
Definition: gui_mr.cpp:1442
Kyra::KyraEngine_LoK::_winterScroll1Table
const Shape * _winterScroll1Table
Definition: kyra_lok.h:620
Kyra::KyraEngine_MR::_itemMagicTable
const uint8 * _itemMagicTable
Definition: kyra_mr.h:299
Kyra::KyraEngine_MR::_itemStringPickUp
static const uint8 _itemStringPickUp[]
Definition: kyra_mr.h:305
Kyra::KyraEngine_LoK::_seq_KyrandiaLogo
const uint8 * _seq_KyrandiaLogo
Definition: kyra_lok.h:531
Kyra::ItemAnimDefinition::numFrames
uint8 numFrames
Definition: kyra_v2.h:43
Kyra::KyraEngine_LoK::_homeString
const char *const * _homeString
Definition: kyra_lok.h:572
Kyra::KyraEngine_HoF::_scriptLangExt
static const char *const _scriptLangExt[]
Definition: kyra_hof.h:349
Kyra::KyraEngine_HoF::_itemMagicTable
static const uint16 _itemMagicTable[]
Definition: kyra_hof.h:248
Kyra::KyraEngine_LoK::_seq_Forest
const uint8 * _seq_Forest
Definition: kyra_lok.h:529
Kyra::k1CharacterImageFilenames
Definition: resource.h:131
Kyra::StaticResource::kLoLFlightShpData
Definition: resource.h:1174
Common::FR_FRA
Definition: language.h:48
Kyra::GUI_MR::flagButtonDisable
void flagButtonDisable(Button *button)
Definition: gui_mr.cpp:1055
Kyra::KyraEngine_HoF::_bookPageYOffset
static const int _bookPageYOffset[]
Definition: kyra_hof.h:281
Kyra::HoFNestedSequence::fadeInTransitionType
uint16 fadeInTransitionType
Definition: sequences_hof.h:55
Kyra::Room
Definition: kyra_lok.h:57
Kyra::KyraEngine_HoF::_ingameTimJpStrSize
int _ingameTimJpStrSize
Definition: kyra_hof.h:651
Kyra::GUI_v2::toggleWalkspeed
int toggleWalkspeed(Button *caller)
Definition: gui_v2.cpp:532
Kyra::KyraEngine_v1::_addYPosTable
static const int8 _addYPosTable[]
Definition: kyra_v1.h:381
Kyra::k1MagicJewelStrings
Definition: resource.h:145
Kyra::k1KallakWritingSeq
Definition: resource.h:106
Kyra::KyraEngine_LoK::_dosTrackMap
static const int8 _dosTrackMap[]
Definition: kyra_lok.h:519
Kyra::KyraEngine_HoF::_musicFileListIntro
const char *const * _musicFileListIntro
Definition: kyra_hof.h:632
Kyra::KyraEngine_LoK::_seq_COLTable
const char *const * _seq_COLTable
Definition: kyra_lok.h:543
Kyra::KyraEngine_LoK::_amuletY2
static const uint16 _amuletY2[]
Definition: kyra_lok.h:662
Cryo::GameFlags::GameFlags
GameFlags
Definition: defs.h:561
Kyra::KyraEngine_LoK::_specialPalettes
const uint8 *const * _specialPalettes
Definition: kyra_lok.h:644
Kyra::StaticResource::freeItemAnimDefinition
void freeItemAnimDefinition(void *&ptr, int &size)
Definition: staticres.cpp:703
Kyra::KyraEngine_LoK::_magicMouseItemStartFrame2
static const uint8 _magicMouseItemStartFrame2[]
Definition: kyra_lok.h:656
Kyra::Screen::_curPage
int _curPage
Definition: screen.h:539
Kyra::HoFSequence::wsaFile
const char * wsaFile
Definition: sequences_hof.h:31
Kyra::GI_KYRA3
Definition: kyra_v1.h:139
Kyra::Shape
Definition: kyra_lok.h:51
Kyra::Shape::x
uint8 x
Definition: kyra_lok.h:54
count
u32 count
Definition: disc_io.c:107
Kyra::StaticResource::checkResList
bool checkResList(int id, int &type, const void *&ptr, int &size)
Definition: staticres.cpp:379
Kyra::KyraEngine_HoF::_ingameTalkObjIndex
const uint16 * _ingameTalkObjIndex
Definition: kyra_hof.h:648
Kyra::KyraEngine_LoK::_magicJewelString_Size
int _magicJewelString_Size
Definition: kyra_lok.h:588
Kyra::KyraEngine_HoF::_cdaTrackTableFinale
const uint8 * _cdaTrackTableFinale
Definition: kyra_hof.h:642
Kyra::KyraEngine_HoF::_cauldronMagicTable
static const int16 _cauldronMagicTable[]
Definition: kyra_hof.h:309
Kyra::FrameControl::index
uint16 index
Definition: kyra_v2.h:37
Kyra::KyraEngine_LoK::_winterScrollTableSize
int _winterScrollTableSize
Definition: kyra_lok.h:619
Glk::Alan2::value
static CodeValue value
Definition: decode.cpp:55
Kyra::Screen::setShapePages
void setShapePages(int page1, int page2, int minY=-1, int maxY=201)
Definition: screen.cpp:3002
Kyra::StaticResource::ResData
Definition: resource.h:1193
Kyra::GUI_LoK::resumeGame
int resumeGame(Button *button)
Definition: gui_lok.cpp:544
Kyra::StaticResource::freeRawData
void freeRawData(void *&ptr, int &size)
Definition: staticres.cpp:637
Kyra::KyraEngine_MR::_mainButtonListInitialized
bool _mainButtonListInitialized
Definition: kyra_mr.h:146
Kyra::KyraEngine_LoK::_fluteAnimShapeTable
const Shape * _fluteAnimShapeTable
Definition: kyra_lok.h:615
md5.h
Kyra::KyraEngine_LoK::_characterImageTable
const char *const * _characterImageTable
Definition: kyra_lok.h:595
Kyra::k2SeqplayIntroTracks
Definition: resource.h:229
Kyra::k1Healing2Shapes
Definition: resource.h:158
Kyra::GUI_HoF::audioOptions
int audioOptions(Button *caller)
Definition: gui_hof.cpp:836
Kyra::KyraEngine_LoK::_amuletY
static const uint16 _amuletY[]
Definition: kyra_lok.h:660
Kyra::MenuItem::y
int16 y
Definition: gui_v1.h:36
Kyra::GUI_v2::_gameOptions
Menu _gameOptions
Definition: gui_v2.h:139
Kyra::KyraEngine_v1::resource
Resource * resource()
Definition: kyra_v1.h:195
Kyra::StaticResource::freeStringTable
void freeStringTable(void *&ptr, int &size)
Definition: staticres.cpp:644
Kyra::KyraEngine_LoK::_seq_KallakWriting
const uint8 * _seq_KallakWriting
Definition: kyra_lok.h:530
Kyra::Room::southExit
uint16 southExit
Definition: kyra_lok.h:61
Kyra::KyraEngine_HoF::_buttonList
Button * _buttonList
Definition: kyra_hof.h:272
Kyra::KyraEngine_HoF::_musicFileListFinale
const char *const * _musicFileListFinale
Definition: kyra_hof.h:634
Common::DE_DEU
Definition: language.h:49
Kyra::KyraEngine_LoK::_shapes
uint8 * _shapes[373]
Definition: kyra_lok.h:395
Kyra::Screen::copyPalette
void copyPalette(const int dst, const int src)
Definition: screen.cpp:3062
Kyra::KyraEngine_MR::_mainMenuItalianFan
static const char *const _mainMenuItalianFan[]
Definition: kyra_mr.h:189
Kyra::StaticResource::freeHoFSequenceData
void freeHoFSequenceData(void *&ptr, int &size)
Definition: staticres.cpp:674
Kyra::Room::northExit
uint16 northExit
Definition: kyra_lok.h:59
Kyra::KyraEngine_HoF::_mt32SfxMapSize
static const int _mt32SfxMapSize
Definition: kyra_hof.h:83
Kyra::Screen::getPalette
Palette & getPalette(int num)
Definition: screen.cpp:3057
Kyra::Button::data1ShapePtr
const uint8 * data1ShapePtr
Definition: gui.h:62
endian.h
Kyra::KyraEngine_MR::_badConscienceFrameTable
static const uint8 _badConscienceFrameTable[]
Definition: kyra_mr.h:479
Kyra::k2IngameCDA
Definition: resource.h:239
Kyra::k1IntroCPSStrings
Definition: resource.h:121
Kyra::k2SeqplayIntroCDA
Definition: resource.h:231
Kyra::StaticResource::_vm
KyraEngine_v1 * _vm
Definition: resource.h:1100
Kyra::HoFSeqData::seq
const HoFSequence * seq
Definition: sequences_hof.h:60
Kyra::GUI_v2::_saveMenu
Menu _saveMenu
Definition: gui_v2.h:139
Kyra::KyraEngine_LoK::_winterScroll2Table
const Shape * _winterScroll2Table
Definition: kyra_lok.h:622
Kyra::StaticResource::loadStringTable
bool loadStringTable(Common::SeekableReadStream &stream, void *&ptr, int &size)
Definition: staticres.cpp:430
Kyra::GUI_MR
Definition: gui_mr.h:33
Kyra::HoFSeqItemAnimData::y
uint16 y
Definition: sequences_hof.h:68
Kyra::StaticResource::kLoLCharData
Definition: resource.h:1171
Kyra::Button::buttonCallback
Callback buttonCallback
Definition: gui.h:89
Kyra::GI_KYRA1
Definition: kyra_v1.h:137
Common::Stream::err
virtual bool err() const
Returns true if an I/O failure occurred.
Definition: stream.h:50
Kyra::k1TakenStrings
Definition: resource.h:134
Kyra::GUI_v2::cancelSavename
int cancelSavename(Button *caller)
Definition: gui_v2.cpp:808
Kyra::StaticResource::k2SeqData
Definition: resource.h:1167
uint16
unsigned short uint16
Definition: cdtypes.h:27
Kyra::KyraEngine_HoF::scrollInventory
int scrollInventory(Button *button)
Definition: gui_hof.cpp:159
Kyra::Menu::height
uint16 height
Definition: gui_v1.h:59
Kyra::k1KallakMalcolmSeq
Definition: resource.h:108
Kyra::GUI_MR::initStaticData
void initStaticData() override
Definition: staticres.cpp:1951
int32
signed int int32
Definition: cdtypes.h:29
Kyra::KyraEngine_LoK::_magicAnimationTableSize
int _magicAnimationTableSize
Definition: kyra_lok.h:632
resource.h
Kyra::StaticResource::_fileLoader
const FileType * _fileLoader
Definition: resource.h:1202
Kyra::StaticResource::kEoB2ShapeData
Definition: resource.h:1180
Common::ReadStream::readSint16BE
FORCEINLINE int16 readSint16BE()
Read a signed 16-bit word stored in big endian (MSB first) order from the stream and return it.
Definition: stream.h:452
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
if
if(!(yy_init))
Definition: lingo-lex.cpp:1069
Kyra::Screen::setMouseCursor
virtual void setMouseCursor(int x, int y, const byte *shape)
Definition: screen.cpp:3009
Kyra::GameFlags::isTalkie
bool isTalkie
Definition: kyra_v1.h:121
Glk::AGT::filetype
filetype
Definition: agility.h:95
Kyra::KyraEngine_LoK::_characterImageTableSize
int _characterImageTableSize
Definition: kyra_lok.h:596
Kyra::KyraEngine_MR::_vocHighTable
static const uint8 _vocHighTable[]
Definition: kyra_mr.h:451
Kyra::KyraEngine_MR::_soundListSize
int _soundListSize
Definition: kyra_mr.h:117
Kyra::GUI_v2::choiceYes
int choiceYes(Button *caller)
Definition: gui_v2.cpp:865
Kyra::KyraEngine_LoK::_brandonToWispTableSize
int _brandonToWispTableSize
Definition: kyra_lok.h:629
Kyra::KyraEngine_LoK::_amuleteAnim
const uint8 * _amuleteAnim
Definition: kyra_lok.h:642
Kyra::GUI_LoK::buttonMenuCallback
int buttonMenuCallback(Button *caller)
Definition: gui_lok.cpp:459
Kyra::KyraEngine_HoF::_flaskTable
static const Item _flaskTable[]
Definition: kyra_hof.h:242
Kyra::k2IngameTimJpStrings
Definition: resource.h:241
Kyra::KyraEngine_HoF::_cdaTrackTableIngame
const uint8 * _cdaTrackTableIngame
Definition: kyra_hof.h:640
Kyra::kMusicFinale
Definition: kyra_v1.h:164
kyra_lok.h
Kyra::StaticResource::freeRoomTable
void freeRoomTable(void *&ptr, int &size)
Definition: staticres.cpp:667
Glk::JACL::file
FILE * file
Kyra::StaticResource::k2SeqItemAnimData
Definition: resource.h:1168
Kyra::KyraEngine_MR::_sfxFileMap
const uint8 * _sfxFileMap
Definition: kyra_mr.h:126
Kyra::Screen_MR::_screenDimTable
static const ScreenDim _screenDimTable[]
Definition: screen_mr.h:47
Kyra::StaticResource::loadRoomTable
const Room * loadRoomTable(int id, int &entries)
Definition: staticres.cpp:308
Kyra::StaticResource::staticDataFilename
static const Common::String staticDataFilename()
Definition: resource.h:1056
Kyra::k2SeqplayFinaleTracks
Definition: resource.h:230
Kyra::GUI_LoK::controlsChangeSounds
int controlsChangeSounds(Button *button)
Definition: gui_lok.cpp:1017
Kyra::KyraEngine_LoK::_itemHtDat
uint8 _itemHtDat[145]
Definition: kyra_lok.h:452
Kyra::GameFlags::platform
Common::Platform platform
Definition: kyra_v1.h:117
Kyra::GUI_v2::_scrollDownButton
Button _scrollDownButton
Definition: gui_v2.h:138
Common::ES_ESP
Definition: language.h:63
Kyra::KyraEngine_HoF::_musicFileListIntroSize
int _musicFileListIntroSize
Definition: kyra_hof.h:633
Kyra::KyraEngine_HoF
Definition: kyra_hof.h:45
temp
int temp
Definition: main.cpp:69
Kyra::KyraEngine_MR::_goodConscienceFrameTable
static const uint8 _goodConscienceFrameTable[]
Definition: kyra_mr.h:488
Kyra::KyraEngine_LoK::_fullFlask_Size
int _fullFlask_Size
Definition: kyra_lok.h:590
Kyra::GUI_v2::_savenameMenu
Menu _savenameMenu
Definition: gui_v2.h:139
Kyra::k2SeqplayFinaleCDA
Definition: resource.h:232
Kyra::KyraEngine_MR::_mainMenuStringsSize
int _mainMenuStringsSize
Definition: kyra_mr.h:186
Kyra::KyraEngine_LoK::buttonAmuletCallback
int buttonAmuletCallback(Button *caller)
Definition: gui_lok.cpp:84
Kyra::StaticResource::FileType
Definition: resource.h:1184
Kyra::k1PoisonDeathShapes
Definition: resource.h:159
Kyra::StaticResource::loadRawDataBe16
const uint16 * loadRawDataBe16(int id, int &entries)
Definition: staticres_rpg.cpp:29
Kyra::GUI_v2::cancelSaveMenu
int cancelSaveMenu(Button *caller)
Definition: gui_v2.cpp:674
Kyra::Menu::bkgdColor
uint8 bkgdColor
Definition: gui_v1.h:61
Kyra::StaticResource::freeShapeTable
void freeShapeTable(void *&ptr, int &size)
Definition: staticres.cpp:653
gui_lok.h
Kyra::Screen_LoK_16::_palette16
static const uint8 _palette16[48]
Definition: screen_lok.h:109
filename
Common::String filename
Definition: action.cpp:1197
Kyra::Shape::xOffset
int8 xOffset
Definition: kyra_lok.h:53
Common::ListInternal::Iterator
Definition: list_intern.h:49
Kyra::StaticResource::getData
const void * getData(int id, int requesttype, int &size)
Definition: staticres.cpp:404
Kyra::StaticResource::freeRawDataBe32
void freeRawDataBe32(void *&ptr, int &size)
Definition: staticres_rpg.cpp:68
Kyra::Shape::h
uint8 h
Definition: kyra_lok.h:54
Kyra::AmigaSfxTable::pan
uint8 pan
Definition: sound_intern.h:315
Kyra::KyraEngine_LoK::_newGameString_Size
int _newGameString_Size
Definition: kyra_lok.h:593
Kyra::KyraEngine_LoK::_defaultShapeTable
Shape * _defaultShapeTable
Definition: kyra_lok.h:604
Kyra::k3ItemMagicTable
Definition: resource.h:251
Kyra::GUI_LoK::_scrollDownButton
Button _scrollDownButton
Definition: gui_lok.h:112
Kyra::GUI_HoF::_vm
KyraEngine_HoF * _vm
Definition: gui_hof.h:62
Kyra::KyraEngine_LoK::_noDropList_Size
int _noDropList_Size
Definition: kyra_lok.h:579
Kyra::StaticResource::loadCompassData
const CompassDef * loadCompassData(int id, int &entries)
Definition: staticres_lol.cpp:41
Kyra::Screen::CR_NO_P_CHECK
Definition: screen.h:364
Kyra::StaticResource::loadHoFSequenceData
const HoFSeqData * loadHoFSequenceData(int id, int &entries)
Definition: staticres.cpp:312
Kyra::KyraEngine_MR::_inventoryX
static const uint8 _inventoryX[]
Definition: kyra_mr.h:258
Kyra::KyraEngine_HoF::_keyboardSounds
static const int16 _keyboardSounds[190]
Definition: kyra_hof.h:128
Kyra::KyraEngine_LoK::_healingTip
const char *const * _healingTip
Definition: kyra_lok.h:564
Kyra::StaticResource::loadStrings
const char *const * loadStrings(int id, int &strings)
Definition: staticres.cpp:292
Kyra::KyraEngine_HoF::_pcSpkSfxMapSize
static const int _pcSpkSfxMapSize
Definition: kyra_hof.h:87
Common::String::c_str
const char * c_str() const
Definition: str.h:206
Kyra::Resource::listFiles
void listFiles(const Common::String &pattern, Common::ArchiveMemberList &list)
Definition: resource.cpp:289
Common::SeekableReadStream::size
virtual int32 size() const =0
Obtains the total size of the stream, measured in bytes.
Kyra::KyraEngine_HoF::_cauldronProtectedItems
static const int16 _cauldronProtectedItems[]
Definition: kyra_hof.h:307
Kyra::HoFNestedSequence::wsaFile
const char * wsaFile
Definition: sequences_hof.h:47
Kyra::KyraEngine_HoF::_ingamePakListSize
int _ingamePakListSize
Definition: kyra_hof.h:630
Kyra::StaticResource::k2ItemAnimDefinition
Definition: resource.h:1169
Kyra::KyraEngine_HoF::_inventoryY
static const int _inventoryY[]
Definition: kyra_hof.h:247
gui_hof.h
Kyra::KyraEngine_HoF::cauldronButton
int cauldronButton(Button *button)
Definition: gui_hof.cpp:574
Kyra::GUI_v2::clickSaveSlot
int clickSaveSlot(Button *caller)
Definition: gui_v2.cpp:633
Kyra::GUI_LoK::controlsApply
int controlsApply(Button *button)
Definition: gui_lok.cpp:1050
Kyra::k1OutroReunionSeq
Definition: resource.h:119