diff options
author | Paul Gilbert | 2016-07-26 19:48:14 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-07-26 19:48:14 -0400 |
commit | 504cf6ecb688a3f1c65a857bffd527d8b0e6ba63 (patch) | |
tree | 0c0d96d4061c11850c851f0fc981c75a58c20515 /engines/access | |
parent | d8c28d15ae553d047b7e571f98727fa79ee143f3 (diff) | |
parent | e19922d181e775791f9105b8be7ff410770ede51 (diff) | |
download | scummvm-rg350-504cf6ecb688a3f1c65a857bffd527d8b0e6ba63.tar.gz scummvm-rg350-504cf6ecb688a3f1c65a857bffd527d8b0e6ba63.tar.bz2 scummvm-rg350-504cf6ecb688a3f1c65a857bffd527d8b0e6ba63.zip |
Merge branch 'master' into xeen
Diffstat (limited to 'engines/access')
43 files changed, 1690 insertions, 3317 deletions
diff --git a/engines/access/access.cpp b/engines/access/access.cpp index 56fa6c7533..6f91bd76dd 100644 --- a/engines/access/access.cpp +++ b/engines/access/access.cpp @@ -34,19 +34,24 @@ namespace Access { AccessEngine::AccessEngine(OSystem *syst, const AccessGameDescription *gameDesc) : _gameDescription(gameDesc), Engine(syst), _randomSource("Access"), _useItem(_flags[99]), _startup(_flags[170]), _manScaleOff(_flags[172]) { + _aboutBox = nullptr; _animation = nullptr; _bubbleBox = nullptr; _char = nullptr; _debugger = nullptr; _events = nullptr; _files = nullptr; + _invBox = nullptr; _inventory = nullptr; + _helpBox = nullptr; _midi = nullptr; _player = nullptr; + _res = nullptr; _room = nullptr; _screen = nullptr; _scripts = nullptr; _sound = nullptr; + _travelBox = nullptr; _video = nullptr; _destIn = nullptr; @@ -130,6 +135,7 @@ AccessEngine::~AccessEngine() { delete _inventory; delete _midi; delete _player; + delete _res; delete _room; delete _screen; delete _scripts; @@ -204,6 +210,13 @@ void AccessEngine::initialize() { } Common::Error AccessEngine::run() { + _res = Resources::init(this); + Common::String errorMessage; + if (!_res->load(errorMessage)) { + GUIErrorMessage(errorMessage); + return Common::kNoError; + } + setVGA(); initialize(); @@ -231,7 +244,7 @@ void AccessEngine::freeCells() { } } -void AccessEngine::speakText(ASurface *s, const Common::String &msg) { +void AccessEngine::speakText(BaseSurface *s, const Common::String &msg) { Common::String lines = msg; Common::String line; int curPage = 0; @@ -312,7 +325,7 @@ void AccessEngine::speakText(ASurface *s, const Common::String &msg) { } } -void AccessEngine::printText(ASurface *s, const Common::String &msg) { +void AccessEngine::printText(BaseSurface *s, const Common::String &msg) { Common::String lines = msg; Common::String line; int width = 0; @@ -423,20 +436,9 @@ void AccessEngine::copyBF1BF2() { } void AccessEngine::copyBF2Vid() { - const byte *srcP = (const byte *)_buffer2.getPixels(); - byte *destP = (byte *)_screen->getBasePtr(_screen->_windowXAdd, - _screen->_windowYAdd + _screen->_screenYOff); - - for (int yp = 0; yp < _screen->_vWindowLinesTall; ++yp) { - Common::copy(srcP, srcP + _screen->_vWindowBytesWide, destP); - srcP += _buffer2.pitch; - destP += _screen->pitch; - } - - // Add dirty rect for affected area - Common::Rect r(_screen->_vWindowBytesWide, _screen->_vWindowLinesTall); - r.moveTo(_screen->_windowXAdd, _screen->_windowYAdd + _screen->_screenYOff); - _screen->addDirtyRect(r); + _screen->blitFrom(_buffer2, + Common::Rect(0, 0, _screen->_vWindowBytesWide, _screen->_vWindowLinesTall), + Common::Point(_screen->_windowXAdd, _screen->_windowYAdd)); } void AccessEngine::playVideo(int videoNum, const Common::Point &pt) { diff --git a/engines/access/access.h b/engines/access/access.h index 37b9fec5a5..972dd4c380 100644 --- a/engines/access/access.h +++ b/engines/access/access.h @@ -42,6 +42,7 @@ #include "access/font.h" #include "access/inventory.h" #include "access/player.h" +#include "access/resources.h" #include "access/room.h" #include "access/screen.h" #include "access/scripts.h" @@ -147,6 +148,7 @@ public: FileManager *_files; InventoryManager *_inventory; Player *_player; + Resources *_res; Room *_room; Screen *_screen; Scripts *_scripts; @@ -154,8 +156,8 @@ public: MusicManager *_midi; VideoPlayer *_video; - ASurface *_destIn; - ASurface *_current; + BaseSurface *_destIn; + BaseSurface *_current; ASurface _buffer1; ASurface _buffer2; ASurface _vidBuf; @@ -278,8 +280,8 @@ public: /** * Draw a string on a given surface and update text positioning */ - void printText(ASurface *s, const Common::String &msg); - void speakText(ASurface *s, const Common::String &msg); + void printText(BaseSurface *s, const Common::String &msg); + void speakText(BaseSurface *s, const Common::String &msg); /** * Load a savegame @@ -313,6 +315,8 @@ public: void SPRINTCHR(char c, int fontNum); void PRINTCHR(Common::String msg, int fontNum); + + bool playMovie(const Common::String &filename, const Common::Point &pos); }; } // End of namespace Access diff --git a/engines/access/amazon/amazon_game.cpp b/engines/access/amazon/amazon_game.cpp index 7a55873d97..8467d8b623 100644 --- a/engines/access/amazon/amazon_game.cpp +++ b/engines/access/amazon/amazon_game.cpp @@ -146,27 +146,24 @@ void AmazonEngine::playGame() { } void AmazonEngine::setupGame() { + Amazon::AmazonResources &res = *((Amazon::AmazonResources *)_res); + // Load death list - if (isDemo()) { - _deaths.resize(34); - for (int i = 0; i < 34; ++i) { - _deaths[i]._screenId = DEATH_SCREENS_DEMO[i]; - _deaths[i]._msg = DEATH_TEXT_DEMO[i]; - } - } else { - _deaths.resize(58); - for (int i = 0; i < 58; ++i) { - _deaths[i]._screenId = DEATH_SCREENS[i]; - _deaths[i]._msg = DEATH_TEXT[i]; - } + _deaths.resize(_res->DEATHS.size()); + + for (uint idx = 0; idx < _deaths.size(); ++idx) { + _deaths[idx]._screenId = res.DEATHS[idx]._screenId; + _deaths[idx]._msg = res.DEATHS[idx]._msg; } + + // Load the deaths cells _deaths._cells.resize(13); for (int i = 0; i < 13; ++i) _deaths._cells[i] = CellIdent(DEATH_CELLS[i][0], DEATH_CELLS[i][1], DEATH_CELLS[i][2]); // Miscellaneous - _fonts._font1.load(FONT6x6_INDEX, FONT6x6_DATA); - _fonts._font2.load(FONT2_INDEX, FONT2_DATA); + _fonts._font1.load(&res.FONT6x6_INDEX[0], &res.FONT6x6_DATA[0]); + _fonts._font2.load(&res.FONT2_INDEX[0], &res.FONT2_DATA[0]); initVariables(); } @@ -195,8 +192,8 @@ void AmazonEngine::initVariables() { _timers.push_back(te); } - _player->_playerX = _player->_rawPlayer.x = _travelPos[_player->_roomNumber][0]; - _player->_playerY = _player->_rawPlayer.y = _travelPos[_player->_roomNumber][1]; + _player->_playerX = _player->_rawPlayer.x = _res->ROOMTBL[_player->_roomNumber]._travelPos.x; + _player->_playerY = _player->_rawPlayer.y = _res->ROOMTBL[_player->_roomNumber]._travelPos.y; _room->_selectCommand = -1; _events->setNormalCursor(CURSOR_CROSSHAIRS); _mouseMode = 0; @@ -411,6 +408,7 @@ void AmazonEngine::calcIQ() { } void AmazonEngine::helpTitle() { + AmazonResources &res = *(AmazonResources *)_res; int width = _fonts._font2.stringWidth(_bubbleBox->_bubbleTitle); int posX = 160 - (width / 2); _fonts._font2._fontColors[0] = 0; @@ -419,13 +417,13 @@ void AmazonEngine::helpTitle() { _fonts._font2._fontColors[3] = 35; _fonts._font2.drawString(_screen, _bubbleBox->_bubbleTitle, Common::Point(posX, 24)); - width = _fonts._font2.stringWidth(HELPLVLTXT[_helpLevel]); + width = _fonts._font2.stringWidth(res.HELPLVLTXT[_helpLevel]); posX = 160 - (width / 2); _fonts._font2._fontColors[0] = 0; _fonts._font2._fontColors[1] = 10; _fonts._font2._fontColors[2] = 11; _fonts._font2._fontColors[3] = 12; - _fonts._font2.drawString(_screen, HELPLVLTXT[_helpLevel], Common::Point(posX, 36)); + _fonts._font2.drawString(_screen, res.HELPLVLTXT[_helpLevel], Common::Point(posX, 36)); Common::String iqText = "IQ: "; calcIQ(); @@ -441,7 +439,7 @@ void AmazonEngine::helpTitle() { index /= 20; iqText += " "; - iqText += IQLABELS[index]; + iqText += res.IQLABELS[index]; width = _fonts._font2.stringWidth(iqText); posX = 160 - (width / 2); @@ -498,7 +496,7 @@ void AmazonEngine::drawHelp(const Common::String str) { _files->loadScreen(95, 2); if (_moreHelp == 1) { - ASurface *oldDest = _destIn; + BaseSurface *oldDest = _destIn; _destIn = _screen; int oldClip = _screen->_clipHeight; _screen->_clipHeight = 200; @@ -619,7 +617,12 @@ void AmazonEngine::startChapter(int chapter) { _establishGroup = 1; loadEstablish(0x40 + _chapter); - uint16 msgOffset = READ_LE_UINT16(_establish->data() + ((0x40 + _chapter) * 2) + 2); + + byte *entryOffset = _establish->data() + ((0x40 + _chapter) * 2); + if (isCD()) + entryOffset += 2; + + uint16 msgOffset = READ_LE_UINT16(entryOffset); _printEnd = 170; Common::String msg((const char *)_establish->data() + msgOffset); @@ -642,25 +645,27 @@ void AmazonEngine::startChapter(int chapter) { _room->init4Quads(); } - if (chapter == 14) { - _conversation = 31; - _char->loadChar(_conversation); - _events->setCursor(CURSOR_ARROW); + if (isCD()) { + if (chapter == 14) { + _conversation = 31; + _char->loadChar(_conversation); + _events->setCursor(CURSOR_ARROW); - _images.clear(); - _oldRects.clear(); - _scripts->_sequence = 0; - _scripts->searchForSequence(); + _images.clear(); + _oldRects.clear(); + _scripts->_sequence = 0; + _scripts->searchForSequence(); - if (_screen->_vesaMode) { - _converseMode = 1; - } - } else if (chapter != 1) { - _player->_roomNumber = CHAPTER_JUMP[_chapter - 1]; - _room->_function = FN_CLEAR1; - _converseMode = 0; + if (_screen->_vesaMode) { + _converseMode = 1; + } + } else if (chapter != 1) { + _player->_roomNumber = CHAPTER_JUMP[_chapter - 1]; + _room->_function = FN_CLEAR1; + _converseMode = 0; - _scripts->cmdRetPos(); + _scripts->cmdRetPos(); + } } } diff --git a/engines/access/amazon/amazon_logic.cpp b/engines/access/amazon/amazon_logic.cpp index de53da51cd..08006fe1b7 100644 --- a/engines/access/amazon/amazon_logic.cpp +++ b/engines/access/amazon/amazon_logic.cpp @@ -185,16 +185,24 @@ void CampScene::mWhileDoOpen() { _vm->_numAnimTimers = 0; _vm->_images.clear(); - if (_vm->_conversation == 2) { - // Cutscene at end of Chapter 6 - Resource *spriteData = _vm->_files->loadFile(28, 37); - _vm->_objectsTable[28] = new SpriteResource(_vm, spriteData); - delete spriteData; - - _vm->_animation->freeAnimationData(); - animResource = _vm->_files->loadFile(28, 38); - _vm->_animation->loadAnimations(animResource); - delete animResource; + if (_vm->isCD()) { + if (_vm->_conversation == 2) { + // Cutscene at end of Chapter 6 + Resource *spriteData = _vm->_files->loadFile(28, 37); + _vm->_objectsTable[28] = new SpriteResource(_vm, spriteData); + delete spriteData; + + _vm->_animation->freeAnimationData(); + animResource = _vm->_files->loadFile(28, 38); + _vm->_animation->loadAnimations(animResource); + delete animResource; + } + } else { + _vm->freeCells(); + _vm->_oldRects.clear(); + _vm->_newRects.clear(); + _vm->_numAnimTimers = 0; + _vm->_images.clear(); } } @@ -1251,6 +1259,9 @@ Cast::Cast(AmazonEngine *vm) : PannedScene(vm) { void Cast::doCast(int param1) { Screen &screen = *_vm->_screen; + _vm->_buffer1.create(_vm->_screen->w, _vm->_screen->h); + _vm->_buffer2.create(_vm->_screen->w, _vm->_screen->h); + screen.setDisplayScan(); _vm->_events->hideCursor(); screen.forceFadeOut(); @@ -1294,8 +1305,8 @@ void Cast::doCast(int param1) { _pan[i]._pObjXl = _pan[i]._pObjYl = 0; } - _pNumObj = 4; - for (int i = 0; i < _pNumObj; i++) { + _pNumObj += 4; + for (int i = 0; i < 4; i++) { _pan[26 + i]._pObject = _vm->_objectsTable[1]; _pan[26 + i]._pImgNum = CAST_END_OBJ1[i][0]; _pan[26 + i]._pObjX = CAST_END_OBJ1[i][1]; @@ -1319,20 +1330,16 @@ void Cast::doCast(int param1) { _vm->plotList(); _vm->copyBlocks(); - _vm->_events->pollEvents(); + for (int idx = 0; idx < 5 && !_vm->shouldQuit() && + !_vm->_events->isKeyMousePressed(); ++idx) + _vm->_events->pollEventsAndWait(); + if (_vm->_events->isKeyMousePressed()) break; if (_yCam < -7550) { - _vm->_events->_vbCount = 50; - - while (!_vm->shouldQuit() && !_vm->_events->isKeyMousePressed() && _vm->_events->_vbCount > 0) { - _vm->_events->pollEventsAndWait(); - } - while (!_vm->shouldQuit() && !_vm->_midi->checkMidiDone()) _vm->_events->pollEventsAndWait(); - break; } } @@ -1598,7 +1605,7 @@ void River::moveCanoe() { if (events._leftButton && pt.y >= 140) { if (pt.x < _vm->_room->_rMouse[8][0]) { // Disk icon wasn't clicked - _vm->_scripts->printString(BAR_MESSAGE); + _vm->_scripts->printString(AMRES.BAR_MESSAGE); } else { // Clicked on the Disc icon. Show the ScummVM menu _vm->_room->handleCommand(9); diff --git a/engines/access/amazon/amazon_resources.cpp b/engines/access/amazon/amazon_resources.cpp index 430aa64f30..7dbe1c9f90 100644 --- a/engines/access/amazon/amazon_resources.cpp +++ b/engines/access/amazon/amazon_resources.cpp @@ -27,50 +27,60 @@ namespace Access { namespace Amazon { -const char *const FILENAMES[] = { - "S00.AP", "S01.AP", "S02.AP", "R03.AP", "S04.AP", "S05.AP", - "S06.AP", "S07.AP", "S08.AP", "S09.AP", "S10.AP", "S11.AP", - "S12.AP", "S13.AP", "S14.AP", "S15.AP", "S16.AP", "S17.AP", - "S18.AP", "S19.AP", "S20.AP", "S21.AP", "S22.AP", "S23.AP", - "S24.AP", "S25.AP", "S26.AP", "S27.AP", "S28.AP", "S29.AP", - "S30.AP", "S31.AP", "S32.AP", "S33.AP", "S34.AP", "R35.AP", - "S36.AP", "S37.AP", "S38.AP", "S39.AP", "S40.AP", "C26.AP", - "S42.AP", "S01.AP", "S44.AP", "S45.AP", "S46.AP", "S47.AP", - "C36.AP", nullptr, "S50.AP", nullptr, nullptr, "S53.AP", - "S54.AP", "S55.AP", "C35.AP", "S57.AP", "S58.AP", nullptr, - nullptr, "S61.AP", nullptr, nullptr, "S64.AP", "C00.AP", - "C01.AP", "C06.AP", "C07.AP", "C08.AP", "C05.AP", "C09.AP", - "C12.AP", "C03.AP", "C13.AP", "C15.AP", "C14.AP", "C16.AP", - "C17.AP", "C19.AP", "C20.AP", "C21.AP", "C22.AP", "C23.AP", - "C24.AP", "C25.AP", "C29.AP", "C30.AP", "C32.AP", "C33.AP", - "C34.AP", "CREDITS.AP", "MIDIDRV.AP", "SUMMARY.AP", "DEAD.AP", - "EST.AP", "CHAPTER.AP", "MIDI.AP", "SOUND.AP", "INV.AP", - // The following files are only present in the CD version - "NARATE01.AP", "NARATE02.AP", "NARATE03.AP", "NARATE04.AP", - "NARATE05.AP", "NARATE06.AP", "NARATE07.AP", "NARATE08.AP", - "NARATE09.AP", "NARATE10.AP", "NARATE11.AP", "NARATE12.AP", - "NARATE13.AP", "NARATE14.AP", "S00.AP", "TAG.AP" -}; - -const char *const FILENAMES_DEMO[] = { - "S00.AP", "S01.AP", "S02.AP", "R03.AP", "S04.AP", "S05.AP", - "S06.AP", "S07.AP", "S08.AP", "S09.AP", "S10.AP", "S11.AP", - "S12.AP", "S13.AP", "S14.AP", "S15.AP", "S16.AP", "S17.AP", - "S18.AP", "S19.AP", "S20.AP", "S21.AP", "S22.AP", "S23.AP", - "S24.AP", "S25.AP", "S26.AP", "S27.AP", "S28.AP", "S29.AP", - "S30.AP", "S31.AP", "S32.AP", "S33.AP", "S34.AP", "R35.AP", - "S36.AP", "S37.AP", "S38.AP", "S39.AP", "S40.AP", "TITLE.AP", - "S42.AP", "S01.AP", "S44.AP", "S45.AP", "S46.AP", "S47.AP", - nullptr, nullptr, "S50.AP", nullptr, nullptr, "S53.AP", - "S54.AP", nullptr, nullptr, "S57.AP", nullptr, nullptr, - nullptr, "S61.AP", nullptr, "C23.AP", "C12.AP", "C00.AP", - "C01.AP", "C06.AP", "C07.AP", "C08.AP", "C05.AP", "C09.AP", - "C12.AP", "C03.AP", "C13.AP", "C15.AP", "C14.AP", "C16.AP", - "C17.AP", "C19.AP", "C20.AP", "C21.AP", "C22.AP", "C23.AP", - "C24.AP", "C25.AP", "R49.AP", "R49.AP", "R49.AP", "R49.AP", - "R49.AP", "R49.AP", "R49.AP", "R49.AP", "DEAD.AP", "EST.AP", - "CHAPTER.AP", "MUSIC.AP", "SOUND.AP", "INV.AP" -}; +void AmazonResources::load(Common::SeekableReadStream &s) { + Resources::load(s); + uint count; + + // Load the version specific data + NO_HELP_MESSAGE = readString(s); + NO_HINTS_MESSAGE = readString(s); + RIVER_HIT1 = readString(s); + RIVER_HIT2 = readString(s); + BAR_MESSAGE = readString(s); + + for (int idx = 0; idx < 3; ++idx) + HELPLVLTXT[idx] = readString(s); + for (int idx = 0; idx < 9; ++idx) + IQLABELS[idx] = readString(s); + + CANT_GET_THERE = readString(s); + + // Get the offset of the general shared data for the game + uint entryOffset = findEntry(_vm->getGameID(), 2, 0, (Common::Language)0); + s.seek(entryOffset); + + // Read in the cursor list + count = s.readUint16LE(); + CURSORS.resize(count); + for (uint idx = 0; idx < count; ++idx) { + uint count2 = s.readUint16LE(); + CURSORS[idx].resize(count2); + s.read(&CURSORS[idx][0], count2); + } + + // Load font data + count = s.readUint16LE(); + FONT2_INDEX.resize(count); + for (uint idx = 0; idx < count; ++idx) + FONT2_INDEX[idx] = s.readSint16LE(); + + count = s.readUint16LE(); + FONT2_DATA.resize(count); + for (uint idx = 0; idx < count; ++idx) + FONT2_DATA[idx] = s.readByte(); + + count = s.readUint16LE(); + FONT6x6_INDEX.resize(count); + for (uint idx = 0; idx < count; ++idx) + FONT6x6_INDEX[idx] = s.readSint16LE(); + + count = s.readUint16LE(); + FONT6x6_DATA.resize(count); + for (uint idx = 0; idx < count; ++idx) + FONT6x6_DATA[idx] = s.readByte(); +} + +/*------------------------------------------------------------------------*/ const int SIDEOFFR[] = { 5, 5, 5, 5, 5, 5, 5, 5, 0 }; const int SIDEOFFL[] = { 5, 5, 5, 5, 5, 5, 5, 5, 0 }; @@ -85,316 +95,6 @@ const int DIAGOFFULY[] = { 3, 3, 1, 2, 2, 1, 1, 1, 0 }; const int DIAGOFFDLX[] = { 4, 5, 3, 3, 5, 4, 6, 1, 0 }; const int DIAGOFFDLY[] = { 2, 2, 1, 2, 3, 1, 2, 1, 0 }; -const byte MOUSE0[] = { - // hotspot x and y, uint16 LE - 0, 0, 0, 0, - // byte 1: number of skipped pixels - // byte 2: number of plotted pixels - // then, pixels - 0, 2, 6, 1, - 0, 3, 6, 6, 1, - 0, 3, 6, 6, 1, - 0, 4, 6, 6, 6, 1, - 0, 4, 6, 6, 6, 1, - 0, 5, 6, 6, 6, 6, 1, - 0, 5, 6, 6, 6, 6, 1, - 0, 6, 6, 6, 6, 6, 6, 1, - 0, 6, 6, 6, 6, 6, 6, 1, - 0, 7, 6, 6, 6, 6, 6, 6, 1, - 0, 6, 6, 6, 6, 6, 6, 1, - 0, 5, 6, 6, 6, 6, 1, - 2, 3, 6, 6, 1, - 3, 3, 6, 6, 1, - 3, 3, 6, 6, 1, - 4, 2, 6, 1 -}; - -const byte MOUSE1[] = { - // hotspot x and y, uint16 LE - 0x07, 0x00, 0x07, 0x00, - // byte 1: number of skipped pixels - // byte 2: number of plotted pixels - // then, pixels - 0x06, 0x01, 0x05, - 0x04, 0x05, 0xFF, 0xFF, 0x00, 0xFF, 0xFF, - 0x03, 0x07, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, - 0x02, 0x09, 0xFF, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0xFF, - 0x01, 0x0B, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, - 0x01, 0x0B, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0xFF, - 0x00, 0x0D, 0x05, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x05, 0x00, 0x05, 0x00, 0x00, 0x05, - 0x01, 0x0B, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0xFF, - 0x01, 0x0B, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, - 0x02, 0x09, 0xFF, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0xFF, - 0x03, 0x07, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, - 0x04, 0x05, 0xFF, 0xFF, 0x00, 0xFF, 0xFF, - 0x06, 0x01, 0x05, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00 -}; - -const byte MOUSE2[] = { - // hotspot x and y, uint16 LE - 0x08, 0x00, 0x08, 0x00, - // byte 1: number of skipped pixels - // byte 2: number of plotted pixels - // then, pixels - 0x00, 0x00, - 0x00, 0x00, - 0x07, 0x02, 0x04, 0x05, - 0x07, 0x02, 0x04, 0x05, - 0x07, 0x02, 0x04, 0x05, - 0x07, 0x02, 0x04, 0x05, - 0x07, 0x02, 0x04, 0x05, - 0x02, 0x0C, 0x04, 0x04, 0x04, 0x04, 0x04, 0x00, 0x04, 0x04, 0x04, 0x04, 0x04, 0x05, - 0x07, 0x02, 0x04, 0x05, - 0x07, 0x02, 0x04, 0x05, - 0x07, 0x02, 0x04, 0x05, - 0x07, 0x02, 0x04, 0x05, - 0x07, 0x02, 0x04, 0x05, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00 -}; - -const byte MOUSE3[] = { - // hotspot x and y, uint16 LE - 0x00, 0x00, 0x00, 0x00, - // byte 1: number of skipped pixels - // byte 2: number of plotted pixels - // then, pixels - 0x00, 0x0B, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x00, 0x0C, 0x06, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x06, 0x06, 0x05, - 0x00, 0x0C, 0x06, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x06, 0x05, 0x05, - 0x00, 0x0C, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x05, - 0x00, 0x0C, 0x06, 0x06, 0x06, 0x06, 0x06, 0x05, 0x06, 0x06, 0x06, 0x06, 0x06, 0x05, - 0x00, 0x0C, 0x06, 0x06, 0x06, 0x06, 0x05, 0x00, 0x00, 0x06, 0x06, 0x06, 0x06, 0x05, - 0x00, 0x0C, 0x06, 0x06, 0x06, 0x06, 0x06, 0x00, 0x06, 0x06, 0x06, 0x06, 0x06, 0x05, - 0x00, 0x0C, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x05, - 0x00, 0x0C, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x05, - 0x00, 0x0C, 0x06, 0x06, 0x06, 0x06, 0x06, 0x05, 0x06, 0x06, 0x06, 0x06, 0x06, 0x05, - 0x00, 0x0C, 0x06, 0x06, 0x06, 0x06, 0x06, 0x05, 0x06, 0x06, 0x06, 0x06, 0x06, 0x05, - 0x00, 0x0C, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x05, - 0x01, 0x0B, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00 -}; -const byte CURSEYE[] = { - // hotspot x and y, uint16 LE - 0x01, 0x00, 0x08, 0x00, - // byte 1: number of skipped pixels - // byte 2: number of plotted pixels - // then, pixels - 0x04, 0x06, 0x0E, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, - 0x03, 0x09, 0x0E, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x0D, 0x0D, - 0x02, 0x0B, 0x0E, 0x01, 0x33, 0x33, 0x01, 0x01, 0x33, 0x34, 0x01, 0x01, 0x0D, - 0x01, 0x0D, 0x0E, 0x01, 0x04, 0x34, 0x01, 0x01, 0x01, 0x07, 0x33, 0x04, 0x04, 0x01, 0x0D, - 0x00, 0x0F, 0x0E, 0x0E, 0x01, 0x07, 0x33, 0x33, 0x01, 0x01, 0x33, 0x34, 0x07, 0x07, 0x06, 0x01, 0x0E, - 0x01, 0x0D, 0x0F, 0x0F, 0x06, 0x07, 0x34, 0x33, 0x33, 0x34, 0x07, 0x07, 0x06, 0x0F, 0x0E, - 0x03, 0x09, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0E, - 0x01, 0x01, 0x07, - 0x00, 0x03, 0x07, 0x01, 0x07, - 0x01, 0x01, 0x07, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00 -}; - -const byte CURSHAND[] = { - // hotspot x and y, uint16 LE - 0x02, 0x00, 0x03, 0x00, - // byte 1: number of skipped pixels - // byte 2: number of plotted pixels - // then, pixels - 0x07, 0x02, 0x17, 0x0E, - 0x05, 0x07, 0x0E, 0x12, 0x17, 0x0E, 0x13, 0x17, 0x0E, - 0x02, 0x0C, 0x07, 0x00, 0x17, 0x0E, 0x11, 0x0F, 0x0E, 0x11, 0x17, 0x0E, 0x00, 0x17, - 0x01, 0x0E, 0x07, 0x01, 0x07, 0x0F, 0x0E, 0x11, 0x17, 0x0E, 0x11, 0x0F, 0x0E, 0x12, 0x17, 0x0E, - 0x02, 0x0D, 0x07, 0x00, 0x17, 0x0F, 0x12, 0x0F, 0x0F, 0x11, 0x17, 0x0E, 0x12, 0x0F, 0x0E, - 0x04, 0x0B, 0x0F, 0x0E, 0x11, 0x17, 0x0E, 0x12, 0x0F, 0x0F, 0x11, 0x17, 0x0E, - 0x04, 0x0B, 0x17, 0x0E, 0x12, 0x17, 0x0E, 0x12, 0x17, 0x0E, 0x11, 0x0F, 0x0E, - 0x00, 0x0F, 0x0E, 0x0D, 0x12, 0x00, 0x17, 0x0F, 0x0F, 0x0F, 0x0F, 0x12, 0x0F, 0x0E, 0x12, 0x17, 0x0F, - 0x00, 0x0F, 0x0F, 0x17, 0x0D, 0x11, 0x0F, 0x0E, 0x0D, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0E, 0x0D, - 0x01, 0x0E, 0x0F, 0x17, 0x0F, 0x0E, 0x0F, 0x0D, 0x0D, 0x0D, 0x0D, 0x0E, 0x0F, 0x0F, 0x0E, 0x0D, - 0x02, 0x0D, 0x0F, 0x17, 0x0F, 0x0E, 0x0D, 0x0D, 0x0F, 0x0F, 0x0E, 0x0F, 0x0E, 0x0E, 0x12, - 0x03, 0x0C, 0x0F, 0x17, 0x0F, 0x0F, 0x0F, 0x0E, 0x0F, 0x0F, 0x0F, 0x0E, 0x0D, 0x12, - 0x04, 0x0A, 0x0F, 0x17, 0x0F, 0x0F, 0x0F, 0x0E, 0x0F, 0x0F, 0x0E, 0x0D, - 0x05, 0x09, 0x0F, 0x17, 0x0F, 0x0F, 0x0F, 0x0F, 0x0E, 0x0D, 0x12, - 0x06, 0x08, 0x17, 0x0F, 0x0F, 0x0F, 0x0F, 0x0E, 0x0D, 0x12, - 0x06, 0x07, 0x17, 0x0F, 0x0F, 0x0F, 0x3D, 0x0E, 0x0D -}; - -const byte CURSGET[] = { - // hotspot x and y, uint16 LE - 0x07, 0x00, 0x0E, 0x00, - // byte 1: number of skipped pixels - // byte 2: number of plotted pixels - // then, pixels - 0x0A, 0x05, 0x1C, 0x07, 0x0F, 0x0F, 0x0F, - 0x08, 0x08, 0x1C, 0x07, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0C, - 0x06, 0x0A, 0x1C, 0x07, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0C, - 0x05, 0x0A, 0x07, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0C, - 0x03, 0x0C, 0x07, 0x1C, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0C, - 0x02, 0x0D, 0x1C, 0x0F, 0x0E, 0x0E, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0C, - 0x01, 0x0E, 0x07, 0x0F, 0x0E, 0x0D, 0x0F, 0x0E, 0x0D, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0C, - 0x00, 0x0F, 0x1C, 0x0F, 0x0E, 0x0D, 0x0F, 0x0E, 0x0D, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0C, - 0x00, 0x0F, 0x1C, 0x0E, 0x0D, 0x0F, 0x0E, 0x0D, 0x0F, 0x0F, 0x0C, 0x0C, 0x0E, 0x0F, 0x0F, 0x0F, 0x0C, - 0x00, 0x0E, 0x1C, 0x0D, 0x0F, 0x0E, 0x0D, 0x0F, 0x0F, 0x0C, 0x00, 0x00, 0x0E, 0x0F, 0x0F, 0x0C, - 0x00, 0x0E, 0x1C, 0x0E, 0x0F, 0x0D, 0x0F, 0x0F, 0x0C, 0x00, 0x00, 0x0E, 0x1C, 0x0F, 0x0F, 0x0C, - 0x00, 0x0D, 0x1C, 0x0D, 0x0F, 0x0D, 0x0F, 0x0C, 0x00, 0x00, 0x00, 0x0E, 0x1C, 0x0F, 0x0C, - 0x01, 0x0B, 0x0E, 0x0F, 0x0E, 0x0F, 0x0C, 0x00, 0x00, 0x0E, 0x07, 0x0F, 0x0C, - 0x02, 0x09, 0x0E, 0x0D, 0x0F, 0x0C, 0x00, 0x07, 0x0E, 0x0F, 0x0C, - 0x03, 0x06, 0x0E, 0x0F, 0x0E, 0x07, 0x01, 0x07, - 0x07, 0x01, 0x07 -}; - -const byte CURSCLIMB[] = { - // hotspot x and y, uint16 LE - 0x03, 0x00, 0x0E, 0x00, - // byte 1: number of skipped pixels - // byte 2: number of plotted pixels - // then, pixels - 0x06, 0x04, 0x01, 0x01, 0x01, 0x01, - 0x06, 0x04, 0x0F, 0x0E, 0x01, 0x01, - 0x06, 0x04, 0x0F, 0x0E, 0x0D, 0x01, - 0x07, 0x02, 0x0F, 0x0D, - 0x00, 0x0C, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x13, 0x12, 0x12, 0x12, 0x12, 0x11, 0x11, - 0x00, 0x0D, 0x0D, 0x0E, 0x00, 0x00, 0x13, 0x14, 0x13, 0x12, 0x12, 0x12, 0x11, 0x11, 0x0E, - 0x01, 0x0C, 0x0D, 0x0D, 0x0D, 0x0E, 0x11, 0x13, 0x13, 0x12, 0x11, 0x11, 0x0E, 0x0D, - 0x02, 0x0C, 0x0E, 0x0E, 0x00, 0x00, 0x00, 0x13, 0x12, 0x11, 0x00, 0x00, 0x0E, 0x0D, - 0x03, 0x0B, 0x04, 0x04, 0x04, 0x22, 0x21, 0x21, 0x20, 0x00, 0x00, 0x00, 0x0D, - 0x02, 0x0D, 0x22, 0x04, 0x20, 0x22, 0x04, 0x21, 0x04, 0x20, 0x00, 0x00, 0x00, 0x0E, 0x0E, - 0x03, 0x07, 0x22, 0x21, 0x20, 0x20, 0x22, 0x04, 0x20, - 0x04, 0x06, 0x01, 0x01, 0x00, 0x04, 0x22, 0x20, - 0x02, 0x09, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x04, 0x20, - 0x03, 0x09, 0x07, 0x01, 0x01, 0x00, 0x00, 0x00, 0x22, 0x04, 0x20, - 0x02, 0x0B, 0x07, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x20, - 0x03, 0x0A, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01 -}; - -const byte CURSTALK[] = { - // hotspot x and y, uint16 LE - 0x02, 0x00, 0x0B, 0x00, - // byte 1: number of skipped pixels - // byte 2: number of plotted pixels - // then, pixels - 0x03, 0x08, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x01, 0x0C, 0x06, 0x06, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x06, 0x06, - 0x00, 0x0E, 0x06, 0x06, 0x06, 0x06, 0x07, 0x06, 0x07, 0x07, 0x06, 0x07, 0x07, 0x06, 0x07, 0x06, - 0x00, 0x0F, 0x06, 0x08, 0x08, 0x08, 0x06, 0x08, 0x06, 0x06, 0x08, 0x06, 0x06, 0x08, 0x06, 0x08, 0x06, - 0x00, 0x0F, 0x06, 0x06, 0x08, 0x06, 0x08, 0x06, 0x08, 0x06, 0x08, 0x06, 0x06, 0x08, 0x08, 0x06, 0x06, - 0x00, 0x0F, 0x06, 0x06, 0x08, 0x06, 0x08, 0x08, 0x08, 0x06, 0x08, 0x06, 0x06, 0x08, 0x06, 0x08, 0x06, - 0x01, 0x0E, 0x06, 0x08, 0x06, 0x08, 0x06, 0x08, 0x06, 0x08, 0x08, 0x06, 0x08, 0x06, 0x08, 0x06, - 0x02, 0x0C, 0x06, 0x06, 0x06, 0x07, 0x06, 0x07, 0x06, 0x06, 0x07, 0x06, 0x07, 0x06, - 0x04, 0x09, 0x06, 0x06, 0x06, 0x07, 0x07, 0x07, 0x07, 0x06, 0x06, - 0x07, 0x04, 0x06, 0x07, 0x07, 0x06, - 0x02, 0x08, 0x07, 0x00, 0x00, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x01, 0x06, 0x07, 0x01, 0x07, 0x06, 0x06, 0x06, - 0x02, 0x01, 0x07, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00 -}; -const byte CURSHELP[] = { - // hotspot x and y, uint16 LE - 0x02, 0x00, 0x0B, 0x00, - // byte 1: number of skipped pixels - // byte 2: number of plotted pixels - // then, pixels - 0x04, 0x06, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, - 0x02, 0x0A, 0x24, 0x24, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x20, 0x20, - 0x01, 0x0C, 0x24, 0x22, 0x22, 0x22, 0x20, 0x20, 0x20, 0x22, 0x22, 0x22, 0x22, 0x20, - 0x00, 0x0E, 0x24, 0x22, 0x22, 0x22, 0x20, 0x00, 0x00, 0x00, 0x24, 0x22, 0x22, 0x22, 0x22, 0x20, - 0x00, 0x0E, 0x24, 0x22, 0x22, 0x22, 0x22, 0x20, 0x00, 0x00, 0x00, 0x24, 0x22, 0x22, 0x22, 0x20, - 0x00, 0x0E, 0x24, 0x22, 0x22, 0x22, 0x22, 0x20, 0x00, 0x00, 0x00, 0x24, 0x22, 0x22, 0x22, 0x20, - 0x01, 0x0D, 0x24, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x24, 0x22, 0x22, 0x22, 0x22, 0x20, - 0x07, 0x06, 0x24, 0x22, 0x22, 0x22, 0x22, 0x20, - 0x05, 0x07, 0x24, 0x22, 0x22, 0x22, 0x22, 0x20, 0x20, - 0x04, 0x05, 0x24, 0x22, 0x22, 0x22, 0x20, - 0x02, 0x07, 0x07, 0x00, 0x24, 0x20, 0x20, 0x20, 0x20, - 0x01, 0x03, 0x07, 0x01, 0x07, - 0x02, 0x07, 0x07, 0x00, 0x00, 0x24, 0x24, 0x24, 0x24, - 0x04, 0x06, 0x24, 0x22, 0x22, 0x22, 0x22, 0x20, - 0x04, 0x06, 0x24, 0x22, 0x22, 0x22, 0x22, 0x20, - 0x05, 0x04, 0x20, 0x20, 0x20, 0x20 -}; -const byte *const CURSORS[10] = { - MOUSE0, MOUSE1, MOUSE2, MOUSE3, CURSEYE, CURSHAND, CURSGET, CURSCLIMB, CURSTALK, CURSHELP -}; - -const int _travelPos[][2] = { - { -1, 0 }, - { 228, 117 }, - { 28, 98 }, - { 161, 140 }, - { 130, 139 }, - { 884, 95 }, - { 0, 0 }, - { 0, 0 }, - { 0, 0 }, - { 41, 185 }, - { 60, 138 }, - { 0, 0 }, - { 0, 0 }, - { 0, 0 }, - { 0, 0 }, - { 0, 0 }, - { 170, 155 }, - { 0, 0 }, - { 0, 0 }, - { 0, 0 }, - { 108, 95 }, - { 0, 0 }, - { 0, 0 }, - { 0, 0 }, - { 100, 115 }, - { 480, 90 }, - { 154, 63 }, - { 0, 0 }, - { 145, 85 }, - { 0, 0 }, - { 110, 107 }, - { 0, 0 }, - { 105, 154 }, - { 0, 0 }, - { 0, 0 }, - { 0, 0 }, - { 0, 0 }, - { 20, 160 }, - { 130, 314 }, - { 0, 0 }, - { 50, 125 }, - { 0, 0 }, - { 0, 0 }, - { 123, 123 }, - { -1, 7 }, - { 266, 168 }, - { 0, 0 }, - { 0, 0 }, - { 0, 0 }, - { -1, 18 }, - { -1, 19 }, - { 0, 0 }, - { 0, 0 }, - { 0, 0 }, - { 0, 0 }, - { 0, 0 }, - { 203, 160 }, - { 0, 0 }, - { 283, 163 }, - { 0, 0 }, - { 0, 0 }, - { 0, 0 }, - { 180, 165 }, - { 0, 0 }, - { 0, 0 }, - { 0, 0 } -}; - const int OVEROFFR[] = { 2, 2, 1, 2, 2, 1, 0, 0, 0 }; const int OVEROFFL[] = { 2, 2, 1, 2, 2, 1, 0, 0, 0 }; const int OVEROFFU[] = { 1, 1, 1, 1, 1, 1, 0, 0, 0 }; @@ -408,1528 +108,6 @@ const int OVEROFFULY[] = { 1, 0, 0, 2, 1, 0, 0, 0, 0 }; const int OVEROFFDLX[] = { 1, 2, 1, 1, 2, 1, 0, 0, 0 }; const int OVEROFFDLY[] = { 0, 1, 0, 0, 1, 1, 0, 0, 0 }; -const byte CREDITS[] = { - 0x2, 0xFF, 0xFF, 0x61, 0x0, 0x3, 0x0, 0x30, 0x22, 0x30, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0xFF, 0xFF, 0xFF, 0x0, 0x0, 0xFF, 0xFF, - 0x0, 0x0, 0xFF, 0x0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF -}; - -const byte ALLISTER[] = { - 0x0, 0xFF, 0xFF, 0x61, 0x0, 0x0, 0x0, 0x36, 0x0F, 0x5E, 0x4, 0x0, 0x0, - 0x0, 0x4, 0x4, 0x0, 0x3, 0x0, 0xFF, 0x4, 0x0, 0x2, 0x0, 0x4, 0x0, 0x1, 0x0, 0x8C, - 0x0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x62, 0x0, 0x0, 0x0, - 0x1, 0x0, 0x62, 0x0, 0x0B, 0x0, 0x1, 0x0, 0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0, 0xFF, 0x0E, 0x0, 0x5, 0x0, 0x0E, 0x0, 0x4, 0x0, - 0xFF, 0x0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF -}; - -const byte FLYSOUTH[] = { - 0x1, 0xFF, 0xFF, 0x61, 0x0, 0x10, 0x0, 0x28, 0x0C, 0x5E, 0x0F, 0x0, - 0x0, 0x0, 0x0F, 0x0F, 0x0, 0x2, 0x0, 0xFF, 0x0F, 0x0, 0x1, 0x0, 0xFF, 0xFF, - 0x1, 0x0, 0xFF, 0x0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x62, - 0x0, 0x44, 0x0, 0x1, 0x0, 0xFF, 0xFF -}; - -const byte CUZCO[] = { - 0x2, 0x10, 0x0, 0x61, 0x0, 0x10, 0x0, 0x40, 0x20, 0x30, 0x10, 0x0, 0x0, - 0x0, 0x10, 0x10, 0x0, 0x3, 0x0, 0xFF, 0x10, 0x0, 0x2, 0x0, 0x10, 0x0, 0x1, - 0x0, 0x6E, 0x0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x62, - 0x0, 0x0, 0x0, 0x2, 0x0, 0x62, 0x0, 0x44, 0x0, 0x1, 0x0, 0xFF, 0xFF -}; - -const byte INAIR[] = { - 0x1, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x28, 0x19, 0x2B, - 0x11, 0x0, 0x0, 0x0, 0x11, 0x11, 0x0, 0x3, 0x0, 0xFF, 0x11, 0x0, 0x2, 0x0, - 0x11, 0x0, 0x1, 0x0, 0xFF, 0x0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF -}; - -const byte GREENMONKEY[] = { - 0x1, 0xFF, 0xFF, 0x61, 0x0, 0x11, 0x0, 0x2D, 0x14, 0x3C, 0x12, 0x0, - 0x0, 0x0, 0x12, 0x12, 0x0, 0x3, 0x0, 0xFF, 0x12, 0x0, 0x2, 0x0, 0x12, 0x0, - 0x1, 0x0, 0xFF, 0x0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF -}; - -const byte INPLANE[] = { - 0x2, 0x13, 0x0, 0x61, 0x0, 0x26, 0x0, 0x2D, 0x28, 0x28, 0x13, 0x0, 0x0, - 0x0, 0x13, 0x13, 0x0, 0x3, 0x0, 0xFF, 0x13, 0x0, 0x2, 0x0, 0x13, 0x0, 0x1, - 0x0, 0xFF, 0x0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x62, 0x0, 0x0, 0x0, - 0x2, 0x0, 0x62, 0x0, 0x29, 0x0, 0x2, 0x0, 0x62, 0x0, 0x1F, 0x0, 0x1, 0x0, - 0x62, 0x0, 0x38, 0x0, 0x2, 0x0, 0x62, 0x0, 0x33, 0x0, 0x1, 0x0, 0xFF, 0xFF -}; - -const byte PILFALL[] = { - 0x1, 0xFF, 0xFF, 0x61, 0x0, 0x16, 0x0, 0x28, 0x0C, 0x5E, 0x14, 0x0, - 0x0, 0x0, 0x14, 0x14, 0x0, 0x2, 0x0, 0xFF, 0x14, 0x0, 0x1, 0x0, 0xFF, 0xFF, - 0x1, 0x0, 0xFF, 0x0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x62, - 0x0, 0x3A, 0x0, 0x1, 0x0, 0xFF, 0xFF -}; - -const byte COCKPIT[] = { - 0x1, 0xFF, 0xFF, 0x61, 0x0, 0x12, 0x0, 0x3C, 0x2A, 0x29, 0x15, 0x0, - 0x0, 0x0, 0x15, 0x15, 0x0, 0x3, 0x0, 0xFF, 0x15, 0x0, 0x2, 0x0, 0x15, 0x0, - 0x1, 0x0, 0xFF, 0x0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x62, - 0x0, 0x23, 0x0, 0x1, 0x0, 0xFF, 0xFF -}; - -const byte CRASH[] = { - 0x1, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 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0x0, 0x4, 0x0, 0x1, 0x0, 0x62, 0x0, 0x2A, 0x0, 0x1, 0x0, 0xFF, 0xFF -}; - -const byte WATERFALL[] = { - 0x1, 0x36, 0x0, 0xFF, 0xFF, 0xFF, 0xFF, 0x28, 0x1E, 0x6E, 0x36, - 0x0, 0x0, 0x0, 0x36, 0x36, 0x0, 0x3, 0x0, 0xFF, 0x36, 0x0, 0x2, 0x0, 0x36, - 0x0, 0x1, 0x0, 0xFF, 0x0, 0xFF, 0xFF, 0xFF, 0xFF, 0x36, 0x0, 0x4, - 0x0, 0xFF, 0xFF, 0x62, 0x0, 0x1F, 0x0, 0x1, 0x0, 0xFF, 0xFF -}; - -const byte INWATER[] = { - 0x2, 0xFF, 0xFF, 0x61, 0x0, 0x36, 0x0, 0x40, 0x3F, 0x2A, 0x37, 0x0, - 0x0, 0x0, 0x37, 0x37, 0x0, 0x3, 0x0, 0xFF, 0x37, 0x0, 0x2, 0x0, 0x37, 0x0, - 0x1, 0x0, 0xFF, 0x0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x62, - 0x0, 0x0, 0x0, 0x1, 0x0, 0x62, 0x0, 0x38, 0x0, 0x1, 0x0, 0xFF, 0xFF -}; - -const byte CAVE[] = { - 0x2, 0x39, 0x0, 0x61, 0x0, 0x37, 0x0, 0x32, 0x14, 0x73, 0x39, 0x0, 0x0, - 0x0, 0x39, 0x39, 0x0, 0x3, 0x0, 0xFF, 0x39, 0x0, 0x2, 0x0, 0x39, 0x0, 0x1, - 0x0, 0x0B4, 0x0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x62, - 0x0, 0x0, 0x0, 0x1, 0x0, 0x62, 0x0, 0x1F, 0x0, 0x1, 0x0, 0x62, 0x0, 0x4B, 0x0, - 0x2, 0x0, 0x62, 0x0, 0x4C, 0x0, 0x2, 0x0, 0xFF, 0xFF -}; - -const byte PIT[] = { - 0x2, 0xFF, 0xFF, 0x61, 0x0, 0x38, 0x0, 0x41, 0x3F, 0x19, 0x3D, 0x0, - 0x0, 0x0, 0x3D, 0x3D, 0x0, 0x3, 0x0, 0x3E, 0x3D, 0x0, 0x4, 0x0, 0xFF, 0x3D, - 0x0, 0x2, 0x0, 0x3D, 0x0, 0x1, 0x0, 0x0BE, 0x0, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0x62, 0x0, 0x0, 0x0, 0x2, 0x0, 0x62, 0x0, 0x27, 0x0, 0x1, 0x0, - 0x62, 0x0, 0x4D, 0x0, 0x2, 0x0, 0xFF, 0xFF, 0x0 -}; - -const byte *const ROOM_TABLE[] = { - CREDITS, nullptr, nullptr, nullptr, ALLISTER, HALL, JASONLAB, nullptr, - ALLENLAB, OUTVAULT, VAULT, LIBRARY, JASAPT, RANSACKED, MEAN1, FLYSOUTH, - CUZCO, INAIR, GREENMONKEY, INPLANE, PILFALL, COCKPIT, CRASH, SINKING, - JNGLWLK, TOWN, HOTEL, CANTINA, nullptr, MASSACRE, TRADE, BRIDGE, DOCK, - DRIVER, nullptr, nullptr, SHORE, BOAT, CABIN, CAPTIVE, nullptr, - nullptr, VILLAGE, nullptr, TREE, CANOE, INTREE, FALLS, nullptr, - nullptr, nullptr, nullptr, nullptr, nullptr, WATERFALL, INWATER, nullptr, - CAVE, nullptr, nullptr, nullptr, PIT, nullptr, nullptr -}; - -const char *const ROOM_DESCR[] = { - "Credits", nullptr, nullptr, nullptr, "Outside of Allister Center", - "Hall", "Jason's Lab", nullptr, "Allen's Lab", "Outside of the Vault", - "Inside the Vault", "Reader", "Jason's Apartment", "Jason's ransacked apartment", "Cutscene 1", - "TBD FLYSOUTH", "Cuzco Airport", "TBD INAIR", "Green Monkey Club", "In Plane", - "TBD PILFALL", "TBD COCKPIT", "TBD CRASH", "TBD SINKING", "Cutscene Jungle Walk", - "TBD TOWN", "TBD HOTEL", "TBD CANTINA", nullptr, "TBD MASSACRE", - "TBD TRADE", "TBD BRIDGE", "TBD DOCK", "TBD DRIVER", nullptr, - nullptr, "TBD SHORE", "TBD BOAT", "TBD CABIN", "TBD CAPTIVE", - nullptr, nullptr, "TBD VILLAGE", nullptr, "TBD TREE", - "TBD CANOE", "TBD INTREE", "TBD FALLS", nullptr, nullptr, - nullptr, nullptr, nullptr, nullptr, "TBD WATERFALL", - "TBD INWATER", nullptr, "Cave Bridge", nullptr, nullptr, - nullptr, "Pit with Ants", nullptr, nullptr -}; - -const byte ROOM_TABLE1_DEMO[] = { - 0x02, 0x61, 0x00, 0x03, 0x00, 0x30, 0x22, 0x30, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xFF, 0xFF, 0xFF, - 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF -}; - -const byte ROOM_TABLE5_DEMO[] = { - 0x00, 0x61, 0x00, 0x0E, 0x00, 0x36, 0x0F, 0x5E, 0x04, 0x00, - 0x00, 0x00, 0x04, 0x04, 0x00, 0x03, 0x00, 0xFF, 0x04, 0x00, - 0x02, 0x00, 0x04, 0x00, 0x01, 0x00, 0x8C, 0x00, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0x62, 0x00, 0x00, 0x00, 0x01, 0x00, - 0x62, 0x00, 0x0B, 0x00, 0x01, 0x00, 0x62, 0x00, 0x0C, 0x00, - 0x01, 0x00, 0x62, 0x00, 0x0D, 0x00, 0x01, 0x00, 0xFF, 0xFF -}; - -const byte ROOM_TABLE6_DEMO[] = { - 0x00, 0x61, 0x00, 0x0E, 0x00, 0x40, 0x3E, 0x1A, 0x05, 0x00, - 0x00, 0x00, 0x05, 0x05, 0x00, 0x03, 0x00, 0xFF, 0x05, 0x00, - 0x02, 0x00, 0x05, 0x00, 0x01, 0x00, 0xFF, 0x30, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0x62, 0x00, 0x00, 0x00, 0x02, 0x00, - 0x62, 0x00, 0x12, 0x00, 0x03, 0x00, 0x62, 0x00, 0x13, 0x00, - 0x01, 0x00, 0x62, 0x00, 0x14, 0x00, 0x02, 0x00, 0x62, 0x00, - 0x04, 0x00, 0x01, 0x00, 0xFF, 0xFF -}; - -const byte ROOM_TABLE7_DEMO[] = { - 0x01, 0x61, 0x00, 0x0D, 0x00, 0x40, 0x20, 0xC4, 0x06, 0x00, - 0x00, 0x00, 0x06, 0x06, 0x00, 0x03, 0x00, 0xFF, 0x06, 0x00, - 0x02, 0x00, 0x06, 0x00, 0x01, 0x00, 0xFF, 0x00, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0x62, 0x00, 0x00, 0x00, 0x01, 0x00, - 0x62, 0x00, 0x01, 0x00, 0x01, 0x00, 0x62, 0x00, 0x02, 0x00, - 0x01, 0x00, 0x62, 0x00, 0x03, 0x00, 0x02, 0x00, 0x62, 0x00, - 0x26, 0x00, 0x01, 0x00, 0xFF, 0xFF -}; - -const byte ROOM_TABLE9_DEMO[] = { - 0x01, 0x61, 0x00, 0x0D, 0x00, 0x40, 0x20, 0xC4, 0x08, 0x00, - 0x00, 0x00, 0x08, 0x08, 0x00, 0x03, 0x00, 0xFF, 0x08, 0x00, - 0x02, 0x00, 0x08, 0x00, 0x01, 0x00, 0xFF, 0x00, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0x62, 0x00, 0x00, 0x00, 0x01, 0x00, - 0x62, 0x00, 0x07, 0x00, 0x01, 0x00, 0x62, 0x00, 0x08, 0x00, - 0x02, 0x00, 0x62, 0x00, 0x09, 0x00, 0x01, 0x00, 0x62, 0x00, - 0x0A, 0x00, 0x01, 0x00, 0xFF, 0xFF -}; - -const byte ROOM_TABLE10_DEMO[] = { - 0x00, 0x61, 0x00, 0x0E, 0x00, 0x30, 0x18, 0x9B, 0x09, 0x00, - 0x00, 0x00, 0x09, 0x09, 0x00, 0x03, 0x00, 0xFF, 0x09, 0x00, - 0x02, 0x00, 0x09, 0x00, 0x01, 0x00, 0xB4, 0x10, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0x62, 0x00, 0x00, 0x00, 0x03, 0x00, - 0x62, 0x00, 0x04, 0x00, 0x01, 0x00, 0x62, 0x00, 0x05, 0x00, - 0x02, 0x00, 0x62, 0x00, 0x06, 0x00, 0x02, 0x00, 0xFF, 0xFF -}; - -const byte ROOM_TABLE11_DEMO[] = { - 0x01, 0x61, 0x00, 0x0E, 0x00, 0x40, 0x30, 0x14, 0x0A, 0x00, - 0x00, 0x00, 0x0A, 0x0A, 0x00, 0x03, 0x00, 0xFF, 0x0A, 0x00, - 0x02, 0x00, 0x0A, 0x00, 0x01, 0x00, 0xFF, 0x00, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0x62, 0x00, 0x00, 0x00, 0x01, 0x00, - 0x62, 0x00, 0x15, 0x00, 0x01, 0x00, 0x62, 0x00, 0x16, 0x00, - 0x01, 0x00, 0xFF, 0xFF -}; - -const byte ROOM_TABLE12_DEMO[] = { - 0x01, 0x61, 0x00, 0x0E, 0x00, 0x40, 0x3A, 0x22, 0x0B, 0x00, - 0x00, 0x00, 0x0B, 0x0B, 0x00, 0x03, 0x00, 0xFF, 0x0B, 0x00, - 0x02, 0x00, 0x0B, 0x00, 0x01, 0x00, 0xFF, 0x00, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0x62, 0x00, 0x00, 0x00, 0x01, 0x00, - 0x62, 0x00, 0x01, 0x00, 0x01, 0x00, 0xFF, 0xFF -}; - -const byte ROOM_TABLE13_DEMO[] = { - 0x01, 0x61, 0x00, 0x08, 0x00, 0x40, 0x30, 0x14, 0x0C, 0x00, - 0x00, 0x00, 0x0C, 0x0C, 0x00, 0x03, 0x00, 0xFF, 0x0C, 0x00, - 0x02, 0x00, 0x0C, 0x00, 0x01, 0x00, 0xFF, 0x00, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0x62, 0x00, 0x18, 0x00, 0x02, 0x00, - 0x62, 0x00, 0x17, 0x00, 0x01, 0x00, 0x62, 0x00, 0x11, 0x00, - 0x01, 0x00, 0xFF, 0xFF -}; - -const byte ROOM_TABLE14_DEMO[] = { - 0x01, 0x61, 0x00, 0x0D, 0x00, 0x40, 0x36, 0x2C, 0x0D, 0x00, - 0x00, 0x00, 0x0D, 0x0D, 0x00, 0x03, 0x00, 0xFF, 0x0D, 0x00, - 0x02, 0x00, 0x0D, 0x00, 0x01, 0x00, 0xFF, 0x00, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF -}; - -const byte ROOM_TABLE15_DEMO[] = { - 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x40, 0x3E, 0x33, 0xFF, 0xFF, - 0x00, 0x00, 0xFF, 0x0E, 0x00, 0x05, 0x00, 0x0E, 0x00, 0x04, - 0x00, 0xFF, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF -}; - -const byte ROOM_TABLE16_DEMO[] = { - 0x01, 0x61, 0x00, 0x10, 0x00, 0x28, 0x0C, 0x5E, 0x0F, 0x00, - 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x02, 0x00, 0xFF, 0x0F, 0x00, - 0x01, 0x00, 0xFF, 0xFF, 0x01, 0x00, 0xFF, 0x00, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF -}; - -const byte ROOM_TABLE17_DEMO[] = { - 0x02, 0x61, 0x00, 0x10, 0x00, 0x40, 0x20, 0x30, 0x10, 0x00, - 0x00, 0x00, 0x10, 0x10, 0x00, 0x03, 0x00, 0xFF, 0x10, 0x00, - 0x02, 0x00, 0x10, 0x00, 0x01, 0x00, 0x6E, 0x00, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0x62, 0x00, 0x00, 0x00, 0x01, 0x00, - 0xFF, 0xFF -}; - -const byte ROOM_TABLE18_DEMO[] = { - 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x28, 0x19, 0x2B, 0x11, 0x00, - 0x00, 0x00, 0x11, 0x11, 0x00, 0x03, 0x00, 0xFF, 0x11, 0x00, - 0x02, 0x00, 0x11, 0x00, 0x01, 0x00, 0xFF, 0x00, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF -}; - -const byte ROOM_TABLE19_DEMO[] = { - 0x01, 0x61, 0x00, 0x11, 0x00, 0x2D, 0x14, 0x3C, 0x12, 0x00, - 0x00, 0x00, 0x12, 0x12, 0x00, 0x03, 0x00, 0xFF, 0x12, 0x00, - 0x02, 0x00, 0x12, 0x00, 0x01, 0x00, 0xFF, 0x00, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF -}; - -const byte ROOM_TABLE20_DEMO[] = { - 0x02, 0x61, 0x00, 0x12, 0x00, 0x2D, 0x28, 0x28, 0x13, 0x00, - 0x00, 0x00, 0x13, 0x13, 0x00, 0x03, 0x00, 0xFF, 0x13, 0x00, - 0x02, 0x00, 0x13, 0x00, 0x01, 0x00, 0xFF, 0x00, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0x62, 0x00, 0x00, 0x00, 0x02, 0x00, - 0x62, 0x00, 0x29, 0x00, 0x01, 0x00, 0x62, 0x00, 0x24, 0x00, - 0x01, 0x00, 0xFF, 0xFF -}; - -const byte ROOM_TABLE21_DEMO[] = { - 0x01, 0x61, 0x00, 0x16, 0x00, 0x28, 0x0C, 0x5E, 0x14, 0x00, - 0x00, 0x00, 0x14, 0x14, 0x00, 0x02, 0x00, 0xFF, 0x14, 0x00, - 0x01, 0x00, 0xFF, 0xFF, 0x01, 0x00, 0xFF, 0x00, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF -}; - -const byte ROOM_TABLE22_DEMO[] = { - 0x01, 0x61, 0x00, 0x12, 0x00, 0x3C, 0x2A, 0x29, 0x15, 0x00, - 0x00, 0x00, 0x15, 0x15, 0x00, 0x03, 0x00, 0xFF, 0x15, 0x00, - 0x02, 0x00, 0x15, 0x00, 0x01, 0x00, 0xFF, 0x00, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0x62, 0x00, 0x23, 0x00, 0x01, 0x00, - 0xFF, 0xFF -}; - -const byte ROOM_TABLE23_DEMO[] = { - 0x01, 0x61, 0x00, 0x13, 0x00, 0x40, 0x2D, 0x64, 0x16, 0x00, - 0x00, 0x00, 0xFF, 0x16, 0x00, 0x01, 0x00, 0xFF, 0xFF, 0x00, - 0x00, 0xFF, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x16, 0x00, 0x02, - 0x00, 0xFF, 0xFF, 0x62, 0x00, 0x2A, 0x00, 0x01, 0x00, 0xFF, - 0xFF -}; - -const byte ROOM_TABLE24_DEMO[] = { - 0x02, 0x61, 0x00, 0x14, 0x00, 0x40, 0x3C, 0x19, 0x17, 0x00, - 0x00, 0x00, 0x17, 0x17, 0x00, 0x03, 0x00, 0xFF, 0x17, 0x00, - 0x02, 0x00, 0x17, 0x00, 0x01, 0x00, 0xFF, 0x00, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0x62, 0x00, 0x00, 0x00, 0x01, 0x00, - 0xFF, 0xFF -}; - -const byte ROOM_TABLE25_DEMO[] = { - 0x02, 0xFF, 0xFF, 0xFF, 0xFF, 0x40, 0x3F, 0x5A, 0x18, 0x00, - 0x00, 0x00, 0x18, 0x18, 0x00, 0x02, 0x00, 0xFF, 0x18, 0x00, - 0x01, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xDC, 0xA0, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0x62, 0x00, 0x00, 0x00, 0x01, 0x00, - 0xFF, 0xFF -}; - -const byte ROOM_TABLE26_DEMO[] = { - 0x02, 0x61, 0x00, 0x17, 0x00, 0x3E, 0x32, 0x80, 0x19, 0x00, - 0x00, 0x00, 0x19, 0x19, 0x00, 0x03, 0x00, 0xFF, 0x19, 0x00, - 0x02, 0x00, 0x19, 0x00, 0x01, 0x00, 0x64, 0x00, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0x62, 0x00, 0x00, 0x00, 0x01, 0x00, - 0xFF, 0xFF -}; - -const byte ROOM_TABLE27_DEMO[] = { - 0x01, 0x61, 0x00, 0x19, 0x00, 0x34, 0x28, 0x28, 0x1A, 0x00, - 0x00, 0x00, 0x1A, 0x1A, 0x00, 0x03, 0x00, 0xFF, 0x1A, 0x00, - 0x02, 0x00, 0x1A, 0x00, 0x01, 0x00, 0xFF, 0x00, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0x62, 0x00, 0x28, 0x00, 0x01, 0x00, - 0x62, 0x00, 0x2B, 0x00, 0x01, 0x00, 0xFF, 0xFF -}; - -const byte ROOM_TABLE28_DEMO[] = { - 0x02, 0x61, 0x00, 0x18, 0x00, 0x40, 0x3A, 0x6C, 0x1B, 0x00, - 0x00, 0x00, 0x1B, 0x1B, 0x00, 0x03, 0x00, 0xFF, 0x1B, 0x00, - 0x02, 0x00, 0x1B, 0x00, 0x01, 0x00, 0xC8, 0x00, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0x62, 0x00, 0x00, 0x00, 0x01, 0x00, - 0xFF, 0xFF -}; - -const byte ROOM_TABLE30_DEMO[] = { - 0x02, 0xFF, 0xFF, 0xFF, 0xFF, 0x20, 0x18, 0x73, 0x1D, 0x00, - 0x00, 0x00, 0x1D, 0x1D, 0x00, 0x03, 0x00, 0xFF, 0x1D, 0x00, - 0x02, 0x00, 0x1D, 0x00, 0x01, 0x00, 0x80, 0x00, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF -}; - -const byte ROOM_TABLE31_DEMO[] = { - 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x1C, 0x27, 0x1E, 0x00, - 0x00, 0x00, 0x1E, 0x1E, 0x00, 0x03, 0x00, 0xFF, 0x1E, 0x00, - 0x02, 0x00, 0x1E, 0x00, 0x01, 0x00, 0xFF, 0x00, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF -}; - -const byte ROOM_TABLE32_DEMO[] = { - 0x02, 0x61, 0x00, 0x1B, 0x00, 0x40, 0x10, 0x78, 0x1F, 0x00, - 0x00, 0x00, 0x1F, 0x1F, 0x00, 0x03, 0x00, 0xFF, 0x1F, 0x00, - 0x02, 0x00, 0x1F, 0x00, 0x01, 0x00, 0xFE, 0x00, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0x62, 0x00, 0x00, 0x00, 0x02, 0x00, - 0x62, 0x00, 0x1F, 0x00, 0x01, 0x00, 0xFF, 0xFF -}; - -const byte ROOM_TABLE33_DEMO[] = { - 0x01, 0x61, 0x00, 0x1E, 0x00, 0x40, 0x3B, 0x4B, 0x20, 0x00, - 0x00, 0x00, 0x20, 0x20, 0x00, 0x03, 0x00, 0xFF, 0x20, 0x00, - 0x02, 0x00, 0x20, 0x00, 0x01, 0x00, 0xFF, 0x00, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF -}; - -const byte ROOM_TABLE34_DEMO[] = { - 0x01, 0x61, 0x00, 0x04, 0x00, 0x30, 0x10, 0x51, 0x21, 0x00, - 0x00, 0x00, 0x21, 0x21, 0x00, 0x02, 0x00, 0xFF, 0x21, 0x00, - 0x01, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0x62, 0x00, 0x2E, 0x00, 0x01, 0x00, - 0x62, 0x00, 0x2F, 0x00, 0x01, 0x00, 0xFF, 0xFF -}; - -const byte ROOM_TABLE37_DEMO[] = { - 0x02, 0x61, 0x00, 0x04, 0x00, 0x3E, 0x3A, 0x32, 0x24, 0x00, - 0x00, 0x00, 0x24, 0x24, 0x00, 0x03, 0x00, 0xFF, 0x24, 0x00, - 0x02, 0x00, 0x24, 0x00, 0x01, 0x00, 0xB4, 0x00, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0x62, 0x00, 0x2D, 0x00, 0x02, 0x00, - 0x62, 0x00, 0x1F, 0x00, 0x01, 0x00, 0x62, 0x00, 0x2E, 0x00, - 0x01, 0x00, 0x62, 0x00, 0x2F, 0x00, 0x01, 0x00, 0xFF, 0xFF -}; - -const byte ROOM_TABLE38_DEMO[] = { - 0x03, 0x61, 0x00, 0x08, 0x00, 0x3F, 0x3F, 0xFF, 0x25, 0x00, - 0x00, 0x00, 0x25, 0x25, 0x00, 0x03, 0x00, 0xFF, 0x25, 0x00, - 0x02, 0x00, 0x25, 0x00, 0x01, 0x00, 0xFF, 0x40, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0x62, 0x00, 0x00, 0x00, 0x02, 0x00, - 0x62, 0x00, 0x21, 0x00, 0x01, 0x00, 0x62, 0x00, 0x25, 0x00, - 0x01, 0x00, 0x62, 0x00, 0x1F, 0x00, 0x01, 0x00, 0x62, 0x00, - 0x30, 0x00, 0x01, 0x00, 0x62, 0x00, 0x32, 0x00, 0x01, 0x00, - 0xFF, 0xFF -}; - -const byte ROOM_TABLE39_DEMO[] = { - 0x01, 0x61, 0x00, 0x08, 0x00, 0x40, 0x32, 0x50, 0x26, 0x00, - 0x00, 0x00, 0x26, 0x26, 0x00, 0x03, 0x00, 0xFF, 0x26, 0x00, - 0x02, 0x00, 0x26, 0x00, 0x01, 0x00, 0xFF, 0x00, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0x62, 0x00, 0x00, 0x00, 0x01, 0x00, - 0x62, 0x00, 0x22, 0x00, 0x02, 0x00, 0x62, 0x00, 0x31, 0x00, - 0x01, 0x00, 0xFF, 0xFF -}; - -const byte ROOM_TABLE40_DEMO[] = { - 0x02, 0x61, 0x00, 0x09, 0x00, 0x40, 0x3F, 0x37, 0x27, 0x00, - 0x00, 0x00, 0x27, 0x27, 0x00, 0x03, 0x00, 0xFF, 0x27, 0x00, - 0x02, 0x00, 0x27, 0x00, 0x01, 0x00, 0xFF, 0x00, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0x62, 0x00, 0x00, 0x00, 0x04, 0x00, - 0x62, 0x00, 0x1B, 0x00, 0x03, 0x00, 0x62, 0x00, 0x1C, 0x00, - 0x01, 0x00, 0x62, 0x00, 0x1F, 0x00, 0x02, 0x00, 0x62, 0x00, - 0x23, 0x00, 0x01, 0x00, 0x62, 0x00, 0x32, 0x00, 0x01, 0x00, - 0xFF, 0xFF -}; - -const byte ROOM_TABLE43_DEMO[] = { - 0x02, 0xFF, 0xFF, 0xFF, 0xFF, 0x1E, 0x1B, 0x6E, 0x2A, 0x00, - 0x00, 0x00, 0x2A, 0x2A, 0x00, 0x03, 0x00, 0xFF, 0x2A, 0x00, - 0x02, 0x00, 0x2A, 0x00, 0x01, 0x00, 0xA5, 0x00, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0x62, 0x00, 0x00, 0x00, 0x01, 0x00, - 0xFF, 0xFF -}; - -const byte ROOM_TABLE45_DEMO[] = { - 0x02, 0xFF, 0xFF, 0xFF, 0xFF, 0x1E, 0x1D, 0xBE, 0x2C, 0x00, - 0x00, 0x00, 0x2C, 0x2C, 0x00, 0x03, 0x00, 0xFF, 0x2C, 0x00, - 0x02, 0x00, 0x2C, 0x00, 0x01, 0x00, 0x50, 0x00, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0x62, 0x00, 0x00, 0x00, 0x01, 0x00, - 0xFF, 0xFF -}; - -const byte ROOM_TABLE46_DEMO[] = { - 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x1E, 0x1D, 0x78, 0x2D, 0x00, - 0x00, 0x00, 0x2D, 0x2D, 0x00, 0x03, 0x00, 0xFF, 0x2D, 0x00, - 0x02, 0x00, 0x2D, 0x00, 0x01, 0x00, 0xFF, 0x00, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF -}; - -const byte ROOM_TABLE47_DEMO[] = { - 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x28, 0x1E, 0x32, 0x2E, 0x00, - 0x00, 0x00, 0x2E, 0x2E, 0x00, 0x03, 0x00, 0xFF, 0x2E, 0x00, - 0x02, 0x00, 0x2E, 0x00, 0x01, 0x00, 0xF0, 0x00, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF -}; - -const byte ROOM_TABLE48_DEMO[] = { - 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x28, 0x1E, 0x32, 0x2F, 0x00, - 0x00, 0x00, 0x2F, 0x2F, 0x00, 0x03, 0x00, 0xFF, 0x2F, 0x00, - 0x02, 0x00, 0x2F, 0x00, 0x01, 0x00, 0xFF, 0x00, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF -}; - -const byte ROOM_TABLE51_DEMO[] = { - 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x28, 0x1E, 0x32, 0xFF, 0xFF, - 0x00, 0x00, 0xFF, 0x32, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x04, - 0x00, 0xFF, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x32, - 0x00, 0x01, 0x00, 0x01, 0x00, 0xFF, 0xFF -}; - -const byte ROOM_TABLE55_DEMO[] = { - 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x28, 0x1E, 0x6E, 0x36, 0x00, - 0x00, 0x00, 0x36, 0x36, 0x00, 0x03, 0x00, 0xFF, 0x36, 0x00, - 0x02, 0x00, 0x36, 0x00, 0x01, 0x00, 0xFF, 0x00, 0xFF, 0xFF, - 0xFF, 0xFF, 0x36, 0x00, 0x04, 0x00, 0xFF, 0xFF, 0xFF, 0xFF -}; - -const byte ROOM_TABLE58_DEMO[] = { - 0x02, 0xFF, 0xFF, 0xFF, 0xFF, 0x32, 0x14, 0x73, 0x39, 0x00, - 0x00, 0x00, 0x39, 0x39, 0x00, 0x03, 0x00, 0xFF, 0x39, 0x00, - 0x02, 0x00, 0x39, 0x00, 0x01, 0x00, 0xB4, 0x00, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0x62, 0x00, 0x00, 0x00, 0x01, 0x00, - 0xFF, 0xFF -}; - -const byte ROOM_TABLE62_DEMO[] = { - 0x02, 0xFF, 0xFF, 0xFF, 0xFF, 0x41, 0x3F, 0x19, 0x3D, 0x00, - 0x00, 0x00, 0x3D, 0x3D, 0x00, 0x03, 0x00, 0x3E, 0x3D, 0x00, - 0x04, 0x00, 0xFF, 0x3D, 0x00, 0x02, 0x00, 0x3D, 0x00, 0x01, - 0x00, 0xBE, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x62, - 0x00, 0x00, 0x00, 0x01, 0x00, 0xFF, 0xFF, 0x00 -}; - -const byte *const ROOM_TABLE_DEMO[] = { - ROOM_TABLE1_DEMO, nullptr, nullptr, nullptr, ROOM_TABLE5_DEMO, - ROOM_TABLE6_DEMO, ROOM_TABLE7_DEMO, nullptr, ROOM_TABLE9_DEMO, ROOM_TABLE10_DEMO, - ROOM_TABLE11_DEMO, ROOM_TABLE12_DEMO, ROOM_TABLE13_DEMO, ROOM_TABLE14_DEMO, ROOM_TABLE15_DEMO, - ROOM_TABLE16_DEMO, ROOM_TABLE17_DEMO, ROOM_TABLE18_DEMO, ROOM_TABLE19_DEMO, ROOM_TABLE20_DEMO, - ROOM_TABLE21_DEMO, ROOM_TABLE22_DEMO, ROOM_TABLE23_DEMO, ROOM_TABLE24_DEMO, ROOM_TABLE25_DEMO, - ROOM_TABLE26_DEMO, ROOM_TABLE27_DEMO, ROOM_TABLE28_DEMO, nullptr, ROOM_TABLE30_DEMO, - ROOM_TABLE31_DEMO, ROOM_TABLE32_DEMO, ROOM_TABLE33_DEMO, ROOM_TABLE34_DEMO, nullptr, - nullptr, ROOM_TABLE37_DEMO, ROOM_TABLE38_DEMO, ROOM_TABLE39_DEMO, ROOM_TABLE40_DEMO, - nullptr, nullptr, ROOM_TABLE43_DEMO, nullptr, ROOM_TABLE45_DEMO, - ROOM_TABLE46_DEMO, ROOM_TABLE47_DEMO, ROOM_TABLE48_DEMO, nullptr, nullptr, - ROOM_TABLE51_DEMO, nullptr, nullptr, nullptr, ROOM_TABLE55_DEMO, - nullptr, nullptr, ROOM_TABLE58_DEMO, nullptr, nullptr, - nullptr, ROOM_TABLE62_DEMO, nullptr, nullptr -}; - -const int ROOM_NUMB = 63; - -const byte ELAINE[] = { - 0x0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0x0, 0x0, 0x0, 0x0, 0x41, 0x41, 0x0, 0x1, 0x0, 0xFF, 0x41, 0x0, 0x2, - 0x0, 0x41, 0x0, 0x0, 0x0, 0x41, 0x0, 0x3, 0x0, 0x41, 0x0, 0x25, 0x0, 0x41, - 0x0, 0x4, 0x0, 0x41, 0x0, 0x26, 0x0, 0x41, 0x0, 0x5, 0x0, 0x41, 0x0, 0x27, - 0x0, 0x41, 0x0, 0x6, 0x0, 0x41, 0x0, 0x28, 0x0, 0x41, 0x0, 0x7, 0x0, 0x41, - 0x0, 0x29, 0x0, 0x41, 0x0, 0x8, 0x0, 0x41, 0x0, 0x2A, 0x0, 0x41, 0x0, 0x9, - 0x0, 0x41, 0x0, 0x2B, 0x0, 0x41, 0x0, 0x0A, 0x0, 0x41, 0x0, 0x2C, 0x0, 0x41, - 0x0, 0x0B, 0x0, 0x41, 0x0, 0x2D, 0x0, 0x41, 0x0, 0x0C, 0x0, 0x41, 0x0, 0x2E, - 0x0, 0x41, 0x0, 0x0D, 0x0, 0x41, 0x0, 0x2F, 0x0, 0x41, 0x0, 0x0E, 0x0, 0x41, - 0x0, 0x30, 0x0, 0x41, 0x0, 0x0F, 0x0, 0x41, 0x0, 0x31, 0x0, 0x41, 0x0, 0x10, - 0x0, 0x41, 0x0, 0x32, 0x0, 0x41, 0x0, 0x11, 0x0, 0x41, 0x0, 0x33, 0x0, 0x41, - 0x0, 0x12, 0x0, 0x41, 0x0, 0x34, 0x0, 0x41, 0x0, 0x13, 0x0, 0x41, 0x0, 0x35, - 0x0, 0x41, 0x0, 0x14, 0x0, 0x41, 0x0, 0x36, 0x0, 0x41, 0x0, 0x15, 0x0, 0x41, - 0x0, 0x37, 0x0, 0x41, 0x0, 0x16, 0x0, 0x41, 0x0, 0x38, 0x0, 0x41, 0x0, 0x17, - 0x0, 0x41, 0x0, 0x39, 0x0, 0x41, 0x0, 0x18, 0x0, 0x41, 0x0, 0x3A, 0x0, 0x41, - 0x0, 0x19, 0x0, 0x41, 0x0, 0x3B, 0x0, 0x41, 0x0, 0x1A, 0x0, 0x41, 0x0, 0x3C, - 0x0, 0x41, 0x0, 0x1B, 0x0, 0x41, 0x0, 0x3D, 0x0, 0x41, 0x0, 0x1C, 0x0, 0x41, - 0x0, 0x3E, 0x0, 0x41, 0x0, 0x1D, 0x0, 0x41, 0x0, 0x3F, 0x0, 0x41, 0x0, 0x1E, - 0x0, 0x41, 0x0, 0x40, 0x0, 0x41, 0x0, 0x1F, 0x0, 0x41, 0x0, 0x41, 0x0, 0x41, - 0x0, 0x20, 0x0, 0x41, 0x0, 0x42, 0x0, 0x41, 0x0, 0x21, 0x0, 0x41, 0x0, 0x43, - 0x0, 0x41, 0x0, 0x22, 0x0, 0x41, 0x0, 0x44, 0x0, 0x41, 0x0, 0x23, 0x0, 0x41, - 0x0, 0x45, 0x0, 0x41, 0x0, 0x24, 0x0, 0x41, 0x0, 0x46, 0x0, 0xFF, 0xFF -}; - -const byte LIB[] = { - 0x1, 0xFF, 0xFF, 0x42, 0x0, 0x2, 0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x0, 0x35, - 0x0, 0x25, 0x0, 0x35, 0x0, 0x12, 0x0, 0x35, 0x0, 0x26, 0x0, 0x35, 0x0, 0x13, - 0x0, 0x35, 0x0, 0x27, 0x0, 0x35, 0x0, 0x14, 0x0, 0x35, 0x0, 0x28, 0x0, 0x35, - 0x0, 0x15, 0x0, 0x35, 0x0, 0x29, 0x0, 0x35, 0x0, 0x16, 0x0, 0x35, 0x0, 0x2A, - 0x0, 0x35, 0x0, 0x17, 0x0, 0x35, 0x0, 0x2B, 0x0, 0xFF, 0xFF -}; - -const byte COLONEL[] = { - 0x2, 0xFF, 0xFF, 0x0E, 0x0, 0x1, 0x0, 0xFF, 0xFF, 0xFF, 0xFF, - 0x0, 0x0, 0x0, 0x0, 0x0E, 0x0E, 0x0, 0x5, 0x0, 0xFF, 0xFF, 0xFF, 0x2, - 0x0, 0x4F, 0x0, 0x0, 0x0, 0x4F, 0x0, 0x1, 0x0, 0x4F, 0x0, 0x2, 0x0, 0x0E, 0x0, - 0x8, 0x0, 0x4F, 0x0, 0x3, 0x0, 0xFF, 0xFF -}; - -const byte SOLDIERS[] = { - 0x2, 0xFF, 0xFF, 0x50, 0x0, 0x1, 0x0, 0xFF, 0xFF, 0xFF, 0xFF, - 0x0, 0x0, 0x0, 0x0, 0xFF, 0xFF, 0xFF, 0x0, 0x0, 0x50, 0x0, 0x0, 0x0, 0x50, - 0x0, 0x2, 0x0, 0x50, 0x0, 0x0, 0x0, 0xFF, 0xFF -}; - -const byte JWATER[] = { - 0x2, 0xFF, 0xFF, 0x51, 0x0, 0x1, 0x0, 0xFF, 0xFF, 0xFF, 0xFF, - 0x0, 0x0, 0x0, 0x0, 0xFF, 0xFF, 0xFF, 0x0, 0x0, 0x51, 0x0, 0x0, 0x0, 0x51, - 0x0, 0x2, 0x0, 0x51, 0x0, 0x3, 0x0, 0xFF, 0xFF -}; - -const byte SHOOT[] = { - 0x2, 0xFF, 0xFF, 0x52, 0x0, 0x2, 0x0, 0xFF, 0xFF, 0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0xFF, 0xFF, 0x0, 0x0, 0x30, 0x0, 0x0, 0x0, 0x30, - 0x0, 0x0, 0x0, 0x30, 0x0, 0x1, 0x0, 0x30, 0x0, 0x0, 0x0, 0x30, 0x0, 0x6, 0x0, 0x30, - 0x0, 0x0, 0x0, 0x30, 0x0, 0x7, 0x0, 0x30, 0x0, 0x0, 0x0, 0x30, 0x0, 0x8, 0x0, 0x30, - 0x0, 0x0, 0x0, 0x30, 0x0, 0x9, 0x0, 0x30, 0x0, 0x0, 0x0, 0x30, 0x0, 0x0A, 0x0, - 0x30, 0x0, 0x0, 0x0, 0x30, 0x0, 0x0B, 0x0, 0x30, 0x0, 0x0, 0x0, 0x30, 0x0, - 0x0C, 0x0, 0x30, 0x0, 0x0, 0x0, 0x30, 0x0, 0x0D, 0x0, 0x30, 0x0, 0x0, 0x0, - 0x30, 0x0, 0x0E, 0x0, 0x30, 0x0, 0x0, 0x0, 0x30, 0x0, 0x0F, 0x0, 0x30, 0x0, - 0x0, 0x0, 0x30, 0x0, 0x10, 0x0, 0x30, 0x0, 0x0, 0x0, 0x30, 0x0, 0x2, 0x0, 0x30, - 0x0, 0x0, 0x0, 0x30, 0x0, 0x3, 0x0, 0x30, 0x0, 0x0, 0x0, 0x30, 0x0, 0x4, 0x0, 0x30, - 0x0, 0x0, 0x0, 0x30, 0x0, 0x5, 0x0, 0xFF, 0xFF -}; - -const byte OVERBOARD_DEMO[] = { - 0x02, 0xFF, 0xFF, 0x22, 0x00, 0x01, 0x00, 0xFF, 0xFF, 0xFF, - 0xFF, 0x00, 0x00, 0x00, 0x00, 0x22, 0x22, 0x00, 0x02, 0x00, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x22, 0x00, 0x00, 0x00, 0x22, - 0x00, 0x03, 0x00, 0x22, 0x00, 0x06, 0x00, 0x22, 0x00, 0x04, - 0x00, 0x22, 0x00, 0x07, 0x00, 0x22, 0x00, 0x05, 0x00, 0x62, - 0x00, 0x1D, 0x00, 0x60, 0x00, 0x00, 0x00, 0x22, 0x00, 0x06, - 0x00, 0x60, 0x00, 0x01, 0x00, 0x22, 0x00, 0x07, 0x00, 0xFF, - 0xFF -}; - -const byte SHORE1[] = { - 0x02, 0xFF, 0xFF, 0x55, 0x00, 0x01, 0x00, 0xFF, 0xFF, 0xFF, - 0xFF, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x03, 0x00, - 0x55, 0x00, 0x00, 0x00, 0x55, 0x00, 0x02, 0x00, 0x62, 0x00, - 0x2E, 0x00, 0x55, 0x00, 0x02, 0x00, 0x62, 0x00, 0x2F, 0x00, - 0xFF, 0xFF -}; - -const byte CHAP8[] = { - 0x02, 0xFF, 0xFF, 0x60, 0x00, 0x03, 0x00, 0xFF, 0xFF, 0xFF, - 0xFF, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0x60, 0x00, 0x02, 0x00, 0xFF, 0xFF -}; - -const byte *const CHARTBL[] = { - ELAINE, LIB, FLASHBACK, ALLENDIE, OVERBOARD, PILOT2, TIKAGENT, - BARTENDER, PILOT1, COOK, BEXPLODE, THORNICK, MAYA, CAPTAIN, - ALLEN, ARCH, GUARD1, MCANOE, CAMPFIRE, COLONEL, SOLDIERS, - JWATER, SHOOT, ADIE, DYNAMITE, MAYASHOT, OFFKEV, VALLEY, - MEANWHILE1, MAYATREE, LOCO, KISS, ROBOT, ANTKILL, LOCOHOT, - CRACK, LETTER -}; - -const byte *const CHARTBL_DEMO[] = { - ELAINE, LIB, FLASHBACK, ALLENDIE, OVERBOARD_DEMO, PILOT2, TIKAGENT, - BARTENDER, PILOT1, COOK, BEXPLODE, THORNICK, MAYA, CAPTAIN, - ALLEN, ARCH, GUARD1, MCANOE, CAMPFIRE, COLONEL, SOLDIERS, - JWATER, SHOOT, ADIE, DYNAMITE, SHORE1, CHAP8 -}; - -const char *const INVENTORY_NAMES[] = { - "RAT", "ALCOHOL", "SAFE COMBINATION", "BEAKER", "MICROFILM", - "VAULT KEY", "BOLT CUTTERS", "BLOWGUN", "LOVE POTION", "MONEY", - "DARTS", "TAPE", "JUNGLE POTION", "MOVIE", "CABINET KEY", - "DISPLAY CASE KEY", "FLITCH'S CAR KEYS", "COAT HANGER", - "CROWBAR", "COMPASS", "MAP", "LETTER OPENER", "LETTER", - "DECODER", "DIPPED DART", "LOADED BLOWGUN", "CARD", "JERRYCAN", - "CIGARETTES", "BIKE PUMP", "PARACHUTE", "PESO", "PEPPERS", - "MACHETE", "POISON ROOT", "AMMUNITION", "PADDLE", "FISHING NET", - "RAT TRAP", "CHEESE", "LOADED TRAP", "KNIFE", "CHOPPED PEPPERS", - "LIGHTER", "LADDER", "SMALL POLE", "JEEP KEY", "CHAIN", "ARROW", - "FILLED JERRY CAN", "EXPLOSIVES", "GEIGER COUNTER", "VINE", - "GOLD NUGGET", "HOLLOW REED", "AMAZON QUEEN KEYS", "FISHING POLE", - "HARPOON", "RAG", "BOTTLE OF RUM", "RAG IN BOTTLE", "MOLOTOV COCKTAIL", - "JUNGLE PLANT", "LADLE", "WORM", "FISH", "FIREWORKS", "BAITED POLE", - "FILLED LADLE", "EMERALD", "SMALL KEY", "SCROLL", "LIT EXPLOSIVES", - "LIGHTER", "BROKEN SPEAR", "SHOE LACES", "TORCH", "LACES AND SPEAR", - "KNIFE SPEAR", "GARBAGE CAN", "RAFT", "INFLATED RAFT", - "JASON'S CAR KEYS", "PESO BILLS", "PLANK" -}; - -const int FONT2_INDEX[] = { - 62, 2, 6, - 0x0000, 0x0019, 0x0021, 0x002e, 0x0041, 0x005a, 0x0073, 0x008c, 0x0093, 0x009b, - 0x00a3, 0x00bc, 0x00d5, 0x00dd, 0x00ea, 0x00f1, 0x00fe, 0x010b, 0x0118, 0x0125, - 0x0132, 0x013f, 0x014c, 0x0159, 0x0166, 0x0173, 0x0180, 0x0187, 0x018e, 0x01a7, - 0x01b4, 0x01cd, 0x01dc, 0x01f5, 0x0208, 0x0215, 0x0222, 0x022f, 0x023c, 0x0249, - 0x025c, 0x0269, 0x0276, 0x0285, 0x0292, 0x029f, 0x02b2, 0x02c5, 0x02d2, 0x02df, - 0x02ee, 0x02fb, 0x0308, 0x0315, 0x0322, 0x032f, 0x0342, 0x034f, 0x0362, 0x036f, - 0x0388, 0x03a1, -}; - -const byte FONT2_DATA[] = { - 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xf0, 0xf0, 0xf0, 0xf0, - 0x00, 0xf0, 0x00, 0x06, 0xf3, 0xc0, 0xc3, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x07, 0x1c, 0x00, - 0x67, 0x9e, 0xc0, 0x07, 0x1c, 0x00, 0x67, 0x9e, 0xc0, 0x07, - 0x1c, 0x00, 0x00, 0x00, 0x00, 0x09, 0x02, 0xc0, 0x00, 0x3f, - 0xfc, 0x00, 0xb2, 0xc0, 0x00, 0x3f, 0xfc, 0x00, 0x02, 0xcb, - 0x00, 0x3f, 0xfc, 0x00, 0x03, 0xc0, 0x00, 0x00, 0x00, 0x00, - 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x03, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x18, 0x60, - 0x70, 0x70, 0x60, 0x1c, 0x00, 0x04, 0x60, 0x18, 0x1c, 0x1c, - 0x1c, 0x70, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x30, - 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xc0, - 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xf0, 0xf0, - 0x00, 0x07, 0x00, 0xf0, 0x03, 0xc0, 0x0f, 0x00, 0x3c, 0x00, - 0xf0, 0x00, 0x00, 0x00, 0x07, 0x3f, 0xc0, 0x70, 0x70, 0x70, - 0x70, 0x70, 0x70, 0x3f, 0xc0, 0x00, 0x00, 0x07, 0x1f, 0x00, - 0x07, 0x00, 0x07, 0x00, 0x07, 0x00, 0xff, 0xf0, 0x00, 0x00, - 0x08, 0x2b, 0xf0, 0xb0, 0x2c, 0x00, 0xa0, 0x0a, 0x00, 0xff, - 0xfc, 0x00, 0x00, 0x07, 0xff, 0xc0, 0x00, 0x70, 0x03, 0xc0, - 0x00, 0x70, 0xff, 0xc0, 0x00, 0x00, 0x07, 0x0b, 0xc0, 0x2d, - 0xc0, 0xb1, 0xc0, 0xaa, 0xa0, 0x01, 0xc0, 0x00, 0x00, 0x07, - 0xff, 0xf0, 0x70, 0x00, 0x7f, 0xc0, 0x00, 0xb0, 0xbf, 0xc0, - 0x00, 0x00, 0x07, 0x2f, 0xc0, 0x70, 0x00, 0x7f, 0xc0, 0x70, - 0x70, 0x3f, 0xc0, 0x00, 0x00, 0x08, 0xff, 0xfc, 0x00, 0xb0, - 0x02, 0xc0, 0x02, 0xc0, 0x0b, 0x00, 0x00, 0x00, 0x08, 0x2f, - 0xf0, 0xb0, 0x1c, 0x2f, 0xf0, 0xb0, 0x1c, 0x2f, 0xf0, 0x00, - 0x00, 0x07, 0x3f, 0xc0, 0x70, 0x70, 0x3f, 0xf0, 0x00, 0x70, - 0x3f, 0xc0, 0x00, 0x00, 0x03, 0xf0, 0xf0, 0x00, 0xf0, 0xf0, - 0x00, 0x03, 0xf0, 0xf0, 0x00, 0xf0, 0x30, 0x00, 0x09, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0xff, 0xc0, 0x00, 0x00, - 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x06, 0xff, 0x00, 0x03, 0xc0, 0x0f, 0x00, 0x3c, 0x00, - 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x0a, 0x00, 0x40, 0x00, 0x01, 0xf0, 0x00, 0x07, 0x1c, - 0x00, 0x1f, 0xff, 0x00, 0x70, 0x01, 0xc0, 0x00, 0x00, 0x00, - 0x08, 0x7f, 0xf0, 0x70, 0x1c, 0x7f, 0xf0, 0x70, 0x1c, 0x6a, - 0xb0, 0x00, 0x00, 0x08, 0x2f, 0xfc, 0x70, 0x00, 0x70, 0x00, - 0x70, 0x00, 0x2a, 0xa8, 0x00, 0x00, 0x08, 0x7f, 0xf0, 0x70, - 0x1c, 0x70, 0x1c, 0x70, 0x1c, 0x6a, 0xb0, 0x00, 0x00, 0x07, - 0x7f, 0xf0, 0x70, 0x00, 0x7f, 0xc0, 0x70, 0x00, 0x6a, 0xa0, - 0x00, 0x00, 0x07, 0x7f, 0xf0, 0x70, 0x00, 0x7f, 0xc0, 0x70, - 0x00, 0x60, 0x00, 0x00, 0x00, 0x09, 0x3f, 0xfc, 0x00, 0x70, - 0x00, 0x00, 0x70, 0xff, 0x00, 0x70, 0x1c, 0x00, 0x2a, 0xbc, - 0x00, 0x00, 0x00, 0x00, 0x08, 0x70, 0x1c, 0x70, 0x1c, 0x7f, - 0xfc, 0x70, 0x1c, 0x70, 0x1c, 0x00, 0x00, 0x07, 0xff, 0xf0, - 0x07, 0x00, 0x07, 0x00, 0x07, 0x00, 0xaa, 0xa0, 0x00, 0x00, - 0x08, 0x0f, 0xfc, 0x00, 0x70, 0x00, 0x70, 0x00, 0x70, 0x70, - 0x70, 0x2a, 0x40, 0x00, 0x00, 0x08, 0x70, 0x2c, 0x72, 0xc0, - 0x7f, 0x00, 0x72, 0xc0, 0x70, 0x28, 0x00, 0x00, 0x07, 0x70, - 0x00, 0x70, 0x00, 0x70, 0x00, 0x70, 0x00, 0x6a, 0xa0, 0x00, - 0x00, 0x0a, 0x70, 0x02, 0xc0, 0x7c, 0x09, 0xc0, 0x77, 0x2d, - 0xc0, 0x71, 0xb1, 0xc0, 0x60, 0xc1, 0x80, 0x00, 0x00, 0x00, - 0x09, 0x70, 0x07, 0x00, 0x77, 0x07, 0x00, 0x71, 0xc7, 0x00, - 0x70, 0x77, 0x00, 0x60, 0x06, 0x00, 0x00, 0x00, 0x00, 0x08, - 0x2f, 0xf0, 0x70, 0x1c, 0x70, 0x1c, 0x70, 0x1c, 0x2a, 0xa0, - 0x00, 0x00, 0x08, 0x7f, 0xf0, 0x70, 0x1c, 0x7f, 0xf0, 0x70, - 0x00, 0x60, 0x00, 0x00, 0x00, 0x08, 0x2f, 0xf0, 0x70, 0x1c, - 0x70, 0x1c, 0x71, 0xdc, 0x2a, 0xa0, 0x00, 0x1c, 0x00, 0x00, - 0x08, 0x7f, 0xf0, 0x70, 0x1c, 0x7f, 0xc0, 0x70, 0x70, 0x60, - 0x18, 0x00, 0x00, 0x07, 0x2f, 0xf0, 0x70, 0x00, 0x2f, 0xc0, - 0x00, 0xb0, 0xbf, 0xc0, 0x00, 0x00, 0x07, 0xff, 0xf0, 0x0b, - 0x00, 0x07, 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x08, - 0x70, 0x1c, 0x70, 0x1c, 0x70, 0x1c, 0x70, 0xdc, 0x1f, 0x1c, - 0x00, 0x00, 0x08, 0xf0, 0x1c, 0xb0, 0x1c, 0x70, 0xb0, 0x72, - 0xc0, 0x7f, 0x00, 0x00, 0x00, 0x0b, 0xf0, 0x00, 0xb0, 0xb0, - 0x00, 0x70, 0x70, 0xc0, 0x70, 0x72, 0x72, 0xc0, 0x7c, 0x1f, - 0x00, 0x00, 0x00, 0x00, 0x08, 0xf0, 0x3c, 0x1c, 0xe0, 0x07, - 0xc0, 0x1c, 0x70, 0x70, 0x1c, 0x00, 0x00, 0x09, 0x70, 0x07, - 0x00, 0x1c, 0x1c, 0x00, 0x07, 0xf0, 0x00, 0x01, 0xc0, 0x00, - 0x01, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x08, 0xff, 0xfc, 0x00, - 0x70, 0x07, 0x00, 0x1c, 0x00, 0xaa, 0xac, 0x00, 0x00, 0x09, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, -}; - -const int FONT6x6_INDEX[] = { - 62, 1, 6, - 0x0000, 0x0007, 0x000e, 0x0015, 0x001c, 0x0023, 0x002a, 0x0031, 0x0038, 0x003f, - 0x0046, 0x004d, 0x0054, 0x005b, 0x0062, 0x0069, 0x0070, 0x0077, 0x007e, 0x0085, - 0x008c, 0x0093, 0x009a, 0x00a1, 0x00a8, 0x00af, 0x00b6, 0x00bd, 0x00c4, 0x00cb, - 0x00d2, 0x00d9, 0x00e0, 0x00e7, 0x00ee, 0x00f5, 0x00fc, 0x0103, 0x010a, 0x0111, - 0x0118, 0x011f, 0x0126, 0x012d, 0x0134, 0x013b, 0x0142, 0x0149, 0x0150, 0x0157, - 0x015e, 0x0165, 0x016c, 0x0173, 0x017a, 0x0181, 0x0188, 0x018f, 0x0196, 0x019d, - 0x01a4, 0x01ab, -}; - -const byte FONT6x6_DATA[] = { - 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x30, 0x30, - 0x30, 0x30, 0x00, 0x30, 0x06, 0xd8, 0xd8, 0x90, 0x00, 0x00, - 0x00, 0x06, 0x50, 0xf8, 0x50, 0xf8, 0x50, 0x00, 0x06, 0x78, - 0xa0, 0x70, 0x28, 0xf0, 0x20, 0x06, 0xc8, 0xd0, 0x20, 0x58, - 0x98, 0x00, 0x06, 0x60, 0xd0, 0x60, 0xe8, 0xd0, 0x68, 0x06, - 0x30, 0x30, 0x60, 0x00, 0x00, 0x00, 0x06, 0x30, 0x60, 0x60, - 0x60, 0x30, 0x00, 0x07, 0x30, 0x18, 0x18, 0x18, 0x30, 0x00, - 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x20, 0x20, - 0xf8, 0x20, 0x20, 0x00, 0x06, 0x00, 0x00, 0x00, 0x30, 0x30, - 0x60, 0x06, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x06, 0x00, - 0x00, 0x00, 0x60, 0x60, 0x00, 0x06, 0x18, 0x30, 0x60, 0xc0, - 0x80, 0x00, 0x06, 0x70, 0x98, 0xa8, 0xc8, 0x70, 0x00, 0x06, - 0x10, 0x30, 0x10, 0x10, 0x10, 0x00, 0x06, 0xf0, 0x08, 0x70, - 0x80, 0xf8, 0x00, 0x06, 0xf0, 0x08, 0x70, 0x08, 0xf0, 0x00, - 0x06, 0x30, 0x50, 0x90, 0xf8, 0x10, 0x00, 0x06, 0xf0, 0x80, - 0xf0, 0x08, 0xf0, 0x00, 0x06, 0x70, 0x80, 0xf0, 0x88, 0x70, - 0x00, 0x06, 0xf8, 0x08, 0x10, 0x20, 0x20, 0x00, 0x06, 0x70, - 0x88, 0x70, 0x88, 0x70, 0x00, 0x06, 0x70, 0x88, 0x78, 0x08, - 0x70, 0x00, 0x06, 0x60, 0x60, 0x00, 0x60, 0x60, 0x00, 0x06, - 0x60, 0x60, 0x00, 0x60, 0x20, 0x40, 0x06, 0x18, 0x30, 0x60, - 0x30, 0x18, 0x00, 0x06, 0x00, 0x78, 0x00, 0x78, 0x00, 0x00, - 0x06, 0x60, 0x30, 0x18, 0x30, 0x60, 0x00, 0x06, 0x70, 0x98, - 0x30, 0x30, 0x00, 0x30, 0x06, 0x70, 0x88, 0xb8, 0xb0, 0x80, - 0x78, 0x06, 0x70, 0x88, 0xf8, 0x88, 0x88, 0x00, 0x06, 0xf0, - 0x88, 0xf0, 0x88, 0xf0, 0x00, 0x06, 0x78, 0x80, 0x80, 0x80, - 0x78, 0x00, 0x06, 0xf0, 0x88, 0x88, 0x88, 0xf0, 0x00, 0x06, - 0xf8, 0x80, 0xf0, 0x80, 0xf8, 0x00, 0x06, 0xf8, 0x80, 0xf0, - 0x80, 0x80, 0x00, 0x06, 0x78, 0x80, 0x98, 0x88, 0x78, 0x00, - 0x06, 0x88, 0x88, 0xf8, 0x88, 0x88, 0x00, 0x06, 0x70, 0x20, - 0x20, 0x20, 0x70, 0x00, 0x06, 0x08, 0x08, 0x08, 0x88, 0x70, - 0x00, 0x06, 0x90, 0xa0, 0xc0, 0xa0, 0x90, 0x00, 0x06, 0x80, - 0x80, 0x80, 0x80, 0xf0, 0x00, 0x06, 0x88, 0xd8, 0xa8, 0x88, - 0x88, 0x00, 0x06, 0x88, 0xc8, 0xa8, 0x98, 0x88, 0x00, 0x06, - 0x70, 0x88, 0x88, 0x88, 0x70, 0x00, 0x06, 0xf0, 0x88, 0xf0, - 0x80, 0x80, 0x00, 0x06, 0x70, 0x88, 0x88, 0x88, 0x70, 0x18, - 0x06, 0xf0, 0x88, 0xf0, 0xa0, 0x98, 0x00, 0x06, 0x78, 0x80, - 0x70, 0x08, 0xf0, 0x00, 0x06, 0xf8, 0x20, 0x20, 0x20, 0x20, - 0x00, 0x06, 0x88, 0x88, 0x88, 0x88, 0x78, 0x00, 0x06, 0x88, - 0x88, 0x88, 0x50, 0x20, 0x00, 0x06, 0x88, 0x88, 0xa8, 0xd8, - 0x88, 0x00, 0x06, 0x88, 0x50, 0x20, 0x50, 0x88, 0x00, 0x06, - 0x88, 0x88, 0x50, 0x20, 0x20, 0x00, 0x06, 0xf8, 0x10, 0x20, - 0x40, 0xf8, 0x00, 0x06, 0x78, 0x60, 0x60, 0x60, 0x78, 0x00, - 0x06, 0xc0, 0x60, 0x30, 0x18, 0x08, 0x00, 0x06, 0x78, 0x18, - 0x18, 0x18, 0x78, 0x00, 0x00, 0x52, 0x41, 0x54, 0x00, 0x41, - 0x4c, 0x43, 0x4f, 0x48, 0x4f, 0x4c, 0x00, 0x53, 0x41, 0x46, - 0x45, 0x20, 0x43, 0x4f, 0x4d, 0x42, 0x49, 0x4e, 0x41, 0x54, - 0x49, 0x4f, 0x4e, 0x00, 0x42, 0x45, 0x41, 0x4b, 0x45, 0x52, - 0x00, 0x4d, 0x49, 0x43, 0x52, 0x4f, 0x46, 0x49, 0x4c, 0x4d, - 0x00, 0x56, 0x41, 0x55, 0x4c, 0x54, 0x20, 0x4b, 0x45, 0x59, - 0x00, 0x42, 0x4f, 0x4c, 0x54, 0x20, 0x43, 0x55, 0x54, 0x54, - 0x45, 0x52, 0x53, 0x00, 0x42, 0x4c, 0x4f, 0x57, 0x47, 0x55, - 0x4e, 0x00, 0x4c, 0x4f, 0x56, 0x45, 0x20, 0x50, 0x4f, 0x54, - 0x49, 0x4f, 0x4e, 0x00, 0x4d, 0x4f, 0x4e, 0x45, 0x59, 0x00, - 0x44, 0x41, 0x52, 0x54, 0x53, 0x00, 0x54, 0x41, 0x50, 0x45, - 0x00, 0x4a, 0x55, 0x4e, 0x47, 0x4c, 0x45, 0x20, 0x50, 0x4f, - 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x4d, 0x4f, 0x56, 0x49, -}; - -const char *const NO_HELP_MESSAGE = - "WE ARE UNABLE TO PROVIDE YOU WITH ANY MORE HINTS. YOUR IQ \ -HAS DECREASED SO FAR THAT WE CAN NO LONGER PUT THE HINTS IN TERMS \ -YOU CAN UNDERSTAND."; -const char *const NO_HINTS_MESSAGE = "THE HELP SYSTEM HAS BEEN TURNED OFF FOR THIS GAME."; -const char *const RIVER_HIT1 = "YOU HIT THE ROCKS AND THE CANOE BEGINS TO LEAK."; -const char *const RIVER_HIT2 = "YOU HIT THE ROCKS AND THE CANOE DEVELOPS SERIOUS LEAKS."; -const char *const BAR_MESSAGE = "YOU ARE TOO BUSY TRYING TO KEEP FROM SINKING TO DO THAT"; -const char *const HELPLVLTXT[3] = { - " LEVEL 1 ", - " LEVEL 2 ", - " LEVEL 3 " -}; - -const char *const IQLABELS[9] = { - "VEGETABLE", - "NEANDERTHAL", - "LOBOTOMIZED", - "DENSE", - "AVERAGE", - "INTELLIGENT", - "MURPHYITE", - "BRILLIANT", - "GENIUS" -}; - -const byte DEATH_SCREENS[58] = { - 0, 1, 0, 0, 0, 0, 0, 0, 2, 0, - 0, 2, 4, 2, 1, 0, 0, 0, 0, 0, - 0, 2, 7, 7, 4, 6, 7, 10, 4, 2, - 0, 0, 0, 0, 5, 5, 3, 3, 3, 5, - 8, 8, 11, 9, 8, 12, 0, 1, 9, 8, - 8, 0, 5, 8, 0, 12, 12, 11 -}; - -const byte DEATH_SCREENS_DEMO[34] = { - 1, 2, 1, 1, 1, 1, 1, 1, 4, 1, - 3, 4, 2, 4, 2, 1, 1, 1, 1, 1, - 1, 4, 2, 4, 2, 4, 2, 4, 4, 4, - 1, 1, 1, 1 -}; - -const char *const DEATH_TEXT[58] = { - "SAM SALVADOR SPOTS YOU AND LETS YOU HAVE IT.", - "WHILE TAKING A MOONLIGHT SWIM YOU DISCOVER THAT PIRANHA REALLY CAN STRIP FLESH TO THE BONE.", - "THE GUARD FILLS YOU FULL OF HOLES BEFORE TOSSING YOU TO THE PIRANHA.", - "YOU'RE ONLY ABLE TO SWIM HALFWAY ACROSS THE RIVER BEFORE RUNNING OUT OF AIR. " - "YOU MAKE SO MUCH NOISE GASPING FOR BREATH THAT SAM EASILY FINDS YOU AND LEAVES " - "YOU IN THE RIVER PERMANENTLY.", - "SAM SALVADOR NOTICES SOMEONE HAS BEEN PLAYING WITH THE CARGO. " - "HE TRACKS YOU DOWN AND LETS YOU HAVE IT.", - "THE GUARD COMES AROUND THE CORNER. HE DECIDES THAT THREE LEAD SLUGS WILL " - "TEACH YOU TO BE MORE POLITE.", - "THE CAPTAIN IS WAITING OUTSIDE THE DOOR.", - "THE CAPTAIN'S RANDOM SHOOTING FINALLY FINDS ITS TARGET.", - "THE CRATE OUTSIDE THE WINDOW EXPLODES, DESTROYING THE SHIP. " - "UNFORTUNATELY, YOU'RE STILL ABOARD.", - "THE DOOR WAS NOT BARRED AND THE CAPTAIN WALKS RIGHT IN AND PARTS YOUR HAIR.", - - "", - "YOU RUN OUT ON DECK, THEN REALIZE THAT MAYA IS STILL TIED UP. " - "AS YOU TURN TO GO BACK THE BOAT BLOWS UP.", - "AFTER YOU FAIL TO PROVE YOUR DIVINITY THE NATIVES EAT YOU FOR LUNCH.", - "THIS IS THE GENERIC DEATH SCENE", - "YOU ONLY MAKE IT HALFWAY ACROSS THE RIVER BEFORE THE PIRANHA STRIKE.", - "WITH NOTHING TO PROTECT HIM FROM THE HAIL OF BULLETS ALLEN IS QUICKLY GUNNED DOWN. " - "JASON AND MAYA SOON FOLLOW...", - "THE COMBINATION OF THE WIND AND GUNFIRE KNOCK THE CORRUGATED IRON OVER, " - "LEAVING YOU WITHOUT PROTECTION.", - "WITHOUT SUFFICIENT AMMUNITION, ALLEN IS UNABLE TO HOLD OFF THE ATTACKERS FOR LONG. " - "THIS RESULTS IN A SERIOUS CASE OF LEAD POISONING. ADDITIONAL AMMUNITION SHOULD " - "HAVE BEEN PURCHASED AT THE RIO BLANCO TRADING POST (CHAPTER 6).", - "ALLEN IS A MARVELOUS SHOT, BUT HIS AMMUNITION IS NOT UNLIMITED. " - "SOON IT IS ALL OVER.", - "THE PILOT FEELS YOU ARE TOO CLOSE AND PULLS THE TRIGGER.", - - "THE PILOT SHOOTS YOU IN THE HEART, THEN TOSSES YOUR LIFELESS BODY OUT THE DOOR.", - "THE PLANE CRASHES INTO THE JUNGLE CANOPY AT 200 MPH.", - "THE CANOE HITS THE ROCKS AND CAPSIZES, AND THE PIRANHA MAKE YOU THEIR LUNCH GUESTS.", - "YOU TAKE THE WRONG BRANCH AND ACCIDENTALLY DISCOVER THE FOURTH TALLEST WATERFALL " - "IN SOUTH AMERICA.", - "YOU TAKE THE WRONG BRANCH AND DISCOVER A VERY HUNGRY TRIBE OF CANNIBALS.", - "YOU TAKE THE WRONG BRANCH AND BECOME LOST IN THE WINDING WATERWAYS. " - "YOU WANDER UNTIL YOU STARVE TO DEATH.", - "YOU TAKE THE WRONG BRANCH AND BECOME TRAPPED IN THE RAPIDS. " - "EVENTUALLY YOU AND MAYA ARE CRUSHED BETWEEN THE ROCKS.", - "YOU WAIT AROUND FOR SOME TIME, BUT HANS STROHEIM NEVER SPEAKS TO YOU AGAIN. " - "FINALLY YOU RETURN HOME KNOWING YOU HAVE FAILED.", - "DECIDING THAT YOU THREATEN HIM AND HIS WORK, HANS STROHEIM HAS THE NATIVES " - "IN THE VILLAGE KILL YOU.", - "YOU DO NOT GET FAR ENOUGH AWAY BEFORE THE DYNAMITE EXPLODES AND YOU ARE BLOWN " - "INTO A THOUSAND PIECES.", - - "YOU ARE STANDING SO CLOSE TO THE ENTRANCE WHEN SANCEZ AND HIS MEN BREAK THROUGH " - "THE WALL THAT YOU ARE QUICKLY SPOTTED AND SHOT", - "THE AMAZON SENTINELS SPOT YOU AND FILL YOU FULL OF ARROWS.", - "SAM MAY BE UGLY, BUT HE'S NOT DEAF. HE HEARS ALL THE NOISE YOU ARE MAKING AND " - "CANCELS YOUR BOARDING PASS.", - "WITH THE BAR OFF THE DOOR THE CAPTAIN WALTZES IN AND BLOWS YOU AWAY", - "THE BEAR WANDERS OFF INTO THE WOODS AND DISTURBS THE TWO LOVEBIRDS. " - "WHEN THEY COME OUT THEY FIND YOU AND PUT YOU IN THE BIG HOUSE FOR TWENTY YEARS.", - "WHEN YOU DO NOT LEAVE THE SECURITY AREA QUICKLY ENOUGH YOU ARE ARRESTED AND CONVICTED " - "AS A COMMIE SPY. YOU EMBARK ON A NEW CAREER STAMPING OUT LICENSE PLATES.", - "THE HUNGRY BEAR SPOTS YOU AND DECIDES YOU WILL MAKE A NICE APPETIZER.", - "YOU DISTURB THE BEAR'S LUNCH AND HE EATS YOU FOR DESSERT.", - "AFTER FAILING TO FIND ANY LUNCH AT THE GARBAGE CAN THE BEAR EATS YOU INSTEAD.", - "THE SUSPICIOUS LIBRARIAN CALLS SECURITY AND YOU ARE SENT TO JAIL.", - - "YOU PLUMMET 10,000 FEET TO YOUR DEATH.", - "EL LOCO FLIES INTO AN INSANE RAGE AND BEATS YOU TO A BLOODY PULP.", - "THE WOMAN WALKS OUT THE DOOR AND NEVER RETURNS. YOU SPEND THE REST OF YOUR LIFE " - "IN A FUTILE ATTEMPT TO LOCATE ALLEN.", - "YOU SLIP OFF THE PLATFORM AND FALL TO YOUR DEATH.", - "YOU SLIP OFF THE PLATFORM AND FALL TO YOUR DEATH.", - "YOU COME TOO CLOSE TO THE POWERFUL JAWS OF THE ANT AND HE SNIPS YOU IN TWO BEFORE " - "DEVOURING YOU.", - "B.O.B. HAS A FLAW IN HIS PROGRAMMING THAT DIRECTS HIM TO SHOOT FIRST AND ASK QUESTIONS LATER.", - "THE PLANE SINKS AND THE PIRHANA ATTACK BEFORE YOU EVEN GET OUT THE DOOR.", - "MAYA FALLS OFF THE END OF THE BROKEN BRIDGE.", - "YOUR WEIGHT IS JUST ENOUGH TO CAUSE THE REMAINING SUPPORT CABLE TO SNAP AND YOU " - "FALL TO THE BOTTOM OF THE GORGE.", - - "EVEN WITH REPAIRS THE BRIDGE IS NOT STRONG ENOUGH TO HOLD TWO PEOPLE.", - "SANCHEZ AND HIS MEN FIND YOU AND HOLD FIRING SQUAD PRACTICE.", - "THE TWO GUARDS ARE DISTURBED IN THEIR LOVE NEST AND COME LOOKING FOR ANYONE ACTING SUSPICIOUS. " - "THEY FIND YOU AND SEND YOU UP THE RIVER.", - "THE PARACHUTE IS NOT LARGE ENOUGH TO SUPPORT YOU, AND YOU HIT THE TREES AT 140 M.P.H.", - "SANCHEZ AND HIS MEN FOLLOW YOU ACROSS THE BRIDGE AND CUT YOU DOWN IN A HAIL OF GUNFIRE", - "YOU TRIED TO STAB THE ANT BUT HIS SHELL IS TOO DIFFICULT TO PENETRATE. " - "YOU NOTICE A SLIGHT CUT IN THE SHELL UNDERNEATH BUT YOU CAN'T GET TO IT " - "AND HE SNIPS YOU INTO DELICIOUS MEATY CHUNKS.", - "AFTER THE ANT FINISHES SUCKING ALL OF THE SAP OUT OF THE VINE HE TURNS HIS ATTENTION BACK TO YOU " - "AND BITES YOUR HEAD OFF.", - "THE CANTINA OWNER NOTICES YOU ARE TRYING TO STEAL OBJECTS FROM THE TABLES. " - "TWENTY YEARS LATER YOU ARE RELEASED FROM A SOUTH AMERICAN PRISON." -}; - -const char *const DEATH_TEXT_DEMO[34] = { - "SAM SALVADOR SPOTS YOU AND LETS YOU HAVE IT.", - "WHILE TAKING A MOONLIGHT SWIM YOU DISCOVER THAT PIRANHA REALLY CAN STRIP FLESH TO THE BONE.", - "THE GUARD FILLS YOU FULL OF HOLES BEFORE TOSSING YOU TO THE PIRANHA.", - "YOU'RE ONLY ABLE TO SWIM HALFWAY ACROSS THE RIVER BEFORE RUNNING OUT OF AIR. YOU MAKE SO MUCH NOISE GASPING FOR BREATH THAT SAM EASILY FINDS YOU AND LEAVES YOU IN THE RIVER PERMANENTLY.", - "SAM SALVADOR NOTICES SOMEONE HAS BEEN PLAYING WITH THE CARGO. HE TRACKS YOU DOWN AND LETS YOU HAVE IT.", - "THE GUARD COMES AROUND THE CORNER. HE DECIDES THAT THREE LEAD SLUGS WILL TEACH YOU TO BE MORE POLITE.", - "THE CAPTAIN IS WAITING OUTSIDE THE DOOR.", - "THE CAPTAIN'S RANDOM SHOOTING FINALLY FINDS ITS TARGET.", - "THE CRATE OUTSIDE THE WINDOW EXPLODES, DESTROYING THE SHIP. UNFORTUNATELY, YOU'RE STILL ABOARD.", - "THE DOOR WAS NOT BARRED AND THE CAPTAIN WALKS RIGHT IN AND PARTS YOUR HAIR.", - "", - "YOU RUN OUT ON DECK, THEN REALIZE THAT MAYA IS STILL TIED UP. AS YOU TURN TO GO BACK THE BOAT BLOWS UP.", - "AFTER YOU FAIL TO PROVE YOUR DIVINITY THE NATIVES EAT YOU FOR LUNCH.", - "THIS IS THE GENERIC DEATH SCENE", - "YOU ONLY MAKE IT HALFWAY ACROSS THE RIVER BEFORE THE PIRANHA STRIKE.", - "WITH NOTHING TO PROTECT HIM FROM THE HAIL OF BULLETS ALLEN IS QUICKLY GUNNED DOWN. JASON AND MAYA SOON FOLLOW...", - "THE COMBINATION OF THE WIND AND GUNFIRE KNOCK THE CORRUGATED IRON OVER, LEAVING YOU WITHOUT PROTECTION.", - "WITHOUT SUFFICIENT AMMUNITION, ALLEN IS UNABLE TO HOLD OFF THE ATTACKERS FOR LONG. THIS RESULTS IN A SERIOUS CASE OF LEAD POISONING.", - "ALLEN IS A MARVELOUS SHOT, BUT HIS AMMUNITION IS NOT UNLIMITED. SOON IT IS ALL OVER.", - "THE PILOT FEELS YOU ARE TOO CLOSE AND PULLS THE TRIGGER.", - "THE PILOT SHOOTS YOU IN THE HEAD, THEN TOSSES YOUR LIFELESS", - "THE PLANE CRASHES INTO THE JUNGLE CANOPY AT 200 MPH.", - "THE CANOE HITS THE ROCKS AND CAPSIZES, AND THE PIRANHA MAKE YOU THEIR LUNCH GUESTS.", - "YOU ACCIDENTALLY DISCOVER THE FOURTH TALLEST WATERFALL IN SOUTH AMERICA.", - "YOU DISCOVER A VERY HUNGRY TRIBE OF CANNIBALS.", - "YOU BECOME LOST IN THE WINDING WATERWAYS AND WANDER UNTIL YOU STARVE TO DEATH.", - "YOU BECOME TRAPPED IN THE RAPIDS AND ARE CRUSHED BETWEEN THE ROCKS.", - "YOU WAIT AROUND FOR SOME TIME, BUT HANS STROHEIM NEVER SPEAKS TO YOU AGAIN. FINALLY YOU RETURN HOME KNOWING YOU HAVE FAILED.", - "DECIDING THAT YOU THREATEN HIM AND HIS WORK, HANS STROHEIM HAS THE NATIVES IN THE VILLAGE KILL YOU.", - "YOU DO NOT GET FAR ENOUGH AWAY BEFORE THE DYNAMITE EXPLODES AND YOU ARE BLOWN INTO A THOUSAND PIECES.", - "STANDING OUT IN THE OPEN YOU ARE EXPOSED TO THE HAIL OF BULLETS FROM SANCHEZ' MEN.", - "THE AMAZON SENTINELS SPOT YOU AND FILL YOU FULL OF ARROWS.", - "SAM MAY BE UGLY, BUT HE'S NOT DEAF. HE HEARS ALL THE NOISE YOU ARE MAKING AND CANCELS YOUR BOARDING PASS.", - "WITH THE BAR OFF THE DOOR THE CAPTAIN WALTZES IN AND BLOWS YOU AWAY" -}; - const int DEATH_CELLS[13][3] = { { 0, 94, 2 }, { 0, 94, 3 }, @@ -1984,94 +162,6 @@ const int CHAPTER_JUMP[14] = { 0, 12, 10, 15, 19, 25, 31, 36, 45, 46, 29, 55, 61, 0 }; -const int COMBO_TABLE[85][4] = { - { -1, -1, -1, -1 }, - { 12, 3, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { 24, 25, -1, -1 }, - { 10, 24, -1, -1 }, - { -1, -1, -1, -1 }, - { 8, 24, -1, -1 }, - { -1, -1, -1, -1 }, - { 1, 3, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { 7, 25, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { 80, 81, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { 41, 42, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { 39, 40, -1, -1 }, - { 38, 40, -1, -1 }, - { -1, -1, -1, -1 }, - { 32, 42, 77, 78 }, - { -1, -1, -1, -1 }, - { 60, 61, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { 73, 72, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { 64, 67, -1, -1 }, - { -1, -1, -1, -1 }, - { 59, 60, -1, -1 }, - { 58, 60, -1, -1 }, - { 43, 61, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { 56, 67, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { 50, 72, -1, -1 }, - { 75, 77, -1, -1 }, - { 74, 77, -1, -1 }, - { -1, -1, -1, -1 }, - { 41, 78, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { 29, 81, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 }, - { -1, -1, -1, -1 } -}; - const int ANTWALK[24] = { 0, 3, 0, 1, 5, 0, @@ -2349,8 +439,8 @@ RiverStruct RIVER2OBJECTS[54] = { RiverStruct *RIVER_OBJECTS[3][2] = { { RIVER0OBJECTS, RIVER0OBJECTS + 46 - 1}, - { RIVER1OBJECTS, RIVER0OBJECTS + 50 - 1 }, - { RIVER2OBJECTS, RIVER0OBJECTS + 54 - 1 } + { RIVER1OBJECTS, RIVER1OBJECTS + 50 - 1 }, + { RIVER2OBJECTS, RIVER2OBJECTS + 54 - 1 } }; const int HELP1COORDS[2][4] = { diff --git a/engines/access/amazon/amazon_resources.h b/engines/access/amazon/amazon_resources.h index 10dea02abc..20d90cc5b6 100644 --- a/engines/access/amazon/amazon_resources.h +++ b/engines/access/amazon/amazon_resources.h @@ -24,6 +24,8 @@ #define ACCESS_AMAZON_RESOURCES_H #include "common/scummsys.h" +#include "common/array.h" +#include "access/resources.h" namespace Access { @@ -42,9 +44,6 @@ struct RiverStruct { int _offsetY; }; -extern const char *const FILENAMES[]; -extern const char *const FILENAMES_DEMO[]; - extern const int SIDEOFFR[]; extern const int SIDEOFFL[]; extern const int SIDEOFFU[]; @@ -58,8 +57,6 @@ extern const int DIAGOFFULY[]; extern const int DIAGOFFDLX[]; extern const int DIAGOFFDLY[]; -extern const byte *const CURSORS[10]; - extern const int _travelPos[][2]; extern const int OVEROFFR[]; @@ -75,37 +72,6 @@ extern const int OVEROFFULY[]; extern const int OVEROFFDLX[]; extern const int OVEROFFDLY[]; -extern const byte *const ROOM_TABLE[]; -extern const char *const ROOM_DESCR[]; -extern const byte *const ROOM_TABLE_DEMO[]; -extern const int ROOM_NUMB; - -extern const byte *const CHARTBL[]; -extern const byte *const CHARTBL_DEMO[]; - -extern const char *const INVENTORY_NAMES[]; - -extern const int FONT2_INDEX[]; - -extern const byte FONT2_DATA[]; - -extern const int FONT6x6_INDEX[]; - -extern const byte FONT6x6_DATA[]; - -extern const char *const NO_HELP_MESSAGE; -extern const char *const NO_HINTS_MESSAGE; -extern const char *const RIVER_HIT1; -extern const char *const RIVER_HIT2; -extern const char *const BAR_MESSAGE; -extern const char *const HELPLVLTXT[3]; -extern const char *const IQLABELS[9]; -extern const byte DEATH_SCREENS[58]; -extern const byte DEATH_SCREENS_DEMO[34]; - -extern const char *const DEATH_TEXT[58]; -extern const char *const DEATH_TEXT_DEMO[34]; - extern const int DEATH_CELLS[13][3]; extern const int CHAPTER_CELLS[17][3]; @@ -155,6 +121,31 @@ extern const int CAST_END_OBJ1[4][4]; extern const int RMOUSE[10][2]; +class AmazonResources: public Resources { +protected: + /** + * Load data from the access.dat file + */ + virtual void load(Common::SeekableReadStream &s); +public: + Common::Array<int> FONT2_INDEX; + Common::Array<byte> FONT2_DATA; + Common::Array<int> FONT6x6_INDEX; + Common::Array<byte> FONT6x6_DATA; + Common::String NO_HELP_MESSAGE; + Common::String NO_HINTS_MESSAGE; + Common::String RIVER_HIT1; + Common::String RIVER_HIT2; + Common::String BAR_MESSAGE; + Common::String HELPLVLTXT[3]; + Common::String IQLABELS[9]; +public: + AmazonResources(AccessEngine *vm) : Resources(vm) {} + virtual ~AmazonResources() {} +}; + +#define AMRES (*((Amazon::AmazonResources *)_vm->_res)) + } // End of namespace Amazon } // End of namespace Access diff --git a/engines/access/amazon/amazon_room.cpp b/engines/access/amazon/amazon_room.cpp index 29742f66bd..c027f4e7c6 100644 --- a/engines/access/amazon/amazon_room.cpp +++ b/engines/access/amazon/amazon_room.cpp @@ -41,10 +41,7 @@ AmazonRoom::~AmazonRoom() { } void AmazonRoom::loadRoom(int roomNumber) { - if (_vm->isDemo()) - loadRoomData(ROOM_TABLE_DEMO[roomNumber]); - else - loadRoomData(ROOM_TABLE[roomNumber]); + loadRoomData(&AMRES.ROOMTBL[roomNumber]._data[0]); } void AmazonRoom::reloadRoom() { diff --git a/engines/access/amazon/amazon_scripts.cpp b/engines/access/amazon/amazon_scripts.cpp index d8f4663401..48438e9c95 100644 --- a/engines/access/amazon/amazon_scripts.cpp +++ b/engines/access/amazon/amazon_scripts.cpp @@ -401,10 +401,10 @@ void AmazonScripts::cmdHelp_v2() { _game->_useItem = 0; if (_game->_noHints) { - printString(NO_HELP_MESSAGE); + printString(AMRES.NO_HELP_MESSAGE); return; } else if (_game->_hintLevel == 0) { - printString(NO_HINTS_MESSAGE); + printString(AMRES.NO_HINTS_MESSAGE); return; } } @@ -473,12 +473,29 @@ void AmazonScripts::cmdCycleBack() { if (_vm->_startup == -1) _vm->_screen->cyclePaletteBackwards(); } + void AmazonScripts::cmdChapter() { + Resource *activeScript = nullptr; + if (_vm->isDemo()) { cmdSetHelp(); } else { int chapter = _data->readByte(); + + if (!_vm->isCD()) { + // For floppy version, the current script remains active even + // after the end of the chapter start, so we need to save it + activeScript = _resource; + _resource = nullptr; + _data = nullptr; + } + _game->startChapter(chapter); + + if (!_vm->isCD()) { + assert(!_resource); + setScript(activeScript, false); + } } } diff --git a/engines/access/animation.cpp b/engines/access/animation.cpp index 14d7c0d4cc..22de0fcb60 100644 --- a/engines/access/animation.cpp +++ b/engines/access/animation.cpp @@ -53,6 +53,18 @@ Animation::Animation(AccessEngine *vm, Common::SeekableReadStream *stream) : Man uint32 startOfs = stream->pos(); _type = stream->readByte(); + + // WORKAROUND: In Amazon floppy English, there's an animation associated with + // the librarian that isn't used, and has junk data. Luckily, it's animation + // type is also invalid, so if the _type isn't in range, exit immediately + if (_type < 0 || _type > 7) { + _scaling = -1; + _frameNumber = -1; + _initialTicks = _countdownTicks = 0; + _loopCount = _currentLoopCount = 0; + return; + } + _scaling = stream->readSByte(); stream->readByte(); // unk _frameNumber = stream->readByte(); diff --git a/engines/access/asurface.cpp b/engines/access/asurface.cpp index 526690807a..37f4c7082e 100644 --- a/engines/access/asurface.cpp +++ b/engines/access/asurface.cpp @@ -28,6 +28,8 @@ namespace Access { +const int TRANSPARENCY = 0; + SpriteResource::SpriteResource(AccessEngine *vm, Resource *res) { Common::Array<uint32> offsets; int count = res->_stream->readUint16LE(); @@ -64,7 +66,7 @@ SpriteFrame::SpriteFrame(AccessEngine *vm, Common::SeekableReadStream *stream, i // Empty surface byte *data = (byte *)getPixels(); - Common::fill(data, data + w * h, 0); + Common::fill(data, data + w * h, TRANSPARENCY); // Decode the data for (int y = 0; y < h; ++y) { @@ -105,10 +107,11 @@ void ImageEntryList::addToList(ImageEntry &ie) { /*------------------------------------------------------------------------*/ -int ASurface::_clipWidth; -int ASurface::_clipHeight; +int BaseSurface::_clipWidth; +int BaseSurface::_clipHeight; -ASurface::ASurface(): Graphics::Surface() { +BaseSurface::BaseSurface(): Graphics::Screen(0, 0) { + free(); // Free the 0x0 surface allocated by Graphics::Screen _leftSkip = _rightSkip = 0; _topSkip = _bottomSkip = 0; _lastBoundsX = _lastBoundsY = 0; @@ -119,67 +122,16 @@ ASurface::ASurface(): Graphics::Surface() { _maxChars = 0; } -ASurface::~ASurface() { - free(); +BaseSurface::~BaseSurface() { _savedBlock.free(); } -void ASurface::create(uint16 width, uint16 height) { - Graphics::Surface::create(width, height, Graphics::PixelFormat::createFormatCLUT8()); -} - -void ASurface::clearBuffer() { +void BaseSurface::clearBuffer() { byte *pSrc = (byte *)getPixels(); Common::fill(pSrc, pSrc + w * h, 0); } -bool ASurface::clip(Common::Rect &r) { - int skip; - _leftSkip = _rightSkip = 0; - _topSkip = _bottomSkip = 0; - - if (r.left > _clipWidth || r.left < 0) { - if (r.left >= 0) - return true; - - skip = -r.left; - r.setWidth(r.width() - skip); - _leftSkip = skip; - r.moveTo(0, r.top); - } - - int right = r.right - 1; - if (right < 0) - return true; - else if (right > _clipWidth) { - skip = right - _clipWidth; - r.setWidth(r.width() - skip); - _rightSkip = skip; - } - - if (r.top > _clipHeight || r.top < 0) { - if (r.top >= 0) - return true; - - skip = -r.top; - r.setHeight(r.height() - skip); - _topSkip = skip; - r.moveTo(r.left, 0); - } - - int bottom = r.bottom - 1; - if (bottom < 0) - return true; - else if (bottom > _clipHeight) { - skip = bottom - _clipHeight; - _bottomSkip = skip; - r.setHeight(r.height() - skip); - } - - return false; -} - -void ASurface::plotImage(SpriteResource *sprite, int frameNum, const Common::Point &pt) { +void BaseSurface::plotImage(SpriteResource *sprite, int frameNum, const Common::Point &pt) { SpriteFrame *frame = sprite->getFrame(frameNum); Common::Rect r(pt.x, pt.y, pt.x + frame->w, pt.y + frame->h); @@ -193,108 +145,38 @@ void ASurface::plotImage(SpriteResource *sprite, int frameNum, const Common::Poi } } -void ASurface::transBlitFrom(ASurface *src, const Common::Point &destPos) { - if (getPixels() == nullptr) - create(w, h); - - for (int yp = 0; yp < src->h; ++yp) { - const byte *srcP = (const byte *)src->getBasePtr(0, yp); - byte *destP = (byte *)getBasePtr(destPos.x, destPos.y + yp); - - for (int xp = 0; xp < this->w; ++xp, ++srcP, ++destP) { - if (*srcP != 0) - *destP = *srcP; - } - } -} - -void ASurface::transBlitFrom(ASurface *src, const Common::Rect &bounds) { - const int SCALE_LIMIT = 0x100; - int scaleX = SCALE_LIMIT * bounds.width() / src->w; - int scaleY = SCALE_LIMIT * bounds.height() / src->h; - int scaleXCtr = 0, scaleYCtr = 0; - - for (int yCtr = 0, destY = bounds.top; yCtr < src->h; ++yCtr) { - // Handle skipping lines if Y scaling - scaleYCtr += scaleY; - if (scaleYCtr < SCALE_LIMIT) - continue; - scaleYCtr -= SCALE_LIMIT; - - // Handle off-screen lines - if (destY >= this->h) - break; - - if (destY >= 0) { - // Handle drawing the line - const byte *pSrc = (const byte *)src->getBasePtr(0, yCtr); - byte *pDest = (byte *)getBasePtr(bounds.left, destY); - scaleXCtr = 0; - int x = bounds.left; - - for (int xCtr = 0; xCtr < src->w; ++xCtr, ++pSrc) { - // Handle horizontal scaling - scaleXCtr += scaleX; - if (scaleXCtr < SCALE_LIMIT) - continue; - scaleXCtr -= SCALE_LIMIT; - - // Only handle on-screen pixels - if (x >= this->w) - break; - if (x >= 0 && *pSrc != 0) - *pDest = *pSrc; - - ++pDest; - ++x; - } - } - - ++destY; - } -} - -void ASurface::transBlitFrom(ASurface &src) { - blitFrom(src); -} - -void ASurface::blitFrom(Graphics::Surface &src) { - assert(w >= src.w && h >= src.h); - for (int y = 0; y < src.h; ++y) { - const byte *srcP = (const byte *)src.getBasePtr(0, y); - byte *destP = (byte *)getBasePtr(0, y); - Common::copy(srcP, srcP + src.w, destP); - } -} - -void ASurface::copyBuffer(Graphics::Surface *src) { +void BaseSurface::copyBuffer(Graphics::ManagedSurface *src) { blitFrom(*src); } -void ASurface::plotF(SpriteFrame *frame, const Common::Point &pt) { +void BaseSurface::plotF(SpriteFrame *frame, const Common::Point &pt) { sPlotF(frame, Common::Rect(pt.x, pt.y, pt.x + frame->w, pt.y + frame->h)); } -void ASurface::plotB(SpriteFrame *frame, const Common::Point &pt) { +void BaseSurface::plotB(SpriteFrame *frame, const Common::Point &pt) { sPlotB(frame, Common::Rect(pt.x, pt.y, pt.x + frame->w, pt.y + frame->h)); } -void ASurface::sPlotF(SpriteFrame *frame, const Common::Rect &bounds) { - transBlitFrom(frame, bounds); +void BaseSurface::sPlotF(SpriteFrame *frame, const Common::Rect &bounds) { + transBlitFrom(*frame, Common::Rect(0, 0, frame->w, frame->h), bounds, TRANSPARENCY, false); } -void ASurface::sPlotB(SpriteFrame *frame, const Common::Rect &bounds) { - ASurface flippedFrame; - frame->flipHorizontal(flippedFrame); - - transBlitFrom(&flippedFrame, bounds); +void BaseSurface::sPlotB(SpriteFrame *frame, const Common::Rect &bounds) { + transBlitFrom(*frame, Common::Rect(0, 0, frame->w, frame->h), bounds, TRANSPARENCY, true); } -void ASurface::copyBlock(ASurface *src, const Common::Rect &bounds) { +void BaseSurface::copyBlock(BaseSurface *src, const Common::Rect &bounds) { copyRectToSurface(*src, bounds.left, bounds.top, bounds); } -void ASurface::saveBlock(const Common::Rect &bounds) { +void BaseSurface::copyTo(BaseSurface *dest) { + if (dest->empty()) + dest->create(this->w, this->h); + + dest->blitFrom(*this); +} + +void BaseSurface::saveBlock(const Common::Rect &bounds) { _savedBounds = bounds; _savedBounds.clip(Common::Rect(0, 0, this->w, this->h)); @@ -304,7 +186,7 @@ void ASurface::saveBlock(const Common::Rect &bounds) { _savedBlock.copyRectToSurface(*this, 0, 0, _savedBounds); } -void ASurface::restoreBlock() { +void BaseSurface::restoreBlock() { if (!_savedBounds.isEmpty()) { copyRectToSurface(_savedBlock, _savedBounds.left, _savedBounds.top, Common::Rect(0, 0, _savedBlock.w, _savedBlock.h)); @@ -314,26 +196,26 @@ void ASurface::restoreBlock() { } } -void ASurface::drawRect() { - Graphics::Surface::fillRect(Common::Rect(_orgX1, _orgY1, _orgX2, _orgY2), _lColor); +void BaseSurface::drawRect() { + Graphics::ManagedSurface::fillRect(Common::Rect(_orgX1, _orgY1, _orgX2, _orgY2), _lColor); } -void ASurface::drawLine(int x1, int y1, int x2, int y2, int col) { - Graphics::Surface::drawLine(x1, y1, x2, y2, col); +void BaseSurface::drawLine(int x1, int y1, int x2, int y2, int col) { + Graphics::ManagedSurface::drawLine(x1, y1, x2, y2, col); } -void ASurface::drawLine() { - Graphics::Surface::drawLine(_orgX1, _orgY1, _orgX2, _orgY1, _lColor); +void BaseSurface::drawLine() { + Graphics::ManagedSurface::drawLine(_orgX1, _orgY1, _orgX2, _orgY1, _lColor); } -void ASurface::drawBox() { - Graphics::Surface::drawLine(_orgX1, _orgY1, _orgX2, _orgY1, _lColor); - Graphics::Surface::drawLine(_orgX1, _orgY2, _orgX2, _orgY2, _lColor); - Graphics::Surface::drawLine(_orgX2, _orgY1, _orgX2, _orgY1, _lColor); - Graphics::Surface::drawLine(_orgX2, _orgY2, _orgX2, _orgY2, _lColor); +void BaseSurface::drawBox() { + Graphics::ManagedSurface::drawLine(_orgX1, _orgY1, _orgX2, _orgY1, _lColor); + Graphics::ManagedSurface::drawLine(_orgX1, _orgY2, _orgX2, _orgY2, _lColor); + Graphics::ManagedSurface::drawLine(_orgX2, _orgY1, _orgX2, _orgY1, _lColor); + Graphics::ManagedSurface::drawLine(_orgX2, _orgY2, _orgX2, _orgY2, _lColor); } -void ASurface::flipHorizontal(ASurface &dest) { +void BaseSurface::flipHorizontal(BaseSurface &dest) { dest.create(this->w, this->h); for (int y = 0; y < h; ++y) { const byte *pSrc = (const byte *)getBasePtr(this->w - 1, y); @@ -344,24 +226,70 @@ void ASurface::flipHorizontal(ASurface &dest) { } } -void ASurface::moveBufferLeft() { +void BaseSurface::moveBufferLeft() { byte *p = (byte *)getPixels(); Common::copy(p + TILE_WIDTH, p + (w * h), p); } -void ASurface::moveBufferRight() { +void BaseSurface::moveBufferRight() { byte *p = (byte *)getPixels(); Common::copy_backward(p, p + (pitch * h) - TILE_WIDTH, p + (pitch * h)); } -void ASurface::moveBufferUp() { +void BaseSurface::moveBufferUp() { byte *p = (byte *)getPixels(); Common::copy(p + (pitch * TILE_HEIGHT), p + (pitch * h), p); } -void ASurface::moveBufferDown() { +void BaseSurface::moveBufferDown() { byte *p = (byte *)getPixels(); Common::copy_backward(p, p + (pitch * (h - TILE_HEIGHT)), p + (pitch * h)); } +bool BaseSurface::clip(Common::Rect &r) { + int skip; + _leftSkip = _rightSkip = 0; + _topSkip = _bottomSkip = 0; + + if (r.left > _clipWidth || r.left < 0) { + if (r.left >= 0) + return true; + + skip = -r.left; + r.setWidth(r.width() - skip); + _leftSkip = skip; + r.moveTo(0, r.top); + } + + int right = r.right - 1; + if (right < 0) + return true; + else if (right > _clipWidth) { + skip = right - _clipWidth; + r.setWidth(r.width() - skip); + _rightSkip = skip; + } + + if (r.top > _clipHeight || r.top < 0) { + if (r.top >= 0) + return true; + + skip = -r.top; + r.setHeight(r.height() - skip); + _topSkip = skip; + r.moveTo(r.left, 0); + } + + int bottom = r.bottom - 1; + if (bottom < 0) + return true; + else if (bottom > _clipHeight) { + skip = bottom - _clipHeight; + _bottomSkip = skip; + r.setHeight(r.height() - skip); + } + + return false; +} + } // End of namespace Access diff --git a/engines/access/asurface.h b/engines/access/asurface.h index 022e2534c1..64ddf3d0ee 100644 --- a/engines/access/asurface.h +++ b/engines/access/asurface.h @@ -27,7 +27,7 @@ #include "common/array.h" #include "common/memstream.h" #include "common/rect.h" -#include "graphics/surface.h" +#include "graphics/screen.h" #include "access/data.h" namespace Access { @@ -35,11 +35,16 @@ namespace Access { class SpriteResource; class SpriteFrame; -class ASurface : public Graphics::Surface { +/** + * Base Access surface class. This derivces from Graphics::Screen + * because it has logic we'll need for our own Screen class that + * derives from this one + */ +class BaseSurface : virtual public Graphics::Screen { private: Graphics::Surface _savedBlock; - void flipHorizontal(ASurface &dest); + void flipHorizontal(BaseSurface &dest); protected: Common::Rect _savedBounds; public: @@ -57,16 +62,12 @@ public: public: static int _clipWidth, _clipHeight; public: - ASurface(); - - virtual ~ASurface(); + BaseSurface(); - void create(uint16 width, uint16 height); + virtual ~BaseSurface(); void clearBuffer(); - bool clip(Common::Rect &r); - void plotImage(SpriteResource *sprite, int frameNum, const Common::Point &pt); /** @@ -89,7 +90,7 @@ public: */ void plotB(SpriteFrame *frame, const Common::Point &pt); - virtual void copyBlock(ASurface *src, const Common::Rect &bounds); + virtual void copyBlock(BaseSurface *src, const Common::Rect &bounds); virtual void restoreBlock(); @@ -100,20 +101,10 @@ public: virtual void drawLine(); virtual void drawBox(); - - virtual void transBlitFrom(ASurface *src, const Common::Point &destPos); - - virtual void transBlitFrom(ASurface *src, const Common::Rect &bounds); - virtual void transBlitFrom(ASurface &src); - - virtual void blitFrom(Graphics::Surface &src); - - virtual void copyBuffer(Graphics::Surface *src); - - virtual void addDirtyRect(const Common::Rect &r) {} + virtual void copyBuffer(Graphics::ManagedSurface *src); - void copyTo(ASurface *dest) { dest->blitFrom(*this); } + void copyTo(BaseSurface *dest); void saveBlock(const Common::Rect &bounds); @@ -124,6 +115,19 @@ public: void moveBufferUp(); void moveBufferDown(); + + bool clip(Common::Rect &r); +}; + +class ASurface : public BaseSurface { +protected: + /** + * Override the addDirtyRect from Graphics::Screen, since for standard + * surfaces we don't need dirty rects to be tracked + */ + virtual void addDirtyRect(const Common::Rect &r) {} +public: + ASurface() : BaseSurface() {} }; class SpriteFrame : public ASurface { diff --git a/engines/access/bubble_box.cpp b/engines/access/bubble_box.cpp index df8adc1bc6..29b58a3f1b 100644 --- a/engines/access/bubble_box.cpp +++ b/engines/access/bubble_box.cpp @@ -46,6 +46,9 @@ BubbleBox::BubbleBox(AccessEngine *vm, Access::BoxType type, int x, int y, int w } _btnUpPos = Common::Rect(0, 0, 0, 0); _btnDownPos = Common::Rect(0, 0, 0, 0); + _startItem = _startBox = 0; + _charCol = 0; + _rowOff = 0; } void BubbleBox::load(Common::SeekableReadStream *stream) { @@ -95,8 +98,9 @@ void BubbleBox::placeBubble1(const Common::String &msg) { void BubbleBox::calcBubble(const Common::String &msg) { // Save points - Common::Point printOrg = _vm->_screen->_printOrg; - Common::Point printStart = _vm->_screen->_printStart; + Screen &screen = *_vm->_screen; + Common::Point printOrg = screen._printOrg; + Common::Point printStart = screen._printStart; // Figure out maximum width allowed if (_type == kBoxTypeFileDialog) { @@ -114,15 +118,15 @@ void BubbleBox::calcBubble(const Common::String &msg) { int width = 0; bool lastLine; do { - lastLine = _vm->_fonts._font2.getLine(s, _vm->_screen->_maxChars * 6, line, width); + lastLine = _vm->_fonts._font2.getLine(s, screen._maxChars * 6, line, width); _vm->_fonts._printMaxX = MAX(width, _vm->_fonts._printMaxX); - _vm->_screen->_printOrg.y += 6; - _vm->_screen->_printOrg.x = _vm->_screen->_printStart.x; + screen._printOrg.y += 6; + screen._printOrg.x = screen._printStart.x; } while (!lastLine); if (_type == kBoxTypeFileDialog) - ++_vm->_screen->_printOrg.y += 6; + ++screen._printOrg.y += 6; // Determine the width for the area width = (((_vm->_fonts._printMaxX >> 4) + 1) << 4) + 5; @@ -131,7 +135,7 @@ void BubbleBox::calcBubble(const Common::String &msg) { bounds.setWidth(width); // Determine the height for area - int y = _vm->_screen->_printOrg.y + 6; + int y = screen._printOrg.y + 6; if (_type == kBoxTypeFileDialog) y += 6; int height = y - bounds.top; @@ -141,6 +145,9 @@ void BubbleBox::calcBubble(const Common::String &msg) { if (height >= 0) bounds.setHeight(bounds.height() + 13 - (height % 13)); + if (bounds.bottom > screen.h) + bounds.translate(0, screen.h - bounds.bottom); + // Add the new bounds to the bubbles list _bubbles.push_back(bounds); @@ -158,7 +165,7 @@ void BubbleBox::printBubble(const Common::String &msg) { void BubbleBox::printBubble_v1(const Common::String &msg) { drawBubble(_bubbles.size() - 1); - + // Loop through drawing the lines Common::String s = msg; Common::String line; @@ -221,7 +228,7 @@ void BubbleBox::drawBubble(int index) { void BubbleBox::doBox(int item, int box) { FontManager &fonts = _vm->_fonts; - ASurface &screen = *_vm->_screen; + Screen &screen = *_vm->_screen; _startItem = item; _startBox = box; @@ -362,7 +369,7 @@ void BubbleBox::displayBoxData() { _vm->_screen->drawRect(); _vm->_events->showCursor(); } - + _vm->_events->hideCursor(); int oldPStartY = _boxPStartY; ++_boxPStartY; @@ -467,7 +474,7 @@ int BubbleBox::doBox_v1(int item, int box, int &btnSelected) { --_vm->_screen->_orgX2; --_vm->_screen->_orgY2; _vm->_screen->_lColor = 0xF9; - + // Draw the inner border _vm->_screen->drawBox(); @@ -604,6 +611,7 @@ int BubbleBox::doBox_v1(int item, int box, int &btnSelected) { _vm->_events->showCursor(); warning("TODO: pop values"); _vm->_screen->restoreScreen(); + delete icons; return retval_; } @@ -635,7 +643,9 @@ int BubbleBox::doBox_v1(int item, int box, int &btnSelected) { } } } - + + delete icons; + _vm->_screen->restoreScreen(); _vm->_boxDataStart = _startItem; _vm->_boxSelectYOld = -1; @@ -725,7 +735,7 @@ int BubbleBox::doBox_v1(int item, int box, int &btnSelected) { if (_type != TYPE_3) continue; - + if ((_vm->_events->_mousePos.x < tmpX) || (_vm->_events->_mousePos.x > tmpX + 144)) continue; diff --git a/engines/access/char.cpp b/engines/access/char.cpp index aca7262952..f6d3033b1b 100644 --- a/engines/access/char.cpp +++ b/engines/access/char.cpp @@ -31,7 +31,7 @@ CharEntry::CharEntry(const byte *data, AccessEngine *vm) { Common::MemoryReadStream s(data, 999); _charFlag = s.readByte(); - if (vm->getGameID() == GType_MartianMemorandum) { + if (vm->getGameID() != GType_Amazon || !vm->isCD()) { _screenFile.load(s); _estabIndex = s.readSint16LE(); } else { @@ -44,7 +44,7 @@ CharEntry::CharEntry(const byte *data, AccessEngine *vm) { if (vm->getGameID() == GType_MartianMemorandum) { int lastColor = s.readUint16LE(); _numColors = lastColor - _startColor; - } else + } else _numColors = s.readUint16LE(); // Load cells @@ -78,25 +78,12 @@ CharEntry::CharEntry() { /*------------------------------------------------------------------------*/ CharManager::CharManager(AccessEngine *vm) : Manager(vm) { - switch (vm->getGameID()) { - case GType_Amazon: - // Setup character list - if (_vm->isDemo()) { - for (int i = 0; i < 27; ++i) - _charTable.push_back(CharEntry(Amazon::CHARTBL_DEMO[i], vm)); - } else { - for (int i = 0; i < 37; ++i) - _charTable.push_back(CharEntry(Amazon::CHARTBL[i], vm)); - } - break; - - case GType_MartianMemorandum: - for (int i = 0; i < 27; ++i) - _charTable.push_back(CharEntry(Martian::CHARTBL_MM[i], vm)); - break; - - default: - error("Unknown game"); + // Setup character list + for (uint idx = 0; idx < _vm->_res->CHARTBL.size(); ++idx) { + if (_vm->_res->CHARTBL[idx].size() == 0) + _charTable.push_back(CharEntry()); + else + _charTable.push_back(CharEntry(&_vm->_res->CHARTBL[idx][0], _vm)); } _charFlag = 0; @@ -144,6 +131,7 @@ void CharManager::loadChar(int charId) { if (ce._animFile._fileNum != -1) { Resource *data = _vm->_files->loadFile(ce._animFile); _vm->_animation->loadAnimations(data); + delete data; } // Load script data @@ -177,6 +165,10 @@ void CharManager::charMenu() { } else error("Game not supported"); + // Make a backup copy of the screen including the character buttons, + // for restoring when erasing conversation boxes + screen.copyTo(&_vm->_buffer1); + screen.restoreScreen(); delete spr; } diff --git a/engines/access/configure.engine b/engines/access/configure.engine index b1defce946..0082430062 100644 --- a/engines/access/configure.engine +++ b/engines/access/configure.engine @@ -1,3 +1,3 @@ # This file is included from the main "configure" script # add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps] -add_engine access "Access" no +add_engine access "Access" yes diff --git a/engines/access/debugger.cpp b/engines/access/debugger.cpp index 6cb2bb606c..48c7290249 100644 --- a/engines/access/debugger.cpp +++ b/engines/access/debugger.cpp @@ -52,35 +52,26 @@ Debugger *Debugger::init(AccessEngine *vm) { } } +void Debugger::postEnter() { + if (!_playMovieFile.empty()) { + _vm->playMovie(_playMovieFile, Common::Point(0, 0)); + + _playMovieFile.clear(); + } + + _vm->pauseEngine(false); +} + /*------------------------------------------------------------------------*/ Debugger::Debugger(AccessEngine *vm) : GUI::Debugger(), _vm(vm) { registerCmd("continue", WRAP_METHOD(Debugger, cmdExit)); registerCmd("scene", WRAP_METHOD(Debugger, Cmd_LoadScene)); registerCmd("cheat", WRAP_METHOD(Debugger, Cmd_Cheat)); - - switch (vm->getGameID()) { - case GType_Amazon: - _sceneNumb = Amazon::ROOM_NUMB; - _sceneDescr = new Common::String[_sceneNumb]; - for (int i = 0; i < _sceneNumb; i++) - _sceneDescr[i] = Common::String(Amazon::ROOM_DESCR[i]); - break; - case GType_MartianMemorandum: - _sceneNumb = Martian::ROOM_NUMB; - _sceneDescr = new Common::String[_sceneNumb]; - for (int i = 0; i < _sceneNumb; i++) - _sceneDescr[i] = Common::String(Martian::ROOM_DESCR[i]); - break; - default: - _sceneDescr = nullptr; - _sceneNumb = 0; - break; - } + registerCmd("playmovie", WRAP_METHOD(Debugger, Cmd_PlayMovie)); } Debugger::~Debugger() { - delete[] _sceneDescr; } bool Debugger::Cmd_LoadScene(int argc, const char **argv) { @@ -88,18 +79,18 @@ bool Debugger::Cmd_LoadScene(int argc, const char **argv) { case 1: debugPrintf("Current scene is: %d\n\n", _vm->_player->_roomNumber); - for (int i = 0; i < _sceneNumb; i++) - if (_sceneDescr[i].size()) - debugPrintf("%d - %s\n", i, _sceneDescr[i].c_str()); + for (uint i = 0; i < _vm->_res->ROOMTBL.size(); i++) + if (!_vm->_res->ROOMTBL[i]._desc.empty()) + debugPrintf("%d - %s\n", i, _vm->_res->ROOMTBL[i]._desc.c_str()); return true; case 2: { int newRoom = strToInt(argv[1]); - if (newRoom < 0 || newRoom >= _sceneNumb) { + if (newRoom < 0 || newRoom >= (int)_vm->_res->ROOMTBL.size()) { debugPrintf("Invalid Room Number\n"); return true; } - if (!_sceneDescr[newRoom].size()) { + if (_vm->_res->ROOMTBL[newRoom]._desc.empty()) { debugPrintf("Unused Room Number\n"); return true; } @@ -133,6 +124,19 @@ bool Debugger::Cmd_Cheat(int argc, const char **argv) { return true; } +bool Debugger::Cmd_PlayMovie(int argc, const char **argv) { + if (argc != 2) { + debugPrintf("Format: playmovie <movie-file>\n"); + return true; + } + + // play gets postponed until debugger is closed + Common::String filename = argv[1]; + _playMovieFile = filename; + + return cmdExit(0, 0); +} + /*------------------------------------------------------------------------*/ namespace Amazon { diff --git a/engines/access/debugger.h b/engines/access/debugger.h index f4d8df7634..641b85c19b 100644 --- a/engines/access/debugger.h +++ b/engines/access/debugger.h @@ -35,13 +35,14 @@ class AccessEngine; class Debugger : public GUI::Debugger { protected: AccessEngine *_vm; + Common::String _playMovieFile; bool Cmd_LoadScene(int argc, const char **argv); bool Cmd_Cheat(int argc, const char **argv); - Common::String *_sceneDescr; - int _sceneNumb; + bool Cmd_PlayMovie(int argc, const char **argv); public: static Debugger *init(AccessEngine *vm); + void postEnter(); public: Debugger(AccessEngine *vm); virtual ~Debugger(); diff --git a/engines/access/detection.cpp b/engines/access/detection.cpp index 441740c1b2..368753f117 100644 --- a/engines/access/detection.cpp +++ b/engines/access/detection.cpp @@ -94,7 +94,7 @@ public: } virtual const char *getOriginalCopyright() const { - return "Access Engine (c) 1989-1994 Access Software"; + return "Access Engine (C) 1989-1994 Access Software"; } virtual bool hasFeature(MetaEngineFeature f) const; @@ -142,11 +142,10 @@ SaveStateList AccessMetaEngine::listSaves(const char *target) const { Common::SaveFileManager *saveFileMan = g_system->getSavefileManager(); Common::StringArray filenames; Common::String saveDesc; - Common::String pattern = Common::String::format("%s.0??", target); + Common::String pattern = Common::String::format("%s.0##", target); Access::AccessSavegameHeader header; filenames = saveFileMan->listSavefiles(pattern); - sort(filenames.begin(), filenames.end()); // Sort to get the files in numerical order SaveStateList saveList; for (Common::StringArray::const_iterator file = filenames.begin(); file != filenames.end(); ++file) { @@ -167,6 +166,8 @@ SaveStateList AccessMetaEngine::listSaves(const char *target) const { } } + // Sort saves based on slot number. + Common::sort(saveList.begin(), saveList.end(), SaveStateDescriptorSlotComparator()); return saveList; } diff --git a/engines/access/detection_tables.h b/engines/access/detection_tables.h index 124f5fcf0d..7d9509ca43 100644 --- a/engines/access/detection_tables.h +++ b/engines/access/detection_tables.h @@ -40,6 +40,22 @@ static const AccessGameDescription gameDescriptions[] = { 0 }, + { + // Amazon Guardians of Eden - Spanish + // Provided by dianiu in bug report #6958 + { + "amazon", + 0, + AD_ENTRY1s("c00.ap", "aeb429ff015596144c0df06886c84825", 303753), + Common::ES_ESP, + Common::kPlatformDOS, + ADGF_UNSTABLE, + GUIO1(GUIO_NONE) + }, + GType_Amazon, + 0 + }, + // Amazon Guardians of Eden - Demo English { { diff --git a/engines/access/events.cpp b/engines/access/events.cpp index 6ffe67acfb..21ff0d0928 100644 --- a/engines/access/events.cpp +++ b/engines/access/events.cpp @@ -74,7 +74,7 @@ void EventsManager::setCursor(CursorType cursorId) { _invCursor.w / 2, _invCursor.h / 2, 0); } else { // Get a pointer to the mouse data to use, and get the cursor hotspot - const byte *srcP = Amazon::CURSORS[cursorId]; + const byte *srcP = &_vm->_res->CURSORS[cursorId][0]; int hotspotX = (int16)READ_LE_UINT16(srcP); int hotspotY = (int16)READ_LE_UINT16(srcP + 2); srcP += 4; @@ -115,7 +115,7 @@ void EventsManager::setCursor(CursorType cursorId) { } } -void EventsManager::setCursorData(Graphics::Surface *src, const Common::Rect &r) { +void EventsManager::setCursorData(Graphics::ManagedSurface *src, const Common::Rect &r) { _invCursor.create(r.width(), r.height(), Graphics::PixelFormat::createFormatCLUT8()); _invCursor.copyRectToSurface(*src, 0, 0, r); } @@ -281,8 +281,7 @@ void EventsManager::nextFrame() { // Give time to the debugger _vm->_debugger->onFrame(); - // TODO: Refactor for dirty rects - _vm->_screen->updateScreen(); + _vm->_screen->update(); } void EventsManager::nextTimer() { diff --git a/engines/access/events.h b/engines/access/events.h index b8c5f0ee5e..5acbb71c9d 100644 --- a/engines/access/events.h +++ b/engines/access/events.h @@ -100,7 +100,7 @@ public: /** * Set the image for the inventory cursor */ - void setCursorData(Graphics::Surface *src, const Common::Rect &r); + void setCursorData(Graphics::ManagedSurface *src, const Common::Rect &r); /** * Return the current cursor Id diff --git a/engines/access/files.cpp b/engines/access/files.cpp index 4d734a67a9..48276ee477 100644 --- a/engines/access/files.cpp +++ b/engines/access/files.cpp @@ -84,20 +84,6 @@ byte *Resource::data() { /*------------------------------------------------------------------------*/ FileManager::FileManager(AccessEngine *vm) : _vm(vm) { - switch (vm->getGameID()) { - case GType_Amazon: - if (_vm->isDemo()) - _filenames = &Amazon::FILENAMES_DEMO[0]; - else - _filenames = &Amazon::FILENAMES[0]; - break; - case GType_MartianMemorandum: - _filenames = &Martian::FILENAMES[0]; - break; - default: - error("Unknown game"); - } - _fileNumber = -1; _setPaletteFlag = true; } @@ -144,13 +130,13 @@ void FileManager::openFile(Resource *res, const Common::String &filename) { error("Could not open file - %s", filename.c_str()); } -void FileManager::loadScreen(Graphics::Surface *dest, int fileNum, int subfile) { +void FileManager::loadScreen(Graphics::ManagedSurface *dest, int fileNum, int subfile) { Resource *res = loadFile(fileNum, subfile); handleScreen(dest, res); delete res; } -void FileManager::handleScreen(Graphics::Surface *dest, Resource *res) { +void FileManager::handleScreen(Graphics::ManagedSurface *dest, Resource *res) { _vm->_screen->loadRawPalette(res->_stream); if (_setPaletteFlag) _vm->_screen->setPalette(); @@ -161,20 +147,17 @@ void FileManager::handleScreen(Graphics::Surface *dest, Resource *res) { res->_size -= res->_stream->pos(); handleFile(res); - if (dest != _vm->_screen) - dest->w = _vm->_screen->w; + Graphics::Surface destSurface = dest->getSubArea(Common::Rect(0, 0, + _vm->_screen->w, _vm->_screen->h)); - if (dest->w == dest->pitch) { - res->_stream->read((byte *)dest->getPixels(), dest->w * dest->h); + if (destSurface.w == destSurface.pitch) { + res->_stream->read((byte *)destSurface.getPixels(), destSurface.w * destSurface.h); } else { - for (int y = 0; y < dest->h; ++y) { - byte *pDest = (byte *)dest->getBasePtr(0, y); - res->_stream->read(pDest, dest->w); + for (int y = 0; y < destSurface.h; ++y) { + byte *pDest = (byte *)destSurface.getBasePtr(0, y); + res->_stream->read(pDest, destSurface.w); } } - - if (dest == _vm->_screen) - _vm->_screen->addDirtyRect(Common::Rect(0, 0, dest->w, dest->h)); } void FileManager::loadScreen(int fileNum, int subfile) { @@ -215,8 +198,8 @@ void FileManager::handleFile(Resource *res) { void FileManager::setAppended(Resource *res, int fileNum) { // Open the file for access - if (!res->_file.open(_filenames[fileNum])) - error("Could not open file %s", _filenames[fileNum]); + if (!res->_file.open(_vm->_res->FILENAMES[fileNum])) + error("Could not open file %s", _vm->_res->FILENAMES[fileNum].c_str()); // If a different file has been opened then previously, load its index if (_fileNumber != fileNum) { diff --git a/engines/access/files.h b/engines/access/files.h index 714ea44c75..61fccc2431 100644 --- a/engines/access/files.h +++ b/engines/access/files.h @@ -26,7 +26,7 @@ #include "common/scummsys.h" #include "common/array.h" #include "common/file.h" -#include "graphics/surface.h" +#include "graphics/managed_surface.h" #include "access/decompress.h" namespace Access { @@ -70,7 +70,6 @@ public: class FileManager { private: AccessEngine *_vm; - const char * const *_filenames; void openFile(Resource *res, const Common::String &filename); @@ -82,7 +81,7 @@ private: /** * Handles loading a screen surface and palette with decoded resource */ - void handleScreen(Graphics::Surface *dest, Resource *res); + void handleScreen(Graphics::ManagedSurface *dest, Resource *res); /** * Open up a sub-file container file @@ -134,7 +133,7 @@ public: /** * Load a screen resource onto a designated surface */ - void loadScreen(Graphics::Surface *dest, int fileNum, int subfile); + void loadScreen(Graphics::ManagedSurface *dest, int fileNum, int subfile); }; } // End of namespace Access diff --git a/engines/access/font.cpp b/engines/access/font.cpp index 8af183f193..8e02f80769 100644 --- a/engines/access/font.cpp +++ b/engines/access/font.cpp @@ -139,7 +139,7 @@ bool Font::getLine(Common::String &s, int maxWidth, Common::String &line, int &w return true; } -void Font::drawString(ASurface *s, const Common::String &msg, const Common::Point &pt) { +void Font::drawString(BaseSurface *s, const Common::String &msg, const Common::Point &pt) { Common::Point currPt = pt; const char *msgP = msg.c_str(); @@ -149,15 +149,14 @@ void Font::drawString(ASurface *s, const Common::String &msg, const Common::Poin } } -int Font::drawChar(ASurface *s, char c, Common::Point &pt) { +int Font::drawChar(BaseSurface *s, char c, Common::Point &pt) { Graphics::Surface &ch = _chars[c - ' ']; - - s->addDirtyRect(Common::Rect(pt.x, pt.y, pt.x + ch.w, pt.y + ch.h)); + Graphics::Surface dest = s->getSubArea(Common::Rect(pt.x, pt.y, pt.x + ch.w, pt.y + ch.h)); // Loop through the lines of the character for (int y = 0; y < ch.h; ++y) { byte *pSrc = (byte *)ch.getBasePtr(0, y); - byte *pDest = (byte *)s->getBasePtr(pt.x, pt.y + y); + byte *pDest = (byte *)dest.getBasePtr(0, y); // Loop through the horizontal pixels of the line for (int x = 0; x < ch.w; ++x, ++pSrc, ++pDest) { diff --git a/engines/access/font.h b/engines/access/font.h index 6a812051ca..9234078af2 100644 --- a/engines/access/font.h +++ b/engines/access/font.h @@ -78,12 +78,12 @@ public: /** * Draw a string on a given surface */ - void drawString(ASurface *s, const Common::String &msg, const Common::Point &pt); + void drawString(BaseSurface *s, const Common::String &msg, const Common::Point &pt); /** * Draw a character on a given surface */ - int drawChar(ASurface *s, char c, Common::Point &pt); + int drawChar(BaseSurface *s, char c, Common::Point &pt); }; diff --git a/engines/access/inventory.cpp b/engines/access/inventory.cpp index 3823b17283..e9874cd8d6 100644 --- a/engines/access/inventory.cpp +++ b/engines/access/inventory.cpp @@ -66,27 +66,9 @@ InventoryManager::InventoryManager(AccessEngine *vm) : Manager(vm) { _iconDisplayFlag = true; _boxNum = 0; - const char *const *names; - const int *combineP; - - switch (vm->getGameID()) { - case GType_Amazon: - names = Amazon::INVENTORY_NAMES; - combineP = &Amazon::COMBO_TABLE[0][0]; - _inv.resize(85); - for (uint i = 0; i < _inv.size(); ++i, combineP += 4) - _inv[i].load(names[i], combineP); - break; - case GType_MartianMemorandum: - names = Martian::INVENTORY_NAMES; - combineP = nullptr; - _inv.resize(55); - for (uint i = 0; i < _inv.size(); ++i) - _inv[i].load(names[i], nullptr); - break; - default: - error("Unknown game"); - } + _inv.resize(_vm->_res->INVENTORY.size()); + for (uint idx = 0; idx < _inv.size(); ++idx) + _inv[idx].load(_vm->_res->INVENTORY[idx]._desc, _vm->_res->INVENTORY[idx]._combo); for (uint i = 0; i < 26; ++i) { const int *r = INVCOORDS[i]; @@ -138,6 +120,7 @@ int InventoryManager::newDisplayInv() { getList(); initFields(); + files._setPaletteFlag = false; files.loadScreen(&_vm->_buffer1, 99, 0); _vm->_buffer1.copyTo(&_vm->_buffer2); _vm->copyBF2Vid(); @@ -217,12 +200,15 @@ int InventoryManager::newDisplayInv() { } int InventoryManager::displayInv() { - int *inv = (int *) malloc (Martian::INVENTORY_SIZE * sizeof(int)); + int *inv = (int *) malloc(_vm->_res->INVENTORY.size() * sizeof(int)); + const char **names = (const char **)malloc(_vm->_res->INVENTORY.size() * sizeof(const char *)); - for (int i = 0; i < Martian::INVENTORY_SIZE; i++) + for (uint i = 0; i < _vm->_res->INVENTORY.size(); i++) { inv[i] = _inv[i]._value; + names[i] = _inv[i]._name.c_str(); + } _vm->_events->forceSetCursor(CURSOR_CROSSHAIRS); - _vm->_invBox->getList(Martian::INVENTORY_NAMES, inv); + _vm->_invBox->getList(names, inv); int btnSelected = 0; int boxX = _vm->_invBox->doBox_v1(_startInvItem, _startInvBox, btnSelected); @@ -237,6 +223,7 @@ int InventoryManager::displayInv() { else _vm->_useItem = -1; + free(names); free(inv); return 0; } diff --git a/engines/access/martian/martian_game.cpp b/engines/access/martian/martian_game.cpp index 3fdba8d260..00ee6c9776 100644 --- a/engines/access/martian/martian_game.cpp +++ b/engines/access/martian/martian_game.cpp @@ -36,6 +36,8 @@ MartianEngine::MartianEngine(OSystem *syst, const AccessGameDescription *gameDes MartianEngine::~MartianEngine() { _introObjects = _spec7Objects = nullptr; + _skipStart = false; + _creditsStream = nullptr; } void MartianEngine::initObjects() { @@ -68,8 +70,8 @@ void MartianEngine::initVariables() { _timers.push_back(te); } - _player->_playerX = _player->_rawPlayer.x = _travelPos[_player->_roomNumber][0]; - _player->_playerY = _player->_rawPlayer.y = _travelPos[_player->_roomNumber][1]; + _player->_playerX = _player->_rawPlayer.x = _res->ROOMTBL[_player->_roomNumber]._travelPos.x; + _player->_playerY = _player->_rawPlayer.y = _res->ROOMTBL[_player->_roomNumber]._travelPos.y; _room->_selectCommand = -1; _events->setNormalCursor(CURSOR_CROSSHAIRS); _mouseMode = 0; @@ -280,10 +282,10 @@ void MartianEngine::doCredits() { void MartianEngine::setupGame() { // Load death list - _deaths.resize(20); - for (int i = 0; i < 20; ++i) { - _deaths[i]._screenId = Martian::DEATH_SCREENS[i]; - _deaths[i]._msg = Martian::DEATHMESSAGE[i]; + _deaths.resize(_res->DEATHS.size()); + for (uint idx = 0; idx < _deaths.size(); ++idx) { + _deaths[idx]._screenId = _res->DEATHS[idx]._screenId; + _deaths[idx]._msg = _res->DEATHS[idx]._msg; } // Setup timers @@ -297,14 +299,14 @@ void MartianEngine::setupGame() { } // Miscellaneous - // TODO: Replace with Martian fonts when located - _fonts._font1.load(Amazon::FONT6x6_INDEX, Amazon::FONT6x6_DATA); - _fonts._font2.load(Amazon::FONT2_INDEX, Amazon::FONT2_DATA); + Amazon::AmazonResources &res = *((Amazon::AmazonResources *)_res); + _fonts._font1.load(&res.FONT6x6_INDEX[0], &res.FONT6x6_DATA[0]); + _fonts._font2.load(&res.FONT2_INDEX[0], &res.FONT2_DATA[0]); // Set player room and position _player->_roomNumber = 7; - _player->_playerX = _player->_rawPlayer.x = _travelPos[_player->_roomNumber][0]; - _player->_playerY = _player->_rawPlayer.y = _travelPos[_player->_roomNumber][1]; + _player->_playerX = _player->_rawPlayer.x = _res->ROOMTBL[_player->_roomNumber]._travelPos.x; + _player->_playerY = _player->_rawPlayer.y = _res->ROOMTBL[_player->_roomNumber]._travelPos.y; } void MartianEngine::showDeathText(Common::String msg) { diff --git a/engines/access/martian/martian_resources.cpp b/engines/access/martian/martian_resources.cpp index 474ec2f71c..070fa0f7e3 100644 --- a/engines/access/martian/martian_resources.cpp +++ b/engines/access/martian/martian_resources.cpp @@ -27,691 +27,6 @@ namespace Access { namespace Martian { -const char *const FILENAMES[] = { - "R00.AP", "R01.AP", "R02.AP", "R03.AP", "R04.AP", "R05.AP", "R06.AP", "R07.AP", - "R08.AP", "R09.AP", "R10.AP", "R11.AP", "R12.AP", "R13.AP", "R14.AP", "R15.AP", - "R16.AP", "R17.AP", "R18.AP", "R19.AP", "R20.AP", "R21.AP", "R22.AP", "R23.AP", - "R24.AP", "R25.AP", "R26.AP", "R27.AP", "R28.AP", "R29.AP", "R30.AP", "R31.AP", - "R32.AP", "R33.AP", "R34.AP", "R35.AP", "R36.AP", "R37.AP", "R38.AP", "R39.AP", - "R40.AP","TITLE.AP","R42.AP","S01.AP", "R44.AP", "R45.AP","SOUND.AP","MUSIC.AP", - "DEAD.AP","EST.AP", "W02.AP", "C02.AP", "C05.AP", "C04.AP", "C10.AP", "C03.AP", - "C07.AP", "LOVE.AP","CAFE.AP","C08.AP", "C18.AP", "C19.AP", "C21.AP", "C23.AP", - "C12.AP", "C16.AP","CAFE1.AP","C05A.AP","C06.AP","C11.AP", "C13.AP", "C20.AP", - "C16A.AP","C09.AP", "R45.AP", "R46.AP", "R47.AP", "R48.AP", "R49.AP" -}; - -const byte MOUSE0[] = { - // hotspot x and y, uint16 LE - 0, 0, 0, 0, - // byte 1: number of skipped pixels - // byte 2: number of plotted pixels - // then, pixels - 0, 2, 0xF7, 5, - 0, 3, 0xF7, 0xF7, 5, - 0, 3, 0xF7, 0xF7, 5, - 0, 4, 0xF7, 0xF7, 0xF7, 5, - 0, 4, 0xF7, 0xF7, 0xF7, 5, - 0, 5, 0xF7, 0xF7, 0xF7, 0xF7, 5, - 0, 5, 0xF7, 0xF7, 0xF7, 0xF7, 5, - 0, 6, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 5, - 0, 6, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 5, - 0, 7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 5, - 0, 6, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 5, - 0, 5, 0xF7, 0xF7, 0xF7, 0xF7, 5, - 2, 3, 0xF7, 0xF7, 5, - 3, 3, 0xF7, 0xF7, 5, - 3, 3, 0xF7, 0xF7, 5, - 4, 2, 0xF7, 5 -}; -const byte MOUSE1[] = { - // hotspot x and y, uint16 LE - 7, 0, 7, 0, - // byte 1: number of skipped pixels - // byte 2: number of plotted pixels - // then, pixels - 6, 1, 0xF7, - 4, 5, 0xFF, 0xFF, 0, 0xFF, 0xFF, - 3, 7, 0xFF, 0, 0, 0, 0, 0, 0xFF, - 2, 9, 0xFF, 0, 0, 0, 0xF7, 0, 0, 0, 0xFF, - 1, 11, 0xFF, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xFF, - 1, 11, 0xFF, 0, 0, 0, 0, 0xF7, 0, 0, 0, 0, 0xFF, - 0, 13, 0xF7, 0, 0, 0xF7, 0, 0xF7, 0, 0xF7, 0, 0xF7, 0, 0, 0xF7, - 1, 11, 0xFF, 0, 0, 0, 0, 0xF7, 0, 0, 0, 0, 0xFF, - 1, 11, 0xFF, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xFF, - 2, 9, 0xFF, 0, 0, 0, 0xF7, 0, 0, 0, 0xFF, - 3, 7, 0xFF, 0, 0, 0, 0, 0, 0xFF, - 4, 5, 0xFF, 0xFF, 0, 0xFF, 0xFF, - 6, 1, 0xF7, - 0, 0, - 0, 0, - 0, 0 -}; -const byte MOUSE2[] = { - // hotspot x and y, uint16 LE - 8, 0, 8, 0, - // byte 1: number of skipped pixels - // byte 2: number of plotted pixels - // then, pixels - 0, 0, - 0, 0, - 7, 2, 4, 5, - 7, 2, 4, 5, - 7, 2, 4, 5, - 7, 2, 4, 5, - 7, 2, 4, 5, - 2, 12, 4, 4, 4, 4, 4, 0, 4, 4, 4, 4, 4, 5, - 7, 2, 4, 5, - 7, 2, 4, 5, - 7, 2, 4, 5, - 7, 2, 4, 5, - 7, 2, 4, 5, - 0, 0, - 0, 0, - 0, 0 -}; -const byte MOUSE3[] = { - // hotspot x and y, uint16 LE - 0, 0, 0, 0, - // byte 1: number of skipped pixels - // byte 2: number of plotted pixels - // then, pixels - 0, 11, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 0, 12, 6, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 5, - 0, 12, 6, 7, 7, 7, 7, 7, 7, 7, 7, 6, 5, 5, - 0, 12, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, - 0, 12, 6, 6, 6, 6, 6, 5, 6, 6, 6, 6, 6, 5, - 0, 12, 6, 6, 6, 6, 5, 0, 0, 6, 6, 6, 6, 5, - 0, 12, 6, 6, 6, 6, 6, 0, 6, 6, 6, 6, 6, 5, - 0, 12, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, - 0, 12, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, - 0, 12, 6, 6, 6, 6, 6, 5, 6, 6, 6, 6, 6, 5, - 0, 12, 6, 6, 6, 6, 6, 5, 6, 6, 6, 6, 6, 5, - 0, 12, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, - 1, 11, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 0, 0, - 0, 0, - 0, 0 -}; -const byte *const CURSORS[4] = { MOUSE0, MOUSE1, MOUSE2, MOUSE3 }; - -const int _travelPos[][2] = { - { -1, 0 }, - { 228, 117 }, - { 28, 98 }, - { 161, 140 }, - { 160, 116 }, - { 34, 119 }, - { 166, 105 }, - { 260, 126 }, - { 37, 107 }, - { 78, 139 }, - { 0, 0 }, - { 13, 112 }, - { 0, 0 }, - { 16, 122 }, - { 33, 126 }, - { 10, 160 }, - { 150, 102 }, - { 134, 160 }, - { 160, 76 }, - { 0, 0 }, - { 0, 0 }, - { 36, 116 }, - { 214, 113 }, - { 30, 127 }, - { 143, 131 }, - { 163, 103 }, - { 254, 106 }, - { 28, 161 }, - { 11, 164 }, - { 276, 134 }, - { 93, 118 }, - { 22, 150 }, - { 282, 156 }, - { 149, 92 }, - { 0, 0 }, - { 43, 410 }, - { 0, 0 }, - { 10, 136 }, - { 41, 100 }, - { 157, 97 }, - { -1, 5 }, - { -1, 4 }, - { -1, 10 }, - { -1, 7 }, - { -1, 3 }, - { -1, 8 }, - { -1, 6 }, - { -1, 20 }, - { -1, 18 }, - { -1, 19 }, - { -1, 21 } -}; - -const int INVENTORY_SIZE = 55; -const char *const INVENTORY_NAMES[] = { - "CAMERA", "LENS", "PHOTOS", "MAIL", "GUN", - "CASH", "COMLINK", "AMMO", "LOCKPICK KIT", "EARRING", - "RECIEPTS", "PAPER", "LADDER", "BOOTS", "DOCUMENTS", - "KNIFE", "DAGGER", "KEYS", "ROCK", "LOG", - "SHOVEL", "STONE", "REMOTE CONTROL", "FOOD AND WATER", "DOOR CARD KEY", - "FLASHLIGHT", "INTERLOCK KEY", "TOOLS", "REBREATHER", "JET PACK", - "ROD", "HCL2", "SAFE CARD KEY", "TUNING FORK", "STONE", - "ROSE", "KEY", "NOTE", "ALLEN WRENCH", "HOVER BOARD", - "BLUE PRINTS", "LETTER", "MEMORANDUM", "MARKERS", "FILM", - "ANDRETTI FILM", "GLASSES", "AMULET", "FACIAL KIT", "CAT FOOD", - "MONKEY WRENCH", "BIG DICK CARD", "BRA", "BOLT", nullptr -}; - -const byte ROOM_TABLE1[] = { - 0x00, 0x2f, 0x00, 0x0d, 0x00, 0x30, 0x22, 0x30, 0x01, 0x00, - 0x00, 0x00, 0x01, 0x01, 0x00, 0x03, 0x00, 0xff, 0x01, 0x00, - 0x02, 0x00, 0x01, 0x00, 0x01, 0x00, 0xc0, 0x00, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00, - 0x2e, 0x00, 0x05, 0x00, 0x01, 0x00, 0xff, 0xff, -}; -const byte ROOM_TABLE2[] = { - 0x00, 0x2f, 0x00, 0x0d, 0x00, 0x32, 0x28, 0x25, 0x02, 0x00, - 0x00, 0x00, 0x02, 0x02, 0x00, 0x03, 0x00, 0xff, 0x02, 0x00, - 0x02, 0x00, 0x02, 0x00, 0x01, 0x00, 0xc8, 0x00, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00, - 0x2e, 0x00, 0x06, 0x00, 0x01, 0x00, 0xff, 0xff, -}; -const byte ROOM_TABLE3[] = { - 0x00, 0x2f, 0x00, 0x0f, 0x00, 0x1e, 0x19, 0x24, 0x03, 0x00, - 0x00, 0x00, 0x03, 0x03, 0x00, 0x03, 0x00, 0xff, 0x03, 0x00, - 0x02, 0x00, 0x03, 0x00, 0x01, 0x00, 0x78, 0x00, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x02, 0x00, - 0x03, 0x00, 0x04, 0x00, 0x01, 0x00, 0x03, 0x00, 0x05, 0x00, - 0x01, 0x00, 0x03, 0x00, 0x06, 0x00, 0x01, 0x00, 0x2e, 0x00, - 0x01, 0x00, 0x01, 0x00, 0xff, 0xff, -}; -const byte ROOM_TABLE4[] = { - 0x00, 0x2f, 0x00, 0x06, 0x00, 0x36, 0x27, 0x32, 0x04, 0x00, - 0x00, 0x00, 0x04, 0x04, 0x00, 0x03, 0x00, 0xff, 0x04, 0x00, - 0x02, 0x00, 0x04, 0x00, 0x01, 0x00, 0xc8, 0x00, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00, - 0x2e, 0x00, 0x07, 0x00, 0x01, 0x00, 0x2e, 0x00, 0x05, 0x00, - 0x01, 0x00, 0xff, 0xff, -}; -const byte ROOM_TABLE5[] = { - 0x00, 0x2f, 0x00, 0x00, 0x00, 0x28, 0x19, 0x36, 0x05, 0x00, - 0x00, 0x00, 0x05, 0x05, 0x00, 0x03, 0x00, 0xff, 0x05, 0x00, - 0x02, 0x00, 0x05, 0x00, 0x01, 0x00, 0xa0, 0x20, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00, - 0x2e, 0x00, 0x02, 0x00, 0x01, 0x00, 0x2e, 0x00, 0x03, 0x00, - 0x01, 0x00, 0xff, 0xff, -}; -const byte ROOM_TABLE6[] = { - 0x00, 0x2f, 0x00, 0x07, 0x00, 0x40, 0x36, 0x36, 0x06, 0x00, - 0x00, 0x00, 0x06, 0x06, 0x00, 0x03, 0x00, 0xff, 0x06, 0x00, - 0x02, 0x00, 0x06, 0x00, 0x01, 0x00, 0xfe, 0x00, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00, - 0x2e, 0x00, 0x13, 0x00, 0x01, 0x00, 0x2e, 0x00, 0x08, 0x00, - 0x01, 0x00, 0x2e, 0x00, 0x14, 0x00, 0x01, 0x00, 0x2e, 0x00, - 0x07, 0x00, 0x01, 0x00, 0xff, 0xff, -}; -const byte ROOM_TABLE7[] = { - 0x00, 0x2f, 0x00, 0x0e, 0x00, 0x40, 0x32, 0x3b, 0x07, 0x00, - 0x00, 0x00, 0x07, 0x07, 0x00, 0x03, 0x00, 0xff, 0x07, 0x00, - 0x02, 0x00, 0x07, 0x00, 0x01, 0x00, 0xfe, 0x00, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00, - 0x2e, 0x00, 0x14, 0x00, 0x01, 0x00, 0x2e, 0x00, 0x07, 0x00, - 0x01, 0x00, 0xff, 0xff, -}; -const byte ROOM_TABLE8[] = { - 0x00, 0x2f, 0x00, 0x0a, 0x00, 0x30, 0x22, 0x46, 0x08, 0x00, - 0x00, 0x00, 0x08, 0x08, 0x00, 0x03, 0x00, 0xff, 0x08, 0x00, - 0x02, 0x00, 0x08, 0x00, 0x01, 0x00, 0xc0, 0x00, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00, - 0xff, 0xff, -}; -const byte ROOM_TABLE9[] = { - 0x00, 0x2f, 0x00, 0x07, 0x00, 0x32, 0x0c, 0x29, 0x09, 0x00, - 0x00, 0x00, 0x09, 0x09, 0x00, 0x03, 0x00, 0xff, 0x09, 0x00, - 0x02, 0x00, 0x09, 0x00, 0x01, 0x00, 0xc8, 0x00, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00, - 0xff, 0xff, -}; -const byte ROOM_TABLE11[] = { - 0x00, 0x2f, 0x00, 0x00, 0x00, 0x40, 0x3a, 0x22, 0x0b, 0x00, - 0x00, 0x00, 0x0b, 0x0b, 0x00, 0x03, 0x00, 0xff, 0x0b, 0x00, - 0x02, 0x00, 0x0b, 0x00, 0x01, 0x00, 0xfe, 0x00, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00, - 0xff, 0xff, -}; -const byte ROOM_TABLE13[] = { - 0x00, 0x2f, 0x00, 0x0c, 0x00, 0x40, 0x36, 0x2c, 0x0d, 0x00, - 0x00, 0x00, 0x0d, 0x0d, 0x00, 0x03, 0x00, 0xff, 0x0d, 0x00, - 0x02, 0x00, 0x0d, 0x00, 0x01, 0x00, 0xe6, 0x40, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00, - 0x2e, 0x00, 0x0a, 0x00, 0x01, 0x00, 0x2e, 0x00, 0x07, 0x00, - 0x01, 0x00, 0x2e, 0x00, 0x0b, 0x00, 0x01, 0x00, 0x2e, 0x00, - 0x15, 0x00, 0x01, 0x00, 0xff, 0xff, -}; -const byte ROOM_TABLE14[] = { - 0x00, 0x2f, 0x00, 0x05, 0x00, 0x40, 0x3e, 0x33, 0x0e, 0x00, - 0x00, 0x00, 0x0e, 0x0e, 0x00, 0x03, 0x00, 0xff, 0x0e, 0x00, - 0x02, 0x00, 0x0e, 0x00, 0x01, 0x00, 0xfe, 0x40, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00, - 0x2e, 0x00, 0x09, 0x00, 0x01, 0x00, 0x2e, 0x00, 0x07, 0x00, - 0x01, 0x00, 0x2e, 0x00, 0x13, 0x00, 0x01, 0x00, 0x2e, 0x00, - 0x0a, 0x00, 0x01, 0x00, 0xff, 0xff, -}; -const byte ROOM_TABLE15[] = { - 0x00, 0x2f, 0x00, 0x0c, 0x00, 0x28, 0x0c, 0x5e, 0x0f, 0x00, - 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x03, 0x00, 0xff, 0x0f, 0x00, - 0x02, 0x00, 0x0f, 0x00, 0x01, 0x00, 0xb4, 0x00, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00, - 0x2e, 0x00, 0x11, 0x00, 0x01, 0x00, 0xff, 0xff, -}; -const byte ROOM_TABLE16[] = { - 0x00, 0x2f, 0x00, 0x05, 0x00, 0x28, 0x1e, 0x24, 0x10, 0x00, - 0x00, 0x00, 0x10, 0x10, 0x00, 0x03, 0x00, 0xff, 0x10, 0x00, - 0x02, 0x00, 0x10, 0x00, 0x01, 0x00, 0xa0, 0x00, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00, - 0x2e, 0x00, 0x07, 0x00, 0x01, 0x00, 0xff, 0xff, -}; -const byte ROOM_TABLE17[] = { - 0x00, 0x2f, 0x00, 0x06, 0x00, 0x28, 0x19, 0x2b, 0x11, 0x00, - 0x00, 0x00, 0x11, 0x11, 0x00, 0x03, 0x00, 0xff, 0x11, 0x00, - 0x02, 0x00, 0x11, 0x00, 0x01, 0x00, 0xa0, 0x00, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00, - 0x2e, 0x00, 0x05, 0x00, 0x01, 0x00, 0xff, 0xff, -}; -const byte ROOM_TABLE18[] = { - 0x00, 0x2f, 0x00, 0x00, 0x00, 0x2d, 0x14, 0x3c, 0x12, 0x00, - 0x00, 0x00, 0x12, 0x12, 0x00, 0x03, 0x00, 0xff, 0x12, 0x00, - 0x02, 0x00, 0x12, 0x00, 0x01, 0x00, 0xb1, 0x40, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00, - 0x2e, 0x00, 0x05, 0x00, 0x01, 0x00, 0xff, 0xff, -}; -const byte ROOM_TABLE21[] = { - 0x00, 0x2f, 0x00, 0x07, 0x00, 0x3c, 0x2a, 0x29, 0x15, 0x00, - 0x00, 0x00, 0x15, 0x15, 0x00, 0x03, 0x00, 0xff, 0x15, 0x00, - 0x02, 0x00, 0x15, 0x00, 0x01, 0x00, 0xf0, 0x00, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00, - 0x2e, 0x00, 0x12, 0x00, 0x01, 0x00, 0x2e, 0x00, 0x07, 0x00, - 0x01, 0x00, 0xff, 0xff, -}; -const byte ROOM_TABLE22[] = { - 0x00, 0x2f, 0x00, 0x0a, 0x00, 0x40, 0x2d, 0x27, 0x16, 0x00, - 0x00, 0x00, 0x16, 0x16, 0x00, 0x03, 0x00, 0xff, 0x16, 0x00, - 0x02, 0x00, 0x16, 0x00, 0x01, 0x00, 0xfe, 0x00, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00, - 0x2e, 0x00, 0x16, 0x00, 0x01, 0x00, 0x2e, 0x00, 0x07, 0x00, - 0x01, 0x00, 0xff, 0xff, -}; -const byte ROOM_TABLE23[] = { - 0x00, 0x2f, 0x00, 0x0a, 0x00, 0x40, 0x38, 0x24, 0x17, 0x00, - 0x00, 0x00, 0x17, 0x17, 0x00, 0x03, 0x00, 0xff, 0x17, 0x00, - 0x02, 0x00, 0x17, 0x00, 0x01, 0x00, 0xfe, 0x40, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00, - 0x2e, 0x00, 0x0f, 0x00, 0x01, 0x00, 0x2e, 0x00, 0x17, 0x00, - 0x01, 0x00, 0xff, 0xff, -}; -const byte ROOM_TABLE24[] = { - 0x00, 0x2f, 0x00, 0x06, 0x00, 0x3e, 0x10, 0x62, 0x18, 0x00, - 0x00, 0x00, 0x18, 0x18, 0x00, 0x03, 0x00, 0xff, 0x18, 0x00, - 0x02, 0x00, 0x18, 0x00, 0x01, 0x00, 0xf8, 0x00, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00, - 0x2e, 0x00, 0x16, 0x00, 0x01, 0x00, 0xff, 0xff, -}; -const byte ROOM_TABLE25[] = { - 0x00, 0x2f, 0x00, 0x0e, 0x00, 0x3e, 0x37, 0x19, 0x19, 0x00, - 0x00, 0x00, 0x19, 0x19, 0x00, 0x03, 0x00, 0xff, 0x19, 0x00, - 0x02, 0x00, 0x19, 0x00, 0x01, 0x00, 0xf8, 0x00, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00, - 0x2e, 0x00, 0x10, 0x00, 0x01, 0x00, 0x2e, 0x00, 0x07, 0x00, - 0x01, 0x00, 0xff, 0xff, -}; -const byte ROOM_TABLE26[] = { - 0x00, 0x2f, 0x00, 0x06, 0x00, 0x34, 0x28, 0x28, 0x1a, 0x00, - 0x00, 0x00, 0x1a, 0x1a, 0x00, 0x03, 0x00, 0xff, 0x1a, 0x00, - 0x02, 0x00, 0x1a, 0x00, 0x01, 0x00, 0xd0, 0x00, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00, - 0x2e, 0x00, 0x07, 0x00, 0x01, 0x00, 0xff, 0xff, -}; -const byte ROOM_TABLE27[] = { - 0x00, 0x2f, 0x00, 0x0f, 0x00, 0x1b, 0x16, 0x18, 0x1b, 0x00, - 0x00, 0x00, 0x1b, 0x1b, 0x00, 0x03, 0x00, 0xff, 0x1b, 0x00, - 0x02, 0x00, 0x1b, 0x00, 0x01, 0x00, 0x70, 0x00, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00, - 0x2e, 0x00, 0x0d, 0x00, 0x01, 0x00, 0x2e, 0x00, 0x07, 0x00, - 0x01, 0x00, 0xff, 0xff, -}; -const byte ROOM_TABLE28[] = { - 0x00, 0x2f, 0x00, 0x09, 0x00, 0x25, 0x10, 0x43, 0x1c, 0x00, - 0x00, 0x00, 0x1c, 0x1c, 0x00, 0x03, 0x00, 0xff, 0x1c, 0x00, - 0x02, 0x00, 0x1c, 0x00, 0x01, 0x00, 0x94, 0x00, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00, - 0xff, 0xff, -}; -const byte ROOM_TABLE29[] = { - 0x00, 0x2f, 0x00, 0x0a, 0x00, 0x20, 0x18, 0x56, 0x1d, 0x00, - 0x00, 0x00, 0x1d, 0x1d, 0x00, 0x03, 0x00, 0xff, 0x1d, 0x00, - 0x02, 0x00, 0x1d, 0x00, 0x01, 0x00, 0x80, 0x00, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00, - 0x2e, 0x00, 0x17, 0x00, 0x01, 0x00, 0x2e, 0x00, 0x10, 0x00, - 0x02, 0x00, 0xff, 0xff, -}; -const byte ROOM_TABLE30[] = { - 0x00, 0x2f, 0x00, 0x07, 0x00, 0x3f, 0x1c, 0x27, 0x1e, 0x00, - 0x00, 0x00, 0x1e, 0x1e, 0x00, 0x03, 0x00, 0xff, 0x1e, 0x00, - 0x02, 0x00, 0x1e, 0x00, 0x01, 0x00, 0xfe, 0x00, 0xff, 0xff, - 0xff, 0xff, 0x1e, 0x00, 0x04, 0x00, 0xff, 0xff, 0x2e, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x2e, 0x00, 0x07, 0x00, 0x01, 0x00, - 0x2e, 0x00, 0x15, 0x00, 0x01, 0x00, 0xff, 0xff, -}; -const byte ROOM_TABLE31[] = { - 0x00, 0x2f, 0x00, 0x0d, 0x00, 0x32, 0x2e, 0x69, 0x1f, 0x00, - 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x03, 0x00, 0xff, 0x1f, 0x00, - 0x02, 0x00, 0x1f, 0x00, 0x01, 0x00, 0xc8, 0x00, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00, - 0xff, 0xff, -}; -const byte ROOM_TABLE32[] = { - 0x00, 0x2f, 0x00, 0x07, 0x00, 0x40, 0x3b, 0x4b, 0x20, 0x00, - 0x00, 0x00, 0x20, 0x20, 0x00, 0x03, 0x00, 0xff, 0x20, 0x00, - 0x02, 0x00, 0x20, 0x00, 0x01, 0x00, 0xfe, 0x00, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00, - 0x2e, 0x00, 0x05, 0x00, 0x01, 0x00, 0xff, 0xff, -}; -const byte ROOM_TABLE33[] = { - 0x00, 0x2f, 0x00, 0x0b, 0x00, 0x30, 0x10, 0x51, 0x21, 0x00, - 0x00, 0x00, 0x21, 0x21, 0x00, 0x03, 0x00, 0xff, 0x21, 0x00, - 0x02, 0x00, 0x21, 0x00, 0x01, 0x00, 0xc0, 0x40, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00, - 0xff, 0xff, -}; -const byte ROOM_TABLE35[] = { - 0x00, 0x2f, 0x00, 0x0f, 0x00, 0x1e, 0x18, 0x25, 0x23, 0x00, - 0x00, 0x00, 0x23, 0x23, 0x00, 0x03, 0x00, 0xff, 0x23, 0x00, - 0x02, 0x00, 0x23, 0x00, 0x01, 0x00, 0x78, 0x18, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00, - 0x2e, 0x00, 0x0e, 0x00, 0x01, 0x00, 0x2e, 0x00, 0x07, 0x00, - 0x01, 0x00, 0x2e, 0x00, 0x16, 0x00, 0x01, 0x00, 0x2e, 0x00, - 0x0c, 0x00, 0x01, 0x00, 0xff, 0xff, -}; -const byte ROOM_TABLE37[] = { - 0x00, 0x2f, 0x00, 0x0f, 0x00, 0x3f, 0x3a, 0x1a, 0x25, 0x00, - 0x00, 0x00, 0x25, 0x25, 0x00, 0x03, 0x00, 0xff, 0x25, 0x00, - 0x02, 0x00, 0x25, 0x00, 0x01, 0x00, 0xfe, 0x40, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00, - 0x2e, 0x00, 0x0d, 0x00, 0x01, 0x00, 0xff, 0xff, -}; -const byte ROOM_TABLE38[] = { - 0x00, 0x2f, 0x00, 0x0d, 0x00, 0x40, 0x32, 0x32, 0x26, 0x00, - 0x00, 0x00, 0x26, 0x26, 0x00, 0x03, 0x00, 0xff, 0x26, 0x00, - 0x02, 0x00, 0x26, 0x00, 0x01, 0x00, 0xf0, 0x00, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00, - 0x2e, 0x00, 0x0b, 0x00, 0x01, 0x00, 0xff, 0xff, -}; -const byte ROOM_TABLE39[] = { - 0x00, 0x2f, 0x00, 0x0a, 0x00, 0x3c, 0x10, 0x4c, 0x27, 0x00, - 0x00, 0x00, 0x27, 0x27, 0x00, 0x03, 0x00, 0xff, 0x27, 0x00, - 0x02, 0x00, 0x27, 0x00, 0x01, 0x00, 0xf0, 0x00, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00, - 0x2e, 0x00, 0x11, 0x00, 0x01, 0x00, 0x2e, 0x00, 0x0f, 0x00, - 0x01, 0x00, 0xff, 0xff, -}; -const byte ROOM_TABLE47[] = { - 0x00, 0x2f, 0x00, 0x06, 0x00, 0x28, 0x1e, 0x32, 0x2b, 0x00, - 0x00, 0x00, 0x46, 0x2b, 0x00, 0x03, 0x00, 0xff, 0x2b, 0x00, - 0x02, 0x00, 0x2b, 0x00, 0x01, 0x00, 0xf0, 0x00, 0xff, 0xff, - 0xff, 0xff, 0x2b, 0x00, 0x04, 0x00, 0xff, 0xff, 0x2e, 0x00, - 0x04, 0x00, 0x01, 0x00, 0xff, 0xff, 0x00, -}; -const byte *const ROOM_TABLE[] = { - nullptr, ROOM_TABLE1, ROOM_TABLE2, ROOM_TABLE3, ROOM_TABLE4, ROOM_TABLE5, ROOM_TABLE6, - ROOM_TABLE7, ROOM_TABLE8, ROOM_TABLE9, nullptr, ROOM_TABLE11, nullptr, ROOM_TABLE13, - ROOM_TABLE14, ROOM_TABLE15, ROOM_TABLE16, ROOM_TABLE17, ROOM_TABLE18, nullptr, nullptr, - ROOM_TABLE21, ROOM_TABLE22, ROOM_TABLE23, ROOM_TABLE24, ROOM_TABLE25, ROOM_TABLE26, ROOM_TABLE27, - ROOM_TABLE28, ROOM_TABLE29, ROOM_TABLE30, ROOM_TABLE31, ROOM_TABLE32, ROOM_TABLE33, nullptr, - ROOM_TABLE35, nullptr, ROOM_TABLE37, ROOM_TABLE38, ROOM_TABLE39, nullptr, nullptr, - nullptr, nullptr, nullptr, nullptr, nullptr, ROOM_TABLE47 -}; - -const char *const ROOM_DESCR[] = { - nullptr, "TBD ROOM_TABLE1", "TBD ROOM_TABLE2", "TBD ROOM_TABLE3", "TBD ROOM_TABLE4", - "TBD ROOM_TABLE5", "TBD ROOM_TABLE6", "TBD ROOM_TABLE7", "TBD ROOM_TABLE8", "TBD ROOM_TABLE9", - nullptr, "TBD ROOM_TABLE11", nullptr, "TBD ROOM_TABLE13", "TBD ROOM_TABLE14", - "TBD ROOM_TABLE15", "TBD ROOM_TABLE16", "TBD ROOM_TABLE17", "TBD ROOM_TABLE18", nullptr, - nullptr, "TBD ROOM_TABLE21", "TBD ROOM_TABLE22", "TBD ROOM_TABLE23", "TBD ROOM_TABLE24", - "TBD ROOM_TABLE25", "TBD ROOM_TABLE26", "TBD ROOM_TABLE27", "TBD ROOM_TABLE28", "TBD ROOM_TABLE29", - "TBD ROOM_TABLE30", "TBD ROOM_TABLE31", "TBD ROOM_TABLE32", "TBD ROOM_TABLE33", nullptr, - "TBD ROOM_TABLE35", nullptr, "TBD ROOM_TABLE37", "TBD ROOM_TABLE38", "TBD ROOM_TABLE39", - nullptr, nullptr, nullptr, nullptr, nullptr, - nullptr, nullptr, "TBD ROOM_TABLE47" -}; - -const int ROOM_NUMB = 48; - -const byte MMCHAR_0[] = { - 0x02, 0x31, 0x00, 0x08, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, -}; -const byte MMCHAR_2[] = { - 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x32, 0x33, 0x00, 0x01, 0x00, - 0xff, 0xff, 0xff, 0xff, 0xff, 0x33, 0x00, 0x00, 0x00, 0x33, - 0x00, 0x02, 0x00, 0x33, 0x00, 0x0b, 0x00, 0x33, 0x00, 0x03, - 0x00, 0x33, 0x00, 0x0c, 0x00, 0x33, 0x00, 0x04, 0x00, 0x33, - 0x00, 0x0d, 0x00, 0x33, 0x00, 0x05, 0x00, 0x33, 0x00, 0x0e, - 0x00, 0x33, 0x00, 0x06, 0x00, 0x33, 0x00, 0x0f, 0x00, 0x33, - 0x00, 0x07, 0x00, 0x33, 0x00, 0x10, 0x00, 0x33, 0x00, 0x08, - 0x00, 0x33, 0x00, 0x11, 0x00, 0x33, 0x00, 0x09, 0x00, 0x33, - 0x00, 0x12, 0x00, 0x33, 0x00, 0x0a, 0x00, 0x33, 0x00, 0x13, - 0x00, 0xff, 0xff, -}; -const byte MMCHAR_3[] = { - 0x02, 0x31, 0x00, 0x03, 0x00, 0x35, 0x00, 0x37, 0x00, 0x02, - 0x00, 0x80, 0x00, 0xf7, 0x00, 0x4b, 0x37, 0x00, 0x01, 0x00, - 0xff, 0x37, 0x00, 0x03, 0x00, 0x37, 0x00, 0x00, 0x00, 0xff, - 0xff, -}; -const byte MMCHAR_4[] = { - 0x01, 0x31, 0x00, 0x0a, 0x00, 0x36, 0x00, 0x35, 0x00, 0x02, - 0x00, 0x80, 0x00, 0xf7, 0x00, 0x49, 0x35, 0x00, 0x01, 0x00, - 0xff, 0xff, 0xff, 0xff, 0xff, 0x35, 0x00, 0x00, 0x00, 0x35, - 0x00, 0x03, 0x00, 0x35, 0x00, 0x0c, 0x00, 0x35, 0x00, 0x04, - 0x00, 0x35, 0x00, 0x0d, 0x00, 0x35, 0x00, 0x05, 0x00, 0x35, - 0x00, 0x0e, 0x00, 0x35, 0x00, 0x06, 0x00, 0x35, 0x00, 0x0f, - 0x00, 0x35, 0x00, 0x07, 0x00, 0x35, 0x00, 0x10, 0x00, 0x35, - 0x00, 0x08, 0x00, 0x35, 0x00, 0x11, 0x00, 0x35, 0x00, 0x09, - 0x00, 0x35, 0x00, 0x12, 0x00, 0x35, 0x00, 0x0a, 0x00, 0x35, - 0x00, 0x13, 0x00, 0x35, 0x00, 0x0b, 0x00, 0x35, 0x00, 0x14, - 0x00, 0xff, 0xff, -}; -const byte MMCHAR_5[] = { - 0x01, 0x31, 0x00, 0x08, 0x00, 0x37, 0x00, 0x34, 0x00, 0x02, - 0x00, 0x80, 0x00, 0xf7, 0x00, 0x48, 0x34, 0x00, 0x01, 0x00, - 0xff, 0xff, 0xff, 0xff, 0xff, 0x34, 0x00, 0x00, 0x00, 0x43, - 0x00, 0x00, 0x00, 0x34, 0x00, 0x03, 0x00, 0x43, 0x00, 0x01, - 0x00, 0x34, 0x00, 0x04, 0x00, 0x43, 0x00, 0x02, 0x00, 0x34, - 0x00, 0x05, 0x00, 0x43, 0x00, 0x03, 0x00, 0x34, 0x00, 0x06, - 0x00, 0x43, 0x00, 0x04, 0x00, 0x34, 0x00, 0x07, 0x00, 0x43, - 0x00, 0x05, 0x00, 0x34, 0x00, 0x08, 0x00, 0x43, 0x00, 0x06, - 0x00, 0x34, 0x00, 0x09, 0x00, 0x43, 0x00, 0x07, 0x00, 0x34, - 0x00, 0x0a, 0x00, 0x43, 0x00, 0x08, 0x00, 0x34, 0x00, 0x0b, - 0x00, 0x43, 0x00, 0x09, 0x00, 0x34, 0x00, 0x0c, 0x00, 0x43, - 0x00, 0x0a, 0x00, 0x34, 0x00, 0x0d, 0x00, 0x43, 0x00, 0x0b, - 0x00, 0x34, 0x00, 0x0e, 0x00, 0x43, 0x00, 0x0c, 0x00, 0x34, - 0x00, 0x0f, 0x00, 0x43, 0x00, 0x0d, 0x00, 0x34, 0x00, 0x10, - 0x00, 0xff, 0xff, -}; -const byte MMCHAR_6[] = { - 0x02, 0x31, 0x00, 0x03, 0x00, 0x38, 0x00, 0x44, 0x00, 0x03, - 0x00, 0x80, 0x00, 0xf7, 0x00, 0x4e, 0x44, 0x00, 0x01, 0x00, - 0xff, 0x44, 0x00, 0x02, 0x00, 0x44, 0x00, 0x00, 0x00, 0xff, - 0xff, -}; -const byte MMCHAR_7[] = { - 0x02, 0x31, 0x00, 0x01, 0x00, 0x39, 0x00, 0x38, 0x00, 0x02, - 0x00, 0x80, 0x00, 0xf7, 0x00, 0x4c, 0x38, 0x00, 0x01, 0x00, - 0xff, 0x38, 0x00, 0x03, 0x00, 0x38, 0x00, 0x00, 0x00, 0xff, - 0xff, -}; -const byte MMCHAR_8[] = { - 0x03, 0xff, 0xff, 0xff, 0xff, 0x3a, 0x00, 0xff, 0xff, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x4d, 0x3b, 0x00, 0x01, 0x00, - 0xff, 0x3b, 0x00, 0x02, 0x00, 0x3b, 0x00, 0x00, 0x00, 0xff, - 0xff, -}; -const byte MMCHAR_9[] = { - 0x03, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x59, 0x4a, 0x00, 0x01, 0x00, - 0xff, 0x4a, 0x00, 0x02, 0x00, 0x4a, 0x00, 0x00, 0x00, 0xff, - 0xff, -}; -const byte MMCHAR_10[] = { - 0x01, 0x31, 0x00, 0x0a, 0x00, 0x3c, 0x00, 0x36, 0x00, 0x02, - 0x00, 0x80, 0x00, 0xf7, 0x00, 0x4a, 0x36, 0x00, 0x01, 0x00, - 0xff, 0xff, 0xff, 0xff, 0xff, 0x36, 0x00, 0x00, 0x00, 0x36, - 0x00, 0x03, 0x00, 0x36, 0x00, 0x13, 0x00, 0x36, 0x00, 0x04, - 0x00, 0x36, 0x00, 0x14, 0x00, 0x36, 0x00, 0x05, 0x00, 0x36, - 0x00, 0x15, 0x00, 0x36, 0x00, 0x06, 0x00, 0x36, 0x00, 0x16, - 0x00, 0x36, 0x00, 0x07, 0x00, 0x36, 0x00, 0x17, 0x00, 0x36, - 0x00, 0x08, 0x00, 0x36, 0x00, 0x18, 0x00, 0x36, 0x00, 0x09, - 0x00, 0x36, 0x00, 0x19, 0x00, 0x36, 0x00, 0x0a, 0x00, 0x36, - 0x00, 0x1a, 0x00, 0x36, 0x00, 0x0b, 0x00, 0x36, 0x00, 0x1b, - 0x00, 0x36, 0x00, 0x0c, 0x00, 0x36, 0x00, 0x1c, 0x00, 0x36, - 0x00, 0x0d, 0x00, 0x36, 0x00, 0x1d, 0x00, 0x36, 0x00, 0x0e, - 0x00, 0x36, 0x00, 0x1e, 0x00, 0x36, 0x00, 0x0f, 0x00, 0x36, - 0x00, 0x1f, 0x00, 0x36, 0x00, 0x10, 0x00, 0x36, 0x00, 0x20, - 0x00, 0x36, 0x00, 0x11, 0x00, 0x36, 0x00, 0x21, 0x00, 0x36, - 0x00, 0x12, 0x00, 0x36, 0x00, 0x22, 0x00, 0xff, 0xff, -}; -const byte MMCHAR_11[] = { - 0x03, 0xff, 0xff, 0xff, 0xff, 0x3d, 0x00, 0xff, 0xff, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x55, 0x45, 0x00, 0x01, 0x00, - 0xff, 0x45, 0x00, 0x02, 0x00, 0x45, 0x00, 0x00, 0x00, 0xff, - 0xff, -}; -const byte MMCHAR_12[] = { - 0x03, 0xff, 0xff, 0xff, 0xff, 0x3e, 0x00, 0xff, 0xff, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x4f, 0x40, 0x00, 0x01, 0x00, - 0xff, 0x40, 0x00, 0x02, 0x00, 0x40, 0x00, 0x00, 0x00, 0xff, - 0xff, -}; -const byte MMCHAR_13[] = { - 0x00, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x46, 0x00, 0x02, - 0x00, 0x80, 0x00, 0xf7, 0x00, 0x56, 0x46, 0x00, 0x01, 0x00, - 0xff, 0x46, 0x00, 0x03, 0x00, 0x46, 0x00, 0x00, 0x00, 0x46, - 0x00, 0x04, 0x00, 0x46, 0x00, 0x0d, 0x00, 0x46, 0x00, 0x05, - 0x00, 0x46, 0x00, 0x0e, 0x00, 0x46, 0x00, 0x06, 0x00, 0x46, - 0x00, 0x0f, 0x00, 0x46, 0x00, 0x07, 0x00, 0x46, 0x00, 0x10, - 0x00, 0x46, 0x00, 0x08, 0x00, 0x46, 0x00, 0x11, 0x00, 0x46, - 0x00, 0x09, 0x00, 0x46, 0x00, 0x12, 0x00, 0x46, 0x00, 0x0a, - 0x00, 0x46, 0x00, 0x13, 0x00, 0x46, 0x00, 0x0b, 0x00, 0x46, - 0x00, 0x14, 0x00, 0x46, 0x00, 0x0c, 0x00, 0x46, 0x00, 0x15, - 0x00, 0xff, 0xff, -}; -const byte MMCHAR_15[] = { - 0x00, 0xff, 0xff, 0xff, 0xff, 0x41, 0x00, 0xff, 0xff, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x57, 0x47, 0x00, 0x01, 0x00, - 0xff, 0xff, 0xff, 0xff, 0xff, 0x47, 0x00, 0x00, 0x00, 0x47, - 0x00, 0x02, 0x00, 0x47, 0x00, 0x05, 0x00, 0x47, 0x00, 0x03, - 0x00, 0x47, 0x00, 0x06, 0x00, 0x47, 0x00, 0x04, 0x00, 0x47, - 0x00, 0x07, 0x00, 0xff, 0xff, -}; -const byte MMCHAR_16[] = { - 0x03, 0xff, 0xff, 0xff, 0xff, 0x42, 0x00, 0xff, 0xff, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x54, 0x41, 0x00, 0x01, 0x00, - 0xff, 0x41, 0x00, 0x02, 0x00, 0x41, 0x00, 0x00, 0x00, 0xff, - 0xff, -}; -const byte MMCHAR_18[] = { - 0x02, 0x31, 0x00, 0x07, 0x00, 0x44, 0x00, 0x3c, 0x00, 0x03, - 0x00, 0x80, 0x00, 0xf7, 0x00, 0x50, 0x3c, 0x00, 0x01, 0x00, - 0xff, 0x3c, 0x00, 0x02, 0x00, 0x3c, 0x00, 0x00, 0x00, 0xff, - 0xff, -}; -const byte MMCHAR_19[] = { - 0x02, 0x31, 0x00, 0x07, 0x00, 0x45, 0x00, 0x3d, 0x00, 0x03, - 0x00, 0x80, 0x00, 0xf7, 0x00, 0x51, 0x3d, 0x00, 0x01, 0x00, - 0xff, 0x3d, 0x00, 0x02, 0x00, 0x3d, 0x00, 0x00, 0x00, 0xff, - 0xff, -}; -const byte MMCHAR_20[] = { - 0x02, 0x31, 0x00, 0x02, 0x00, 0x46, 0x00, 0x48, 0x00, 0x02, - 0x00, 0x80, 0x00, 0xf7, 0x00, 0x58, 0x48, 0x00, 0x01, 0x00, - 0xff, 0x48, 0x00, 0x03, 0x00, 0x48, 0x00, 0x00, 0x00, 0xff, - 0xff, -}; -const byte MMCHAR_21[] = { - 0x02, 0x31, 0x00, 0x07, 0x00, 0x47, 0x00, 0x3e, 0x00, 0x03, - 0x00, 0x80, 0x00, 0xf7, 0x00, 0x52, 0x3e, 0x00, 0x01, 0x00, - 0xff, 0x3e, 0x00, 0x02, 0x00, 0x3e, 0x00, 0x00, 0x00, 0xff, - 0xff, -}; -const byte MMCHAR_23[] = { - 0x02, 0x31, 0x00, 0x08, 0x00, 0x49, 0x00, 0x3f, 0x00, 0x03, - 0x00, 0x80, 0x00, 0xf7, 0x00, 0x53, 0x3f, 0x00, 0x01, 0x00, - 0xff, 0x3f, 0x00, 0x02, 0x00, 0x3f, 0x00, 0x00, 0x00, 0xff, - 0xff, -}; -const byte MMCHAR_24[] = { - 0x02, 0x32, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x47, 0x32, 0x00, 0x02, 0x00, - 0xff, 0xff, 0xff, 0xff, 0xff, 0x32, 0x00, 0x01, 0x00, 0x32, - 0x00, 0x03, 0x00, 0x32, 0x00, 0x0a, 0x00, 0x32, 0x00, 0x04, - 0x00, 0x32, 0x00, 0x0b, 0x00, 0x32, 0x00, 0x05, 0x00, 0x32, - 0x00, 0x0c, 0x00, 0x32, 0x00, 0x06, 0x00, 0x32, 0x00, 0x0d, - 0x00, 0x32, 0x00, 0x07, 0x00, 0x32, 0x00, 0x0e, 0x00, 0x32, - 0x00, 0x08, 0x00, 0x32, 0x00, 0x0f, 0x00, 0x32, 0x00, 0x09, - 0x00, 0x32, 0x00, 0x10, 0x00, 0xff, 0xff -}; -const byte MMCHAR_25[] = { - 0x02, 0x39, 0x00, 0x01, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0x39, 0x00, 0x00, 0x00, 0x39, 0x00, 0x02, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xFF, 0xFF -}; -const byte MMCHAR_26[] = { - 0x01, 0x3a, 0x00, 0x01, 0x00, 0x0a, 0x00, 0xff, 0xff, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x3a, 0x00, 0x02, 0x00, - 0xff, 0x3a, 0x00, 0x03, 0x00, 0x3a, 0x00, 0x00, 0x00, 0x42, - 0x00, 0x00, 0x00, 0x3a, 0x00, 0x04, 0x00, 0x42, 0x00, 0x01, - 0x00, 0x3a, 0x00, 0x05, 0x00, 0x42, 0x00, 0x02, 0x00, 0x3a, - 0x00, 0x06, 0x00, 0x42, 0x00, 0x03, 0x00, 0x3a, 0x00, 0x07, - 0x00, 0x42, 0x00, 0x04, 0x00, 0x3a, 0x00, 0x08, 0x00, 0x42, - 0x00, 0x05, 0x00, 0x3a, 0x00, 0x09, 0x00, 0x42, 0x00, 0x06, - 0x00, 0x3a, 0x00, 0x0a, 0x00, 0x42, 0x00, 0x07, 0x00, 0x3a, - 0x00, 0x0b, 0x00, 0x42, 0x00, 0x08, 0x00, 0x3a, 0x00, 0x0c, - 0x00, 0x42, 0x00, 0x09, 0x00, 0x3a, 0x00, 0x0d, 0x00, 0x42, - 0x00, 0x0a, 0x00, 0x3a, 0x00, 0x0e, 0x00, 0x42, 0x00, 0x0b, - 0x00, 0x3a, 0x00, 0x0f, 0x00, 0x42, 0x00, 0x0c, 0x00, 0x3a, - 0x00, 0x10, 0x00, 0x42, 0x00, 0x0d, 0x00, 0x3a, 0x00, 0x11, - 0x00, 0x42, 0x00, 0x0e, 0x00, 0x3a, 0x00, 0x12, 0x00, 0x42, - 0x00, 0x0f, 0x00, 0x3a, 0x00, 0x13, 0x00, 0x42, 0x00, 0x10, - 0x00, 0x3a, 0x00, 0x14, 0x00, 0x42, 0x00, 0x11, 0x00, 0x3a, - 0x00, 0x15, 0x00, 0xff, 0xff -}; -const byte MMCHAR_27[] = { - 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x58, 0x49, 0x00, 0x01, 0x00, - 0xff, 0xff, 0xff, 0xff, 0xff, 0x49, 0x00, 0x00, 0x00, 0x49, - 0x00, 0x02, 0x00, 0x49, 0x00, 0x0a, 0x00, 0x49, 0x00, 0x03, - 0x00, 0x49, 0x00, 0x0b, 0x00, 0x49, 0x00, 0x04, 0x00, 0x49, - 0x00, 0x0c, 0x00, 0x49, 0x00, 0x05, 0x00, 0x49, 0x00, 0x0d, - 0x00, 0x49, 0x00, 0x06, 0x00, 0x49, 0x00, 0x0e, 0x00, 0x49, - 0x00, 0x07, 0x00, 0x49, 0x00, 0x0f, 0x00, 0x49, 0x00, 0x08, - 0x00, 0x49, 0x00, 0x10, 0x00, 0x49, 0x00, 0x09, 0x00, 0x49, - 0x00, 0x11, 0x00, 0xff, 0xff, -}; - -// HACK: MMCHAR_0 has been used to replace the missing CHAR: 1, 14, 17 and 22 -const byte *const CHARTBL_MM[] = { - MMCHAR_0, MMCHAR_0, MMCHAR_2, MMCHAR_3, MMCHAR_4, - MMCHAR_5, MMCHAR_6, MMCHAR_7, MMCHAR_8, MMCHAR_9, - MMCHAR_10, MMCHAR_11, MMCHAR_12, MMCHAR_13, MMCHAR_0, - MMCHAR_15, MMCHAR_16, MMCHAR_0, MMCHAR_18, MMCHAR_19, - MMCHAR_20, MMCHAR_21, MMCHAR_0, MMCHAR_23, MMCHAR_24, - MMCHAR_25, MMCHAR_26, MMCHAR_27 -}; - const int SIDEOFFR[] = { 4, 0, 7, 10, 3, 1, 2, 13, 0, 0, 0, 0 }; const int SIDEOFFL[] = { 11, 6, 1, 4, 10, 6, 1, 4, 0, 0, 0, 0 }; const int SIDEOFFU[] = { 1, 2, 0, 2, 2, 1, 1, 0, 0, 0, 0, 0 }; @@ -765,7 +80,7 @@ const char *const TRAVDATA[] = { "COOPER BRADBURY", nullptr }; -const char *const _askTBL[] = { +const char *const ASK_TBL[] = { "NONE", "MARSHALL ALEXANDER", "TERRAFORM CORP.", "COLLIER STANTON", "ROCKWELL BACHE", "JOCQUES SPARROW", "NORA DESMOND ALEXANDER", "GALACTIC PICTURES", "LAWRENCE BARKLEY", "TMS", "MAC MALDEN", "STANTON EXPEDITION", "LOWELL PERCIVAL", "CHANTAL VARGAS", "RICK LOGAN", @@ -783,33 +98,6 @@ byte HELP[] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; -const byte DEATH_SCREENS[] = { - 5, 5, 3, 3, 7, 4, 6, 2, 2, 2, 1, 5, 3, 5, 2, 8, 5, 3, 8, 5 -}; - -const char *const DEATHMESSAGE[] = { - "A VICIOUS THUG PULLS OUT HIS GUN AND AIR CONDITIONS YOUR BRAIN.", - "BIG DICK COMES BACK AND ANNOUNCES YOUR TIME IS UP. ONE OF HIS BOYS PROCEEDS TO PART YOUR EYEBROWS.", - "ALTHOUGH HIS FIRST SHOT MISSED, THE PUNK FINDS YOU AND TURNS YOU INTO A DOUGHNUT.", - "THE CREEP SPOTS YOU. HE TURNS AND FIRES HIS WEAPON. IT BURNS A HOLE A BUZZARD CAN FLY THROUGH.", - "OBVIOUSLY RICK LOGAN HAS A FEW TRICK UP HIS SLEEVE. A TREMENDOUS WEIGHT HITS YOUR HEAD. YOU MUMBLE; WATCH OUT FOR THAT TREE...", - "SLOWLY SINKING IN THE SLIMY OOZE, YOU THINK OF SEVERAL JELLO WRESTLING MATCHES YOU'VE ATTENDED. BUT NO MORE...", - "THE PATH SUDDENLY GIVES WAY AND YOU FEEL MANY STAKES TEAR THROUGH YOUR FLESH. HOW DO YOU LIKE YOUR STAKE", - "THE SNAKE SINKS ITS FANGS INTO YOU LEG. THE POISON WORKS QUICKLY. THE SNAKE THEN SWALLOWS YOU WHOLE.", - "YOU FADE AWAY, GLOWING LIKE A LIGHTBULB.", - "YOU TOUCH THE BUBBLING RADIOACTIVE SELTZER. IT IMMEDIATELY CAUSES VITAL ORGANS TO ELONGATE AND EXPLODE. YOU DIE WITH AN ABSURD AND FOOLISH LOOK ON YOUR FACE.", - "THE DOGS PRETTY HUNGRY. IT WON'T TAKE HIM LONG TO FINISH SO SIT BACK AND ENJOY IT.", - "ROCKY DOESN'T LIKE BEING FOLLOWED. HE DECIDES TO BEAT YOU. WITHIN AND INCH OF YOUR LIFE. UNFORTUNATELY, HE MISJUDGED THE DISTANCE", - "YOU STUMBLE INTO DEADLY LASER FIRE.", - "THE OUTPOST AND YOUR BODY PARTS ARE BLOWN TO KINGDOM COME.", - "YOU REACH THE TOP, BUT YOUR AIR SOON RUNS OUT LEAVING YOU BREATHLESS.", - "YOU DIE IN THE FIERY EXPLOSION.", - "YOU FALL HUNDREDS OF FEET TO YOUR DEATH.", - "YOU WALK ONTO A PRESSURE SENSITIVE SECURITY PAD. A LASER ZEROS IN AND BLOWS A HOLE THE SIZE OF A SUBARU TIRE THROUGH YOU.", - "DANGERFIELD'S EXPERIMENT BACKFIRES. IT RELEASES A DEMON FROM HIS SUBCONSCIOUS WHICH DESTROYS THE ENTIRE PLANET.", - "ONCE DANGERFIELD GETS OUT OF HIS CHAMBER, HE PULLS OUT A WEAPON AND LETS YOU HAVE IT." -}; - const char *const SPEC7MESSAGE = { "THOMAS DANGERFIELD'S MAD EXPERIMENT OF ATTEMPTING TO HARNESS THE STONE'S POWER, ENDED HIS LIFE. DANGERFIELD WAS A DECENT HUMAN " \ "BEING ONCE, BUT WAS DRIVEN INSANE BY HIS QUEST FOR THE ULTIMATE POWER. ALEXIS AND I DECIDE THAT DEACON HAWKE IS THE ONLY " \ diff --git a/engines/access/martian/martian_resources.h b/engines/access/martian/martian_resources.h index 2eb810ac80..46cf6a71c1 100644 --- a/engines/access/martian/martian_resources.h +++ b/engines/access/martian/martian_resources.h @@ -24,31 +24,17 @@ #define ACCESS_MARTIAN_RESOURCES_H #include "common/scummsys.h" +#include "access/resources.h" namespace Access { namespace Martian { -extern const char *const FILENAMES[]; - extern const int SIDEOFFR[]; extern const int SIDEOFFL[]; extern const int SIDEOFFU[]; extern const int SIDEOFFD[]; -extern const byte *const CURSORS[4]; - -extern const int _travelPos[][2]; - -extern const int INVENTORY_SIZE; -extern const char *const INVENTORY_NAMES[]; - -extern const byte *const ROOM_TABLE[]; -extern const char *const ROOM_DESCR[]; -extern const int ROOM_NUMB; - -extern const byte *const CHARTBL_MM[]; - extern const int SIDEOFFR[]; extern const int SIDEOFFL[]; extern const int SIDEOFFU[]; @@ -60,16 +46,24 @@ extern const byte ICON_PALETTE[]; extern const int RMOUSE[10][2]; extern byte HELP[]; -extern const char *const _askTBL[]; +extern const char *const ASK_TBL[]; extern const char *const TRAVDATA[]; -extern const byte DEATH_SCREENS[]; -extern const char *const DEATHMESSAGE[]; extern const char *const SPEC7MESSAGE; extern const byte _byte1EEB5[]; extern const int PICTURERANGE[][2]; +class MartianResources : public Resources { +public: + +public: + MartianResources(AccessEngine *vm) : Resources(vm) {} + virtual ~MartianResources() {} +}; + +#define MMRES (*((Martian::MartianResources *)_vm->_res)) + } // End of namespace Martian } // End of namespace Access diff --git a/engines/access/martian/martian_room.cpp b/engines/access/martian/martian_room.cpp index d5b03db246..0b8b4a842a 100644 --- a/engines/access/martian/martian_room.cpp +++ b/engines/access/martian/martian_room.cpp @@ -39,7 +39,7 @@ MartianRoom::~MartianRoom() { } void MartianRoom::loadRoom(int roomNumber) { - loadRoomData(ROOM_TABLE[roomNumber]); + loadRoomData(&MMRES.ROOMTBL[roomNumber]._data[0]); } void MartianRoom::reloadRoom() { diff --git a/engines/access/module.mk b/engines/access/module.mk index f7cf7f2261..cccb603d31 100644 --- a/engines/access/module.mk +++ b/engines/access/module.mk @@ -21,6 +21,7 @@ MODULE_OBJS := \ scripts.o \ sound.o \ video.o \ + video/movie_decoder.o \ amazon/amazon_game.o \ amazon/amazon_logic.o \ amazon/amazon_player.o \ diff --git a/engines/access/resources.cpp b/engines/access/resources.cpp index 8699a4a82f..096fb15b35 100644 --- a/engines/access/resources.cpp +++ b/engines/access/resources.cpp @@ -22,9 +22,140 @@ #include "access/resources.h" #include "access/access.h" +#include "access/amazon/amazon_resources.h" +#include "access/martian/martian_resources.h" namespace Access { +Resources *Resources::init(AccessEngine *vm) { + if (vm->getGameID() == GType_Amazon) + return new Amazon::AmazonResources(vm); + else if (vm->getGameID() == GType_MartianMemorandum) + return new Martian::MartianResources(vm); + + error("Unknown game"); +} + +bool Resources::load(Common::String &errorMessage) { + Common::File f; + if (!f.open("access.dat")) { + errorMessage = "Could not locate required access.dat file"; + return false; + } + + // Check for the magic identifier + char buffer[4]; + f.read(buffer, 4); + if (strncmp(buffer, "SVMA", 4)) { + errorMessage = "Located access.dat file had invalid contents"; + return false; + } + + // Validate the version number + uint expectedVersion = 1; + uint version = f.readUint16LE(); + if (version != expectedVersion) { + errorMessage = Common::String::format( + "Incorrect version of access.dat found. Expected %d but got %d", + expectedVersion, version); + return false; + } + + // Load in the index + uint count = f.readUint16LE(); + _datIndex.resize(count); + for (uint idx = 0; idx < _datIndex.size(); ++idx) { + _datIndex[idx]._gameId = f.readByte(); + _datIndex[idx]._discType = f.readByte(); + _datIndex[idx]._demoType = f.readByte(); + _datIndex[idx]._language = (Common::Language)f.readByte(); + _datIndex[idx]._fileOffset = f.readUint32LE(); + } + + // Load in the data for the game + load(f); + + return true; +} + +void Resources::load(Common::SeekableReadStream &s) { + uint count; + + // Get the offset of the data for the game + uint entryOffset = findEntry(_vm->getGameID(), _vm->isCD() ? 1 : 0, + _vm->isDemo() ? 1 : 0, _vm->getLanguage()); + s.seek(entryOffset); + + // Load filename list + count = s.readUint16LE(); + FILENAMES.resize(count); + for (uint idx = 0; idx < count; ++idx) + FILENAMES[idx] = readString(s); + + // Load the character data + count = s.readUint16LE(); + CHARTBL.resize(count); + for (uint idx = 0; idx < count; ++idx) { + uint count2 = s.readUint16LE(); + CHARTBL[idx].resize(count2); + if (count2 > 0) + s.read(&CHARTBL[idx][0], count2); + } + + // Load the room data + count = s.readUint16LE(); + ROOMTBL.resize(count); + for (uint idx = 0; idx < count; ++idx) { + ROOMTBL[idx]._desc = readString(s); + ROOMTBL[idx]._travelPos.x = s.readSint16LE(); + ROOMTBL[idx]._travelPos.y = s.readSint16LE(); + uint count2 = s.readUint16LE(); + ROOMTBL[idx]._data.resize(count2); + if (count2 > 0) + s.read(&ROOMTBL[idx]._data[0], count2); + } + + // Load the deaths list + count = s.readUint16LE(); + DEATHS.resize(count); + for (uint idx = 0; idx < count; ++idx) { + DEATHS[idx]._screenId = s.readByte(); + DEATHS[idx]._msg = readString(s); + } + + // Load in the inventory list + count = s.readUint16LE(); + INVENTORY.resize(count); + for (uint idx = 0; idx < count; ++idx) { + INVENTORY[idx]._desc = readString(s); + for (uint idx2 = 0; idx2 < 4; ++idx2) + INVENTORY[idx]._combo[idx2] = s.readSint16LE(); + } +} + +uint Resources::findEntry(byte gameId, byte discType, byte demoType, Common::Language language) { + for (uint idx = 0; idx < _datIndex.size(); ++idx) { + DATEntry &de = _datIndex[idx]; + if (de._gameId == gameId && de._discType == discType && + de._demoType == demoType && de._language == language) + return de._fileOffset; + } + + error("Could not locate appropriate access.dat entry"); +} + +Common::String Resources::readString(Common::SeekableReadStream &s) { + Common::String result; + char c; + + while ((c = s.readByte()) != 0) + result += c; + + return result; +} + +/*------------------------------------------------------------------------*/ + const byte INITIAL_PALETTE[18 * 3] = { 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, @@ -49,14 +180,14 @@ const byte INITIAL_PALETTE[18 * 3] = { const char *const GENERAL_MESSAGES[] = { "LOOKING THERE REVEALS NOTHING OF INTEREST.", // LOOK_MESSAGE "THAT DOESN'T OPEN.", // OPEN_MESSAGE - "THAT WON'T MOVE." // MOVE_MESSAGE + "THAT WON'T MOVE.", // MOVE_MESSAGE "YOU CAN'T TAKE THAT.", // GET_MESSAGE "THAT DOESN'T SEEM TO WORK.", // USE_MESSAGE "YOU CAN'T CLIMB THAT.", // GO_MESSAGE "THERE SEEMS TO BE NO RESPONSE.", // TALK_MESSAGE "THIS OBJECT REQUIRES NO HINTS", // HELP_MESSAGE "THIS OBJECT REQUIRES NO HINTS", // HELP_MESSAGE - "THAT DOESN'T SEEM TO WORK.", // USE_MESSAGE + "THAT DOESN'T SEEM TO WORK." // USE_MESSAGE }; const int INVCOORDS[][4] = { diff --git a/engines/access/resources.h b/engines/access/resources.h index 07b8e5ada9..bb5c3f9f61 100644 --- a/engines/access/resources.h +++ b/engines/access/resources.h @@ -24,6 +24,11 @@ #define ACCESS_RESOURCES_H #include "common/scummsys.h" +#include "common/array.h" +#include "common/language.h" +#include "common/rect.h" +#include "common/str-array.h" +#include "common/stream.h" namespace Access { @@ -33,6 +38,66 @@ extern const char *const GENERAL_MESSAGES[]; extern const int INVCOORDS[][4]; +class AccessEngine; + +class Resources { + struct DATEntry { + byte _gameId; + byte _discType; + byte _demoType; + Common::Language _language; + uint _fileOffset; + }; + struct RoomEntry { + Common::String _desc; + Common::Point _travelPos; + Common::Array<byte> _data; + }; + struct DeathEntry { + byte _screenId; + Common::String _msg; + }; + struct InventoryEntry { + Common::String _desc; + int _combo[4]; + }; +protected: + AccessEngine *_vm; + Common::Array<DATEntry> _datIndex; + + /** + * Locate a specified entry in the index and return it's file offset + */ + uint findEntry(byte gameId, byte discType, byte demoType, Common::Language language); + + /** + * Read a string in from the passed stream + */ + Common::String readString(Common::SeekableReadStream &s); + + /** + * Load data from the access.dat file + */ + virtual void load(Common::SeekableReadStream &s); +public: + Common::StringArray FILENAMES; + Common::Array< Common::Array<byte> > CHARTBL; + Common::Array<RoomEntry> ROOMTBL; + Common::Array<DeathEntry> DEATHS; + Common::Array<InventoryEntry> INVENTORY; + Common::Array< Common::Array<byte> > CURSORS; + Common::String CANT_GET_THERE; +public: + Resources(AccessEngine *vm) : _vm(vm) {} + virtual ~Resources() {} + static Resources *init(AccessEngine *vm); + + /** + * Load the access.dat file + */ + bool load(Common::String &errorMessage); +}; + } // End of namespace Access #endif /* ACCESS_RESOURCES_H */ diff --git a/engines/access/room.cpp b/engines/access/room.cpp index c91b37c65d..a41de63bf6 100644 --- a/engines/access/room.cpp +++ b/engines/access/room.cpp @@ -111,8 +111,7 @@ void Room::takePicture() { return; } - // TODO: simplify the second part of the test when tested - if ((_vm->_scrollCol < 35) || ((_vm->_scrollRow >= 10) && (_vm->_scrollRow >= 20))){ + if ((_vm->_scrollCol < 35) || (_vm->_scrollRow >= 20)){ Common::String msg = "THAT ISN'T INTERESTING ENOUGH TO WASTE FILM ON."; _vm->_scripts->doCmdPrint_v1(msg); return; @@ -143,7 +142,7 @@ void Room::takePicture() { _vm->_player->_roomNumber = 7; _vm->_room->_function = FN_CLEAR1; return; - } else if (result >= 0) + } else if (result >= 0) _vm->_player->_move = (Direction)(result + 1); _vm->_player->_scrollFlag = false; @@ -173,12 +172,14 @@ void Room::doRoom() { reloadFlag = false; _vm->_startup = 8; _function = FN_NONE; + _vm->_screen->_fadeIn = false; while (!_vm->shouldQuit()) { _vm->_images.clear(); - if (_vm->_startup != -1 && --_vm->_startup == 0) { + if (_vm->_screen->_fadeIn) { _vm->_events->showCursor(); _vm->_screen->fadeIn(); + _vm->_screen->_fadeIn = false; } // Poll for events @@ -397,6 +398,7 @@ void Room::setWallCodes() { _vm->_player->_rawXTemp = _vm->_player->_rawPlayer.x; _vm->_player->_rawYTemp = _vm->_player->_rawPlayer.y; + codeWalls(); } void Room::buildScreen() { @@ -612,6 +614,7 @@ void Room::handleCommand(int commandId) { void Room::executeCommand(int commandId) { EventsManager &events = *_vm->_events; + Screen &screen = *_vm->_screen; _selectCommand = commandId; if (_vm->getGameID() == GType_MartianMemorandum) { @@ -698,8 +701,8 @@ void Room::executeCommand(int commandId) { break; } } - _vm->_screen->saveScreen(); - _vm->_screen->setDisplayScan(); + screen.saveScreen(); + screen.setDisplayScan(); // Get the toolbar icons resource Resource *iconData = _vm->_files->loadFile("ICONS.LZ"); @@ -707,9 +710,13 @@ void Room::executeCommand(int commandId) { delete iconData; // Draw the button as selected - _vm->_screen->plotImage(spr, _selectCommand + 2, + screen.plotImage(spr, 0, Common::Point(0, 177)); + screen.plotImage(spr, 1, Common::Point(143, 177)); + screen.plotImage(spr, _selectCommand + 2, Common::Point(_rMouse[_selectCommand][0], (_vm->getGameID() == GType_MartianMemorandum) ? 184 : 176)); + delete spr; + _vm->_screen->restoreScreen(); _vm->_boxSelect = true; } @@ -928,16 +935,9 @@ RoomInfo::RoomInfo(const byte *data, int gameType, bool isCD, bool isDemo) { _roomFlag = stream.readByte(); - if (gameType == GType_Amazon) { - if (isCD) - _estIndex = stream.readSint16LE(); - else { - _estIndex = -1; - if (!isDemo) - stream.readSint16LE(); - } - } else - _estIndex = -1; + _estIndex = -1; + if (gameType == GType_Amazon && isCD) + _estIndex = stream.readSint16LE(); _musicFile.load(stream); _scaleH1 = stream.readByte(); diff --git a/engines/access/screen.cpp b/engines/access/screen.cpp index 41f6194238..2d29ad0718 100644 --- a/engines/access/screen.cpp +++ b/engines/access/screen.cpp @@ -62,14 +62,13 @@ Screen::Screen(AccessEngine *vm) : _vm(vm) { _startCycle = 0; _cycleStart = 0; _endCycle = 0; + _fadeIn = false; } void Screen::clearScreen() { clearBuffer(); if (_vesaMode) _vm->_clearSummaryFlag = true; - - addDirtyRect(Common::Rect(0, 0, this->w, this->h)); } void Screen::setDisplayScan() { @@ -88,22 +87,14 @@ void Screen::setPanel(int num) { _msVirtualOffset = _virtualOffsetsTable[num]; } -void Screen::updateScreen() { - // Merge the dirty rects - mergeDirtyRects(); - - // Loop through copying dirty areas to the physical screen - Common::List<Common::Rect>::iterator i; - for (i = _dirtyRects.begin(); i != _dirtyRects.end(); ++i) { - const Common::Rect &r = *i; - const byte *srcP = (const byte *)getBasePtr(r.left, r.top); - g_system->copyRectToScreen(srcP, this->pitch, r.left, r.top, - r.width(), r.height()); +void Screen::update() { + if (_vm->_startup >= 0) { + if (--_vm->_startup == -1) + _fadeIn = true; + return; } - - // Signal the physical screen to update - g_system->updateScreen(); - _dirtyRects.clear(); + markAllDirty();//****DEBUG**** + Graphics::Screen::update(); } void Screen::setInitialPalettte() { @@ -146,7 +137,7 @@ void Screen::loadRawPalette(Common::SeekableReadStream *stream) { void Screen::updatePalette() { g_system->getPaletteManager()->setPalette(&_tempPalette[0], 0, PALETTE_COUNT); - updateScreen(); + update(); } void Screen::savePalette() { @@ -181,7 +172,7 @@ void Screen::forceFadeOut() { int v = *srcP; if (v) { repeatFlag = true; - *srcP = MAX(*srcP - FADE_AMOUNT, 0); + *srcP = MAX((int)*srcP - FADE_AMOUNT, 0); } } @@ -262,7 +253,7 @@ void Screen::restoreScreen() { _screenYOff = _screenSave._screenYOff; } -void Screen::copyBlock(ASurface *src, const Common::Rect &bounds) { +void Screen::copyBlock(BaseSurface *src, const Common::Rect &bounds) { Common::Rect destBounds = bounds; destBounds.translate(_windowXAdd, _windowYAdd + _screenYOff); @@ -273,37 +264,22 @@ void Screen::copyBlock(ASurface *src, const Common::Rect &bounds) { void Screen::restoreBlock() { if (!_savedBounds.isEmpty()) addDirtyRect(_savedBounds); - ASurface::restoreBlock(); + BaseSurface::restoreBlock(); } void Screen::drawRect() { addDirtyRect(Common::Rect(_orgX1, _orgY1, _orgX2, _orgY2)); - ASurface::drawRect(); + BaseSurface::drawRect(); } void Screen::drawBox() { addDirtyRect(Common::Rect(_orgX1, _orgY1, _orgX2, _orgY2)); - ASurface::drawBox(); -} - -void Screen::transBlitFrom(ASurface *src, const Common::Point &destPos) { - addDirtyRect(Common::Rect(destPos.x, destPos.y, destPos.x + src->w, destPos.y + src->h)); - ASurface::transBlitFrom(src, destPos); + BaseSurface::drawBox(); } -void Screen::transBlitFrom(ASurface *src, const Common::Rect &bounds) { - addDirtyRect(bounds); - ASurface::transBlitFrom(src, bounds); -} - -void Screen::blitFrom(Graphics::Surface &src) { - addDirtyRect(Common::Rect(0, 0, src.w, src.h)); - ASurface::blitFrom(src); -} - -void Screen::copyBuffer(Graphics::Surface *src) { +void Screen::copyBuffer(Graphics::ManagedSurface *src) { addDirtyRect(Common::Rect(0, 0, src->w, src->h)); - ASurface::copyBuffer(src); + BaseSurface::copyBuffer(src); } void Screen::setPaletteCycle(int startCycle, int endCycle, int timer) { @@ -342,51 +318,7 @@ void Screen::cyclePaletteBackwards() { } void Screen::flashPalette(int count) { - warning("TODO: Implement flashPalette"); -} - -void Screen::addDirtyRect(const Common::Rect &r) { - _dirtyRects.push_back(r); - assert(r.isValidRect() && r.width() > 0 && r.height() > 0); + // No implementation needed in ScummVM } -void Screen::mergeDirtyRects() { - Common::List<Common::Rect>::iterator rOuter, rInner; - - // Ensure dirty rect list has at least two entries - rOuter = _dirtyRects.begin(); - for (int i = 0; i < 2; ++i, ++rOuter) { - if (rOuter == _dirtyRects.end()) - return; - } - - // Process the dirty rect list to find any rects to merge - for (rOuter = _dirtyRects.begin(); rOuter != _dirtyRects.end(); ++rOuter) { - rInner = rOuter; - while (++rInner != _dirtyRects.end()) { - - if ((*rOuter).intersects(*rInner)) { - // these two rectangles overlap or - // are next to each other - merge them - - unionRectangle(*rOuter, *rOuter, *rInner); - - // remove the inner rect from the list - _dirtyRects.erase(rInner); - - // move back to beginning of list - rInner = rOuter; - } - } - } -} - -bool Screen::unionRectangle(Common::Rect &destRect, const Common::Rect &src1, const Common::Rect &src2) { - destRect = src1; - destRect.extend(src2); - - return !destRect.isEmpty(); -} - - } // End of namespace Access diff --git a/engines/access/screen.h b/engines/access/screen.h index 52485e5c7c..1c1932511d 100644 --- a/engines/access/screen.h +++ b/engines/access/screen.h @@ -26,15 +26,13 @@ #include "common/scummsys.h" #include "common/rect.h" #include "common/stream.h" +#include "graphics/screen.h" #include "access/asurface.h" namespace Access { class AccessEngine; -#define PALETTE_COUNT 256 -#define PALETTE_SIZE (256 * 3) - struct ScreenSave { int _clipWidth; int _clipHeight; @@ -47,7 +45,7 @@ struct ScreenSave { int _screenYOff; }; -class Screen : public ASurface { +class Screen : public BaseSurface { private: AccessEngine *_vm; byte _tempPalette[PALETTE_SIZE]; @@ -66,10 +64,6 @@ private: Common::List<Common::Rect> _dirtyRects; void updatePalette(); - - void mergeDirtyRects(); - - bool unionRectangle(Common::Rect &destRect, const Common::Rect &src1, const Common::Rect &src2); public: int _vesaMode; int _startColor, _numColors; @@ -85,8 +79,14 @@ public: int _bufferBytesWide; int _vWindowLinesTall; bool _screenChangeFlag; + bool _fadeIn; public: - virtual void copyBlock(ASurface *src, const Common::Rect &bounds); + /** + * Updates the screen + */ + virtual void update(); + + virtual void copyBlock(BaseSurface *src, const Common::Rect &bounds); virtual void restoreBlock(); @@ -94,15 +94,7 @@ public: virtual void drawBox(); - virtual void transBlitFrom(ASurface *src, const Common::Point &destPos); - - virtual void transBlitFrom(ASurface *src, const Common::Rect &bounds); - - virtual void blitFrom(Graphics::Surface &src); - - virtual void copyBuffer(Graphics::Surface *src); - - virtual void addDirtyRect(const Common::Rect &r); + virtual void copyBuffer(Graphics::ManagedSurface *src); public: Screen(AccessEngine *vm); @@ -113,11 +105,6 @@ public: void setPanel(int num); /** - * Update the underlying screen - */ - void updateScreen(); - - /** * Fade out screen */ void forceFadeOut(); diff --git a/engines/access/scripts.cpp b/engines/access/scripts.cpp index 41dd5cc0d0..38313640f1 100644 --- a/engines/access/scripts.cpp +++ b/engines/access/scripts.cpp @@ -164,7 +164,7 @@ void Scripts::charLoop() { _sequence = 2000; searchForSequence(); _vm->_images.clear(); - _vm->_buffer2.blitFrom(_vm->_buffer1); + _vm->_buffer2.copyBlock(&_vm->_buffer1, Common::Rect(0, 0, _vm->_buffer2.w, _vm->_buffer2.h)); _vm->_newRects.clear(); executeScript(); @@ -536,6 +536,7 @@ void Scripts::cmdDispInv_v1() { void Scripts::cmdDispInv_v2() { _vm->_inventory->newDisplayInv(); + _vm->_events->forceSetCursor(CURSOR_ARROW); } void Scripts::cmdSetAbout() { @@ -689,19 +690,20 @@ void Scripts::cmdDoTravel() { int idx = _vm->_travelBox->_tempListIdx[boxX]; if (Martian::_byte1EEB5[idx] != _vm->_byte26CB5) { _vm->_bubbleBox->_bubbleTitle = "_travel"; - _vm->_bubbleBox->printString("YOU CAN'T GET THERE FROM HERE."); + _vm->_bubbleBox->printString(_vm->_res->CANT_GET_THERE); continue; } if (_vm->_player->_roomNumber != idx) { _vm->_player->_roomNumber = idx; _vm->_room->_function = FN_CLEAR1; - if (Martian::_travelPos[idx][0] == -1) { + if (_vm->_res->ROOMTBL[idx]._travelPos.x == -1) { + // For x == -1, the y value is a script Id, not a co-ordinate _vm->_player->_roomNumber = idx; _vm->_room->_conFlag = true; - _vm->_scripts->converse1(Martian::_travelPos[idx][1]); + _vm->_scripts->converse1(_vm->_res->ROOMTBL[idx]._travelPos.y); return; } - _vm->_player->_rawPlayer = Common::Point(Martian::_travelPos[idx][0], Martian::_travelPos[idx][1]); + _vm->_player->_rawPlayer = _vm->_res->ROOMTBL[idx]._travelPos; cmdRetPos(); return; } @@ -769,6 +771,11 @@ void Scripts::cmdSpecial() { if (_specialFunction == 1) { _vm->_screen->restorePalette(); _vm->_room->_function = FN_RELOAD; + + // WORKAROUND: This fixes scene establishment being re-shown + // when restoring savegames in rooms which have one + if (_vm->getGameID() == GType_Amazon && !_vm->isCD()) + _vm->_establishTable[p2] = true; } } @@ -998,10 +1005,7 @@ void Scripts::cmdFreeSound() { } while (!_vm->shouldQuit() && sound.isSFXPlaying()); // Free the sounds - while (sound._soundTable.size() > 0) { - delete sound._soundTable[0]._res; - sound._soundTable.remove_at(0); - } + sound.freeSounds(); } } @@ -1033,7 +1037,7 @@ void Scripts::cmdPrintWatch() { } void Scripts::cmdDispAbout() { - _vm->_travelBox->getList(Martian::_askTBL, _vm->_ask); + _vm->_travelBox->getList(Martian::ASK_TBL, _vm->_ask); int btnSelected = 0; int boxX = _vm->_aboutBox->doBox_v1(_vm->_startAboutItem, _vm->_startAboutBox, btnSelected); _vm->_startAboutItem = _vm->_boxDataStart; diff --git a/engines/access/scripts.h b/engines/access/scripts.h index 07fd6acfb1..4cfedf3b3f 100644 --- a/engines/access/scripts.h +++ b/engines/access/scripts.h @@ -39,13 +39,13 @@ typedef void(Scripts::*ScriptMethodPtr)(); class Scripts : public Manager { private: - Resource *_resource; int _specialFunction; void clearWatch(); void printWatch(); protected: + Resource *_resource; Common::SeekableReadStream *_data; ScriptMethodPtr COMMAND_LIST[100]; diff --git a/engines/access/sound.cpp b/engines/access/sound.cpp index 51ffb88f37..cf52bc58c5 100644 --- a/engines/access/sound.cpp +++ b/engines/access/sound.cpp @@ -20,9 +20,11 @@ * */ -#include "common/algorithm.h" #include "common/config-manager.h" #include "audio/mixer.h" +#include "audio/audiostream.h" +#include "audio/mididrv.h" +#include "audio/midiparser.h" #include "audio/decoders/raw.h" #include "audio/decoders/wave.h" // Miles Audio @@ -33,10 +35,12 @@ namespace Access { SoundManager::SoundManager(AccessEngine *vm, Audio::Mixer *mixer) : _vm(vm), _mixer(mixer) { + _effectsHandle = new Audio::SoundHandle(); } SoundManager::~SoundManager() { clearSounds(); + delete _effectsHandle; } void SoundManager::clearSounds() { @@ -47,15 +51,24 @@ void SoundManager::clearSounds() { _soundTable.clear(); - if (_mixer->isSoundHandleActive(_effectsHandle)) - _mixer->stopHandle(_effectsHandle); + if (_mixer->isSoundHandleActive(*_effectsHandle)) + _mixer->stopHandle(*_effectsHandle); while (_queue.size()) { - delete _queue[0]; + delete _queue[0]._stream; _queue.remove_at(0); } } +bool SoundManager::isSoundQueued(int soundId) const { + for (uint idx = 0; idx < _queue.size(); ++idx) { + if (_queue[idx]._soundId == soundId) + return true; + } + + return false; +} + void SoundManager::loadSoundTable(int idx, int fileNum, int subfile, int priority) { debugC(1, kDebugSound, "loadSoundTable(%d, %d, %d)", idx, fileNum, subfile); @@ -77,12 +90,15 @@ Resource *SoundManager::loadSound(int fileNum, int subfile) { void SoundManager::playSound(int soundIndex, bool loop) { debugC(1, kDebugSound, "playSound(%d, %d)", soundIndex, loop); + if (isSoundQueued(soundIndex)) + // Prevent duplicate copies of a sound from being queued + return; int priority = _soundTable[soundIndex]._priority; - playSound(_soundTable[soundIndex]._res, priority, loop); + playSound(_soundTable[soundIndex]._res, priority, loop, soundIndex); } -void SoundManager::playSound(Resource *res, int priority, bool loop) { +void SoundManager::playSound(Resource *res, int priority, bool loop, int soundIndex) { debugC(1, kDebugSound, "playSound"); byte *resourceData = res->data(); @@ -109,7 +125,7 @@ void SoundManager::playSound(Resource *res, int priority, bool loop) { byte internalSampleRate = resourceData[5]; int sampleSize = READ_LE_UINT16(resourceData + 7); - assert( (sampleSize + 32) == res->_size); + assert( (sampleSize + 32) <= res->_size); int sampleRate = 0; switch (internalSampleRate) { @@ -139,34 +155,35 @@ void SoundManager::playSound(Resource *res, int priority, bool loop) { error("Unknown format"); if (loop) { - _queue.push_back(new Audio::LoopingAudioStream(audioStream, 0, DisposeAfterUse::NO)); + _queue.push_back(QueuedSound(new Audio::LoopingAudioStream(audioStream, 0, + DisposeAfterUse::NO), soundIndex)); } else { - _queue.push_back(audioStream); + _queue.push_back(QueuedSound(audioStream, soundIndex)); } - if (!_mixer->isSoundHandleActive(_effectsHandle)) - _mixer->playStream(Audio::Mixer::kSFXSoundType, &_effectsHandle, - _queue[0], -1, _mixer->kMaxChannelVolume, 0, + if (!_mixer->isSoundHandleActive(*_effectsHandle)) + _mixer->playStream(Audio::Mixer::kSFXSoundType, _effectsHandle, + _queue[0]._stream, -1, _mixer->kMaxChannelVolume, 0, DisposeAfterUse::NO); } void SoundManager::checkSoundQueue() { debugC(5, kDebugSound, "checkSoundQueue"); - if (_queue.empty() || _mixer->isSoundHandleActive(_effectsHandle)) + if (_queue.empty() || _mixer->isSoundHandleActive(*_effectsHandle)) return; - delete _queue[0]; + delete _queue[0]._stream; _queue.remove_at(0); - if (_queue.size() && _queue[0]) - _mixer->playStream(Audio::Mixer::kSFXSoundType, &_effectsHandle, - _queue[0], -1, _mixer->kMaxChannelVolume, 0, + if (_queue.size() && _queue[0]._stream) + _mixer->playStream(Audio::Mixer::kSFXSoundType, _effectsHandle, + _queue[0]._stream, -1, _mixer->kMaxChannelVolume, 0, DisposeAfterUse::NO); } bool SoundManager::isSFXPlaying() { - return _mixer->isSoundHandleActive(_effectsHandle); + return _mixer->isSoundHandleActive(*_effectsHandle); } void SoundManager::loadSounds(Common::Array<RoomInfo::SoundIdent> &sounds) { @@ -183,7 +200,7 @@ void SoundManager::loadSounds(Common::Array<RoomInfo::SoundIdent> &sounds) { void SoundManager::stopSound() { debugC(3, kDebugSound, "stopSound"); - _mixer->stopHandle(_effectsHandle); + _mixer->stopHandle(*_effectsHandle); } void SoundManager::freeSounds() { @@ -213,7 +230,7 @@ MusicManager::MusicManager(AccessEngine *vm) : _vm(vm) { // switch (musicType) { case MT_ADLIB: { - if (_vm->getGameID() == GType_Amazon) { + if (_vm->getGameID() == GType_Amazon && !_vm->isDemo()) { Resource *midiDrvResource = _vm->_files->loadFile(92, 1); Common::MemoryReadStream *adLibInstrumentStream = new Common::MemoryReadStream(midiDrvResource->data(), midiDrvResource->_size); diff --git a/engines/access/sound.h b/engines/access/sound.h index e11a6b9730..d75540dd13 100644 --- a/engines/access/sound.h +++ b/engines/access/sound.h @@ -24,14 +24,16 @@ #define ACCESS_SOUND_H #include "common/scummsys.h" -#include "audio/audiostream.h" -#include "audio/mixer.h" #include "access/files.h" #include "audio/midiplayer.h" -#include "audio/midiparser.h" #define MAX_SOUNDS 20 +namespace Audio { +class AudioStream; +class SoundHandle; +} + namespace Access { class AccessEngine; @@ -45,15 +47,24 @@ struct SoundEntry { }; class SoundManager { + struct QueuedSound { + Audio::AudioStream *_stream; + int _soundId; + + QueuedSound() : _stream(nullptr), _soundId(-1) {} + QueuedSound(Audio::AudioStream *stream, int soundId) : _stream(stream), _soundId(soundId) {} + }; private: AccessEngine *_vm; Audio::Mixer *_mixer; - Audio::SoundHandle _effectsHandle; - Common::Array<Audio::AudioStream *> _queue; + Audio::SoundHandle *_effectsHandle; + Common::Array<QueuedSound> _queue; void clearSounds(); - void playSound(Resource *res, int priority, bool loop); + void playSound(Resource *res, int priority, bool loop, int soundIndex = -1); + + bool isSoundQueued(int soundId) const; public: Common::Array<SoundEntry> _soundTable; bool _playingSound; diff --git a/engines/access/video.cpp b/engines/access/video.cpp index 5fc5f6762c..22842a5855 100644 --- a/engines/access/video.cpp +++ b/engines/access/video.cpp @@ -48,7 +48,7 @@ VideoPlayer::~VideoPlayer() { closeVideo(); } -void VideoPlayer::setVideo(ASurface *vidSurface, const Common::Point &pt, int rate) { +void VideoPlayer::setVideo(BaseSurface *vidSurface, const Common::Point &pt, int rate) { _vidSurface = vidSurface; vidSurface->_orgX1 = pt.x; vidSurface->_orgY1 = pt.y; @@ -87,14 +87,14 @@ void VideoPlayer::setVideo(ASurface *vidSurface, const Common::Point &pt, int ra _videoEnd = false; } -void VideoPlayer::setVideo(ASurface *vidSurface, const Common::Point &pt, const Common::String filename, int rate) { +void VideoPlayer::setVideo(BaseSurface *vidSurface, const Common::Point &pt, const Common::String filename, int rate) { // Open up video stream _videoData = _vm->_files->loadFile(filename); setVideo(vidSurface, pt, rate); } -void VideoPlayer::setVideo(ASurface *vidSurface, const Common::Point &pt, const FileIdent &videoFile, int rate) { +void VideoPlayer::setVideo(BaseSurface *vidSurface, const Common::Point &pt, const FileIdent &videoFile, int rate) { // Open up video stream _videoData = _vm->_files->loadFile(videoFile); @@ -157,7 +157,7 @@ void VideoPlayer::playVideo() { // If the video is playing on the screen surface, add a dirty rect if (_vidSurface == _vm->_screen) - _vm->_screen->addDirtyRect(_videoBounds); + _vm->_screen->markAllDirty(); getFrame(); if (++_videoFrame == _frameCount) { diff --git a/engines/access/video.h b/engines/access/video.h index 83c8995d3e..65dff3ebea 100644 --- a/engines/access/video.h +++ b/engines/access/video.h @@ -40,7 +40,7 @@ class VideoPlayer : public Manager { VideoFlags _flags; }; private: - ASurface *_vidSurface; + BaseSurface *_vidSurface; Resource *_videoData; VideoHeader _header; byte *_startCoord; @@ -51,7 +51,7 @@ private: Common::Rect _videoBounds; void getFrame(); - void setVideo(ASurface *vidSurface, const Common::Point &pt, int rate); + void setVideo(BaseSurface *vidSurface, const Common::Point &pt, int rate); public: int _videoFrame; bool _soundFlag; @@ -64,8 +64,8 @@ public: /** * Start up a video */ - void setVideo(ASurface *vidSurface, const Common::Point &pt, const FileIdent &videoFile, int rate); - void setVideo(ASurface *vidSurface, const Common::Point &pt, const Common::String filename, int rate); + void setVideo(BaseSurface *vidSurface, const Common::Point &pt, const FileIdent &videoFile, int rate); + void setVideo(BaseSurface *vidSurface, const Common::Point &pt, const Common::String filename, int rate); /** * Decodes a frame of the video diff --git a/engines/access/video/movie_decoder.cpp b/engines/access/video/movie_decoder.cpp new file mode 100644 index 0000000000..1406e549ad --- /dev/null +++ b/engines/access/video/movie_decoder.cpp @@ -0,0 +1,741 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "common/scummsys.h" +#include "common/stream.h" +#include "common/textconsole.h" + +#include "audio/audiostream.h" +#include "audio/decoders/raw.h" + +#include "access/access.h" +#include "access/video/movie_decoder.h" + +// for Test-Code +#include "common/system.h" +#include "common/events.h" +#include "common/keyboard.h" +#include "engines/engine.h" +#include "engines/util.h" +#include "graphics/palette.h" +#include "graphics/pixelformat.h" +#include "graphics/surface.h" + +namespace Access { + +AccessVIDMovieDecoder::AccessVIDMovieDecoder() + : _stream(0), _videoTrack(0), _audioTrack(0) { + _streamSeekOffset = 0; + _streamVideoIndex = 0; + _streamAudioIndex = 0; +} + +AccessVIDMovieDecoder::~AccessVIDMovieDecoder() { + close(); +} + +bool AccessVIDMovieDecoder::loadStream(Common::SeekableReadStream *stream) { + uint32 videoCodecTag = 0; + uint32 videoHeight = 0; + uint32 videoWidth = 0; + uint16 regularDelay = 0; + uint32 audioSampleRate = 0; + + close(); + + _stream = stream; + _streamSeekOffset = 15; // offset of first chunk + _streamVideoIndex = 0; + _streamAudioIndex = 0; + + // read header + // ID [dword] "VID" + // ?? [byte] + // ?? [word] + // width [word] + // height [word] + // regular delay between frames (60 per second) [word] + // ?? [word] + + videoCodecTag = _stream->readUint32BE(); + if (videoCodecTag != MKTAG('V','I','D',0x00)) { + warning("AccessVIDMoviePlay: bad codec tag, not a video file?"); + close(); + return false; + } + _stream->skip(3); + videoWidth = _stream->readUint16LE(); + videoHeight = _stream->readUint16LE(); + regularDelay = _stream->readUint16LE(); + _stream->skip(2); + + if (!regularDelay) { + warning("AccessVIDMoviePlay: delay between frames is zero?"); + close(); + return false; + } + + // create video track + _videoTrack = new StreamVideoTrack(videoWidth, videoHeight, regularDelay); + addTrack(_videoTrack); + + //warning("width %d, height %d", videoWidth, videoHeight); + + // Look through the first few packets + static const int maxPacketCheckCount = 10; + + for (int i = 0; i < maxPacketCheckCount; i++) { + byte chunkId = _stream->readByte(); + + // Bail out if done + if (_stream->eos()) + break; + + // Bail also in case end of file chunk was found + if (chunkId == kVIDMovieChunkId_EndOfFile) + break; + + uint32 chunkStartOffset = _stream->pos(); + //warning("data chunk at %x", chunkStartOffset); + + switch (chunkId) { + case kVIDMovieChunkId_FullFrame: + case kVIDMovieChunkId_FullFrameCompressed: + case kVIDMovieChunkId_PartialFrameCompressed: + case kVIDMovieChunkId_FullFrameCompressedFill: { + if (!_videoTrack->skipOverFrame(_stream, chunkId)) { + close(); + return false; + } + break; + } + + case kVIDMovieChunkId_Palette: { + if (!_videoTrack->skipOverPalette(_stream)) { + close(); + return false; + } + break; + } + + case kVIDMovieChunkId_AudioFirstChunk: + case kVIDMovieChunkId_Audio: { + // sync [word] + // sampling rate [byte] + // size of audio data [word] + // sample data [] (mono, 8-bit, unsigned) + // + // Only first chunk has sync + sampling rate + if (chunkId == kVIDMovieChunkId_AudioFirstChunk) { + byte soundblasterRate; + + _stream->skip(2); // skip over sync + soundblasterRate = _stream->readByte(); + audioSampleRate = 1000000 / (256 - soundblasterRate); + + _audioTrack = new StreamAudioTrack(audioSampleRate); + addTrack(_audioTrack); + + _stream->seek(chunkStartOffset); // seek back + } + + if (!_audioTrack) { + warning("AccessVIDMoviePlay: regular audio chunk, before audio chunk w/ header"); + close(); + return false; + } + if (!_audioTrack->skipOverAudio(_stream, chunkId)) { + close(); + return false; + } + break; + } + + default: + warning("AccessVIDMoviePlay: Unknown chunk-id '%x' inside VID movie", chunkId); + close(); + return false; + } + + // Remember this chunk inside our cache + IndexCacheEntry indexCacheEntry; + + indexCacheEntry.chunkId = chunkId; + indexCacheEntry.offset = chunkStartOffset; + + _indexCacheTable.push_back(indexCacheEntry); + + // Got an audio chunk now? -> exit b/c we are done + if (audioSampleRate) + break; + } + + // Remember offset of latest not-indexed-yet chunk + _streamSeekOffset = _stream->pos(); + + // If sample rate was found, create an audio track + if (audioSampleRate) { + _audioTrack = new StreamAudioTrack(audioSampleRate); + addTrack(_audioTrack); + } + + // Rewind back to the beginning right to the first chunk + _stream->seek(15); + + return true; +} + +void AccessVIDMovieDecoder::close() { + Video::VideoDecoder::close(); + + delete _stream; _stream = 0; + _videoTrack = 0; + + _indexCacheTable.clear(); +} + +// We try to at least decode 1 frame +// and also try to get at least 0.5 seconds of audio queued up +void AccessVIDMovieDecoder::readNextPacket() { + uint32 currentMovieTime = getTime(); + uint32 wantedAudioQueued = currentMovieTime + 500; // always try to be 0.500 seconds in front of movie time + + uint32 streamIndex = 0; + IndexCacheEntry indexEntry; + bool currentlySeeking = false; + + bool videoDone = false; + bool audioDone = false; + + // Seek to smallest stream offset + if ((_streamVideoIndex <= _streamAudioIndex) || (!_audioTrack)) { + streamIndex = _streamVideoIndex; + } else { + streamIndex = _streamAudioIndex; + } + + if (_audioTrack) { + if (wantedAudioQueued <= _audioTrack->getTotalAudioQueued()) { + // already got enough audio queued up + audioDone = true; + } + } else { + // no audio track, audio is always done + audioDone = true; + } + + while (1) { + // Check, if stream-index is already cached + if (streamIndex < _indexCacheTable.size()) { + indexEntry.chunkId = _indexCacheTable[streamIndex].chunkId; + indexEntry.offset = _indexCacheTable[streamIndex].offset; + currentlySeeking = false; + + } else { + // read from file + _stream->seek(_streamSeekOffset); + indexEntry.chunkId = _stream->readByte(); + indexEntry.offset = _stream->pos(); + currentlySeeking = true; + + // and store that as well + _indexCacheTable.push_back(indexEntry); + } + + // end of stream -> exit + if (_stream->eos()) + break; + + // end of file chunk -> exit + if (indexEntry.chunkId == kVIDMovieChunkId_EndOfFile) + break; + +// warning("chunk %x", indexEntry.chunkId); + + switch (indexEntry.chunkId) { + case kVIDMovieChunkId_FullFrame: + case kVIDMovieChunkId_FullFrameCompressed: + case kVIDMovieChunkId_PartialFrameCompressed: + case kVIDMovieChunkId_FullFrameCompressedFill: { + if ((_streamVideoIndex <= streamIndex) && (!videoDone)) { + // We are at an index, that is still relevant for video decoding + // and we are not done with video yet + if (!currentlySeeking) { + // seek to stream position in case we used the cache + _stream->seek(indexEntry.offset); + } + //warning("video decode chunk %x at %lx", indexEntry.chunkId, _stream->pos()); + _videoTrack->decodeFrame(_stream, indexEntry.chunkId); + videoDone = true; + _streamVideoIndex = streamIndex + 1; + } else { + if (currentlySeeking) { + // currently seeking, so we have to skip the frame bytes manually + _videoTrack->skipOverFrame(_stream, indexEntry.chunkId); + } + } + break; + } + + case kVIDMovieChunkId_Palette: { + if ((_streamVideoIndex <= streamIndex) && (!videoDone)) { + // We are at an index, that is still relevant for video decoding + // and we are not done with video yet + if (!currentlySeeking) { + // seek to stream position in case we used the cache + _stream->seek(indexEntry.offset); + } + _videoTrack->decodePalette(_stream); + _streamVideoIndex = streamIndex + 1; + } else { + if (currentlySeeking) { + // currently seeking, so we have to skip the frame bytes manually + _videoTrack->skipOverPalette(_stream); + } + } + break; + } + + case kVIDMovieChunkId_AudioFirstChunk: + case kVIDMovieChunkId_Audio: { + if ((_streamAudioIndex <= streamIndex) && (!audioDone)) { + // We are at an index that is still relevant for audio decoding + if (!currentlySeeking) { + // seek to stream position in case we used the cache + _stream->seek(indexEntry.offset); + } + _audioTrack->queueAudio(_stream, indexEntry.chunkId); + _streamAudioIndex = streamIndex + 1; + + if (wantedAudioQueued <= _audioTrack->getTotalAudioQueued()) { + // Got enough audio + audioDone = true; + } + } else { + if (!_audioTrack) { + error("AccessVIDMoviePlay: audio chunks found without audio track active"); + } + if (currentlySeeking) { + // currently seeking, so we have to skip the audio bytes manually + _audioTrack->skipOverAudio(_stream, indexEntry.chunkId); + } + } + break; + } + + default: + error("AccessVIDMoviePlay: Unknown chunk-id '%x' inside VID movie", indexEntry.chunkId); + } + + if (currentlySeeking) { + // remember currently stream offset in case we are seeking + _streamSeekOffset = _stream->pos(); + } + + // go to next index + streamIndex++; + + if ((videoDone) && (audioDone)) { + return; + } + } + + if (!videoDone) { + // no more video frames? set end of video track + _videoTrack->setEndOfTrack(); + } +} + +AccessVIDMovieDecoder::StreamVideoTrack::StreamVideoTrack(uint32 width, uint32 height, uint16 regularFrameDelay) { + _width = width; + _height = height; + _regularFrameDelay = regularFrameDelay; + _curFrame = -1; + _nextFrameStartTime = 0; + _endOfTrack = false; + _dirtyPalette = false; + + memset(&_palette, 0, sizeof(_palette)); + + _surface = new Graphics::Surface(); + _surface->create(_width, _height, Graphics::PixelFormat::createFormatCLUT8()); +} + +AccessVIDMovieDecoder::StreamVideoTrack::~StreamVideoTrack() { + delete _surface; +} + +bool AccessVIDMovieDecoder::StreamVideoTrack::endOfTrack() const { + return _endOfTrack; +} + +Graphics::PixelFormat AccessVIDMovieDecoder::StreamVideoTrack::getPixelFormat() const { + return _surface->format; +} + +void AccessVIDMovieDecoder::StreamVideoTrack::decodeFrame(Common::SeekableReadStream *stream, byte chunkId) { + byte *framePixelsPtr = (byte *)_surface->getPixels(); + byte *pixelsPtr = framePixelsPtr; + byte rleByte = 0; + uint16 additionalDelay = 0; + int32 expectedPixels = 0; + + switch (chunkId) { + case kVIDMovieChunkId_FullFrame: { + // Full frame is: + // data [width * height] + additionalDelay = stream->readUint16LE(); + stream->read(framePixelsPtr, _width * _height); + break; + } + + case kVIDMovieChunkId_FullFrameCompressed: + case kVIDMovieChunkId_PartialFrameCompressed: { + // Skip manually over compressed data + // Full frame compressed is: + // additional delay [word] + // REPEAT: + // RLE [byte] + // RLE upper bit set: skip over RLE & 0x7F pixels + // RLE upper bit not set: draw RLE amount of pixels (those pixels follow right after RLE byte) + // + // Partial frame compressed is: + // sync [word] + // horizontal start position [word] + // REPEAT: + // see full frame compressed + uint16 horizontalStartPosition = 0; + + additionalDelay = stream->readUint16LE(); + + if (chunkId == kVIDMovieChunkId_PartialFrameCompressed) { + horizontalStartPosition = stream->readUint16LE(); + if (horizontalStartPosition >= _height) { + error("AccessVIDMoviePlay: starting position larger than height during partial frame compressed, data corrupt?"); + return; + } + } + + expectedPixels = _width * (_height - horizontalStartPosition); + + // adjust frame destination pointer + pixelsPtr += (horizontalStartPosition * _width); + + while (expectedPixels >= 0) { + rleByte = stream->readByte(); + if (!rleByte) // NUL means end of stream + break; + + if (rleByte & 0x80) { + rleByte = rleByte & 0x7F; + expectedPixels -= rleByte; + } else { + // skip over pixels + expectedPixels -= rleByte; + stream->read(pixelsPtr, rleByte); // read pixel data into frame + } + pixelsPtr += rleByte; + } + // expectedPixels may be positive here in case stream got terminated with a NUL + if (expectedPixels < 0) { + error("AccessVIDMoviePlay: pixel count mismatch during full/partial frame compressed, data corrupt?"); + } + break; + } + + case kVIDMovieChunkId_FullFrameCompressedFill: { + // Full frame compressed fill is: + // additional delay [word] + // REPEAT: + // RLE [byte] + // RLE upper bit set: draw RLE amount (& 0x7F) of pixels with specified color (color byte follows after RLE byte) + // RLE upper bit not set: draw RLE amount of pixels (those pixels follow right after RLE byte) + additionalDelay = stream->readUint16LE(); + expectedPixels = _width * _height; + + while (expectedPixels > 0) { + rleByte = stream->readByte(); + + if (rleByte & 0x80) { + rleByte = rleByte & 0x7F; + expectedPixels -= rleByte; + + byte fillColor = stream->readByte(); + memset(pixelsPtr, fillColor, rleByte); + } else { + // skip over pixels + expectedPixels -= rleByte; + stream->read(pixelsPtr, rleByte); // read pixel data into frame + } + pixelsPtr += rleByte; + } + if (expectedPixels < 0) { + error("AccessVIDMoviePlay: pixel count mismatch during full frame compressed fill, data corrupt?"); + } + break; + } + default: + assert(0); + break; + } + + _curFrame++; + + // TODO: not sure, if additionalDelay is supposed to affect the follow-up frame or the current frame + // the videos, that I found, don't have it set + uint32 currentFrameStartTime = getNextFrameStartTime(); + uint32 nextFrameStartTime = (_regularFrameDelay * _curFrame) * 1000 / 60; + if (additionalDelay) { + nextFrameStartTime += additionalDelay * 1000 / 60; + } + assert(currentFrameStartTime <= nextFrameStartTime); + setNextFrameStartTime(nextFrameStartTime); +} + +bool AccessVIDMovieDecoder::StreamVideoTrack::skipOverFrame(Common::SeekableReadStream *stream, byte chunkId) { + byte rleByte = 0; + int32 expectedPixels = 0; + + switch (chunkId) { + case kVIDMovieChunkId_FullFrame: { + // Full frame is: + // additional delay [word] + // data [width * height] + stream->skip(2); + stream->skip(_width * _height); + break; + } + + case kVIDMovieChunkId_FullFrameCompressed: + case kVIDMovieChunkId_PartialFrameCompressed: { + // Skip manually over compressed data + // Full frame compressed is: + // additional delay [word] + // REPEAT: + // RLE [byte] + // RLE upper bit set: skip over RLE & 0x7F pixels + // RLE upper bit not set: draw RLE amount of pixels (those pixels follow right after RLE byte) + // + // Partial frame compressed is: + // sync [word] + // horizontal start position [word] + // REPEAT: + // see full frame compressed + uint16 horizontalStartPosition = 0; + + stream->skip(2); + + if (chunkId == kVIDMovieChunkId_PartialFrameCompressed) { + horizontalStartPosition = stream->readUint16LE(); + if (horizontalStartPosition >= _height) { + warning("AccessVIDMoviePlay: starting position larger than height during partial frame compressed, data corrupt?"); + return false; + } + } + + expectedPixels = _width * (_height - horizontalStartPosition); + + while (expectedPixels >= 0) { + rleByte = stream->readByte(); + if (!rleByte) // NUL means end of stream + break; + + if (rleByte & 0x80) { + expectedPixels -= rleByte & 0x7F; + } else { + // skip over pixels + expectedPixels -= rleByte; + stream->skip(rleByte); // skip over pixel data + } + } + // expectedPixels may be positive here in case stream got terminated with a NUL + if (expectedPixels < 0) { + warning("AccessVIDMoviePlay: pixel count mismatch during full/partial frame compressed, data corrupt?"); + return false; + } + break; + } + + case kVIDMovieChunkId_FullFrameCompressedFill: { + // Full frame compressed fill is: + // additional delay [word] + // REPEAT: + // RLE [byte] + // RLE upper bit set: draw RLE amount (& 0x7F) of pixels with specified color (color byte follows after RLE byte) + // RLE upper bit not set: draw RLE amount of pixels (those pixels follow right after RLE byte) + stream->skip(2); + expectedPixels = _width * _height; + + while (expectedPixels > 0) { + rleByte = stream->readByte(); + + if (rleByte & 0x80) { + expectedPixels -= rleByte & 0x7F; + stream->skip(1); + } else { + // skip over pixels + expectedPixels -= rleByte; + stream->skip(rleByte); // skip over pixel data + } + } + if (expectedPixels < 0) { + warning("AccessVIDMoviePlay: pixel count mismatch during full frame compressed fill, data corrupt?"); + return false; + } + break; + } + default: + assert(0); + break; + } + return true; +} + +bool AccessVIDMovieDecoder::StreamVideoTrack::skipOverPalette(Common::SeekableReadStream *stream) { + stream->skip(0x300); // 3 bytes per color, 256 colors + return true; +} + +void AccessVIDMovieDecoder::StreamVideoTrack::decodePalette(Common::SeekableReadStream *stream) { + byte red, green, blue; + assert(stream); + + // VID files use a 6-bit palette and not a 8-bit one, we change it to 8-bit + for (uint16 curColor = 0; curColor < 256; curColor++) { + red = stream->readByte() & 0x3F; + green = stream->readByte() & 0x3F; + blue = stream->readByte() & 0x3F; + _palette[curColor * 3] = (red << 2) | (red >> 4); + _palette[curColor * 3 + 1] = (green << 2) | (green >> 4); + _palette[curColor * 3 + 2] = (blue << 2) | (blue >> 4); + } + + _dirtyPalette = true; +} + +const byte *AccessVIDMovieDecoder::StreamVideoTrack::getPalette() const { + _dirtyPalette = false; + return _palette; +} + +bool AccessVIDMovieDecoder::StreamVideoTrack::hasDirtyPalette() const { + return _dirtyPalette; +} + +AccessVIDMovieDecoder::StreamAudioTrack::StreamAudioTrack(uint32 sampleRate) { + _totalAudioQueued = 0; // currently 0 milliseconds queued + + _sampleRate = sampleRate; + _stereo = false; // always mono + + _audioStream = Audio::makeQueuingAudioStream(sampleRate, _stereo); +} + +AccessVIDMovieDecoder::StreamAudioTrack::~StreamAudioTrack() { + delete _audioStream; +} + +void AccessVIDMovieDecoder::StreamAudioTrack::queueAudio(Common::SeekableReadStream *stream, byte chunkId) { + Common::SeekableReadStream *rawAudioStream = 0; + Audio::RewindableAudioStream *audioStream = 0; + uint32 audioLengthMSecs = 0; + + if (chunkId == kVIDMovieChunkId_AudioFirstChunk) { + stream->skip(3); // skip over additional delay + sample rate + } + + uint32 audioSize = stream->readUint16LE(); + + // Read the specified chunk into memory + rawAudioStream = stream->readStream(audioSize); + audioLengthMSecs = audioSize * 1000 / _sampleRate; // 1 byte == 1 8-bit sample + + audioStream = Audio::makeRawStream(rawAudioStream, _sampleRate, Audio::FLAG_UNSIGNED | Audio::FLAG_LITTLE_ENDIAN, DisposeAfterUse::YES); + if (audioStream) { + _totalAudioQueued += audioLengthMSecs; + _audioStream->queueAudioStream(audioStream, DisposeAfterUse::YES); + } else { + // in case there was an error + delete rawAudioStream; + } +} + +bool AccessVIDMovieDecoder::StreamAudioTrack::skipOverAudio(Common::SeekableReadStream *stream, byte chunkId) { + if (chunkId == kVIDMovieChunkId_AudioFirstChunk) { + stream->skip(3); // skip over additional delay + sample rate + } + uint32 audioSize = stream->readUint16LE(); + stream->skip(audioSize); + return true; +} + +Audio::AudioStream *AccessVIDMovieDecoder::StreamAudioTrack::getAudioStream() const { + return _audioStream; +} + +bool AccessEngine::playMovie(const Common::String &filename, const Common::Point &pos) { + AccessVIDMovieDecoder *videoDecoder = new AccessVIDMovieDecoder(); + + Common::Point framePos(pos.x, pos.y); + + if (!videoDecoder->loadFile(filename)) { + warning("AccessVIDMoviePlay: could not open '%s'", filename.c_str()); + return false; + } + + bool skipVideo = false; + + _events->clearEvents(); + videoDecoder->start(); + + while (!shouldQuit() && !videoDecoder->endOfVideo() && !skipVideo) { + if (videoDecoder->needsUpdate()) { + const Graphics::Surface *frame = videoDecoder->decodeNextFrame(); + + if (frame) { + _screen->blitFrom(*frame); + + if (videoDecoder->hasDirtyPalette()) { + const byte *palette = videoDecoder->getPalette(); + g_system->getPaletteManager()->setPalette(palette, 0, 256); + } + + _screen->update(); + } + } + + _events->pollEventsAndWait(); + + Common::KeyState keyState; + if (_events->getKey(keyState)) { + if (keyState.keycode == Common::KEYCODE_ESCAPE) + skipVideo = true; + } + } + + videoDecoder->close(); + delete videoDecoder; + + return !skipVideo; +} + +} // End of namespace Access diff --git a/engines/access/video/movie_decoder.h b/engines/access/video/movie_decoder.h new file mode 100644 index 0000000000..8b5d94836b --- /dev/null +++ b/engines/access/video/movie_decoder.h @@ -0,0 +1,152 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef ACCESS_VIDEO_MOVIE_DECODER_H +#define ACCESS_VIDEO_MOVIE_DECODER_H + +#include "video/video_decoder.h" +#include "audio/audiostream.h" + +namespace Common { +class SeekableReadStream; +} + +namespace Image { +class Codec; +} + +namespace Access { + +enum kDebugLevels { + kVIDMovieChunkId_FullFrame = 0x00, + kVIDMovieChunkId_FullFrameCompressed = 0x01, + kVIDMovieChunkId_Palette = 0x02, + kVIDMovieChunkId_FullFrameCompressedFill = 0x03, + kVIDMovieChunkId_PartialFrameCompressed = 0x04, + kVIDMovieChunkId_EndOfFile = 0x14, + kVIDMovieChunkId_AudioFirstChunk = 0x7C, + kVIDMovieChunkId_Audio = 0x7D +}; + +// This video format is used in at least the following Access engine games: +// - Noctropolis +// - Synnergist + +class AccessVIDMovieDecoder : public Video::VideoDecoder { +public: + AccessVIDMovieDecoder(); + ~AccessVIDMovieDecoder(); + + bool loadStream(Common::SeekableReadStream *stream); + void close(); + +protected: + void readNextPacket(); + +private: + bool streamSkipFullFrameCompressedFill(); + +private: + int32 _streamSeekOffset; /* current stream offset, pointing to not-yet-indexed stream position */ + uint32 _streamVideoIndex; /* current stream index for video decoding */ + uint32 _streamAudioIndex; /* current stream index for audio decoding */ + + struct IndexCacheEntry { + byte chunkId; + int32 offset; + }; + + Common::Array<IndexCacheEntry> _indexCacheTable; + +private: + class StreamVideoTrack : public VideoTrack { + public: + StreamVideoTrack(uint32 width, uint32 height, uint16 regularFrameDelay); + ~StreamVideoTrack(); + + bool endOfTrack() const; + + uint16 getWidth() const { return _width; } + uint16 getHeight() const { return _height; } + Graphics::PixelFormat getPixelFormat() const; + int getCurFrame() const { return _curFrame; } + void setNextFrameStartTime(uint32 nextFrameStartTime) { _nextFrameStartTime = nextFrameStartTime; } + uint32 getNextFrameStartTime() const { return _nextFrameStartTime; } + const Graphics::Surface *decodeNextFrame() { return _surface; } + + const byte *getPalette() const; + bool hasDirtyPalette() const; + + void decodePalette(Common::SeekableReadStream *stream); + void decodeFrame(Common::SeekableReadStream *stream, byte chunkId); + bool skipOverFrame(Common::SeekableReadStream *stream, byte chunkId); + bool skipOverPalette(Common::SeekableReadStream *stream); + + void setEndOfTrack() { _endOfTrack = true; } + + private: + Graphics::Surface *_surface; + + int _curFrame; + uint32 _nextFrameStartTime; + + byte _palette[3 * 256]; + mutable bool _dirtyPalette; + uint16 _width, _height; + + uint16 _regularFrameDelay; // delay between frames (1 = 1/60 of a second) + bool _endOfTrack; + }; + + class StreamAudioTrack : public AudioTrack { + public: + StreamAudioTrack(uint32 sampleRate); + ~StreamAudioTrack(); + + void queueAudio(Common::SeekableReadStream *stream, byte chunkId); + bool skipOverAudio(Common::SeekableReadStream *stream, byte chunkId); + + protected: + Audio::AudioStream *getAudioStream() const; + + private: + Audio::QueuingAudioStream *_audioStream; + uint32 _totalAudioQueued; /* total amount of milliseconds of audio, that we queued up already */ + + public: + uint32 getTotalAudioQueued() const { return _totalAudioQueued; } + + private: + int16 decodeSample(uint8 dataNibble); + + uint16 _sampleRate; + bool _stereo; + }; + + Common::SeekableReadStream *_stream; + StreamVideoTrack *_videoTrack; + StreamAudioTrack *_audioTrack; +}; + +} // End of namespace Access + +#endif |