diff options
Diffstat (limited to 'engines/scumm')
48 files changed, 1578 insertions, 1765 deletions
diff --git a/engines/scumm/actor.cpp b/engines/scumm/actor.cpp index 187a45b836..38517c1d69 100644 --- a/engines/scumm/actor.cpp +++ b/engines/scumm/actor.cpp @@ -523,7 +523,7 @@ void Actor_v2::walkActor() { if (_moving & MF_TURN) { new_dir = updateActorDirection(false); - // FIXME -- is this correct? + // FIXME: is this correct? if (_facing != new_dir) setDirection(new_dir); else @@ -670,7 +670,7 @@ int Actor::remapDirection(int dir, bool is_walking) { bool flipX; bool flipY; - // FIXME - It seems that at least in The Dig the original code does + // FIXME: It seems that at least in The Dig the original code does // check _ignoreBoxes here. However, it breaks some animations in Loom, // causing Bobbin to face towards the camera instead of away from it // in some places: After the tree has been destroyed by lightning, and @@ -1446,7 +1446,7 @@ void Actor::drawActorCostume(bool hitTestMode) { bcr->_actorX *= V12_X_MULTIPLIER; bcr->_actorY *= V12_Y_MULTIPLIER; } - bcr->_actorX -= _vm->virtscr[0].xstart; + bcr->_actorX -= _vm->_virtscr[kMainVirtScreen].xstart; if (_vm->_game.platform == Common::kPlatformNES) { // In the NES version, when the actor is facing right, @@ -1532,7 +1532,7 @@ void Actor::drawActorCostume(bool hitTestMode) { _heNoTalkAnimation = 0; // If the actor is partially hidden, redraw it next frame. - if (bcr->drawCostume(_vm->virtscr[0], _vm->_gdi->_numStrips, this, _drawToBackBuf) & 1) { + if (bcr->drawCostume(_vm->_virtscr[kMainVirtScreen], _vm->_gdi->_numStrips, this, _drawToBackBuf) & 1) { _needRedraw = (_vm->_game.version <= 6); } @@ -1902,7 +1902,7 @@ void ScummEngine::actorTalk(const byte *msg) { convertMessageToString(msg, _charsetBuffer, sizeof(_charsetBuffer)); - // FIXME: Workaround for bugs #770039 and #770049 + // WORKAROUND for bugs #770039 and #770049 if (_game.id == GID_LOOM) { if (!*_charsetBuffer) return; @@ -2325,7 +2325,7 @@ void ScummEngine_v71he::postProcessAuxQueue() { int y = (int16)READ_LE_UINT16(axfd + 4) + dy; int w = (int16)READ_LE_UINT16(axfd + 6); int h = (int16)READ_LE_UINT16(axfd + 8); - VirtScreen *pvs = &virtscr[kMainVirtScreen]; + VirtScreen *pvs = &_virtscr[kMainVirtScreen]; uint8 *dst1 = pvs->getPixels(0, pvs->topline); uint8 *dst2 = pvs->getBackPixels(0, pvs->topline); switch (comp) { diff --git a/engines/scumm/akos.cpp b/engines/scumm/akos.cpp index c8667d7ab2..86a19540d6 100644 --- a/engines/scumm/akos.cpp +++ b/engines/scumm/akos.cpp @@ -546,7 +546,7 @@ void AkosRenderer::codec1_genericDecode(Codec1 &v1) { scaleytab = &v1.scaletable[v1.scaleYindex]; maskbit = revBitMask(v1.x & 7); - mask = _vm->getMaskBuffer(v1.x - (_vm->virtscr[0].xstart & 7), v1.y, _zbuf); + mask = _vm->getMaskBuffer(v1.x - (_vm->_virtscr[kMainVirtScreen].xstart & 7), v1.y, _zbuf); if (len) goto StartPos; @@ -610,17 +610,13 @@ void AkosRenderer::codec1_genericDecode(Codec1 &v1) { skip_column = true; v1.scaleXindex += v1.scaleXstep; dst = v1.destptr; - mask = _vm->getMaskBuffer(v1.x - (_vm->virtscr[0].xstart & 7), v1.y, _zbuf); + mask = _vm->getMaskBuffer(v1.x - (_vm->_virtscr[kMainVirtScreen].xstart & 7), v1.y, _zbuf); } StartPos:; } while (--len); } while (1); } -#ifdef PALMOS_68K -const byte *bigCostumeScaleTable; -const byte *smallCostumeScaleTableAKOS; -#else // This is exact duplicate of smallCostumeScaleTable[] in costume.cpp // See FIXME below for explanation const byte smallCostumeScaleTableAKOS[256] = { @@ -757,7 +753,6 @@ const byte bigCostumeScaleTable[768] = { 0x0F, 0x8F, 0x4F, 0xCF, 0x2F, 0xAF, 0x6F, 0xEF, 0x1F, 0x9F, 0x5F, 0xDF, 0x3F, 0xBF, 0x7F, 0xFF, }; -#endif byte AkosRenderer::codec1(int xmoveCur, int ymoveCur) { int num_colors; @@ -987,8 +982,8 @@ byte AkosRenderer::codec1(int xmoveCur, int ymoveCur) { } void AkosRenderer::markRectAsDirty(Common::Rect rect) { - rect.left -= _vm->virtscr[0].xstart & 7; - rect.right -= _vm->virtscr[0].xstart & 7; + rect.left -= _vm->_virtscr[kMainVirtScreen].xstart & 7; + rect.right -= _vm->_virtscr[kMainVirtScreen].xstart & 7; _vm->markRectAsDirty(kMainVirtScreen, rect, _actorID); } @@ -1862,18 +1857,3 @@ void ScummEngine_v7::akos_processQueue() { #endif } // End of namespace Scumm - -#ifdef PALMOS_68K -#include "scumm_globals.h" - -_GINIT(Akos) -_GSETPTR(Scumm::bigCostumeScaleTable, GBVARS_BIGSCALETABLE_INDEX, byte, GBVARS_SCUMM) -//_GSETPTR(Scumm::smallCostumeScaleTableAKOS, GBVARS_SMALLSCALETABLEAKOS_INDEX, byte, GBVARS_SCUMM) -_GEND - -_GRELEASE(Akos) -_GRELEASEPTR(GBVARS_BIGSCALETABLE_INDEX, GBVARS_SCUMM) -//_GRELEASEPTR(GBVARS_SMALLSCALETABLEAKOS_INDEX, GBVARS_SCUMM) -_GEND - -#endif diff --git a/engines/scumm/base-costume.cpp b/engines/scumm/base-costume.cpp index 8886dbfcd4..fe87dc65ec 100644 --- a/engines/scumm/base-costume.cpp +++ b/engines/scumm/base-costume.cpp @@ -39,9 +39,9 @@ byte BaseCostumeRenderer::drawCostume(const VirtScreen &vs, int numStrips, const else _out.pixels = vs.getPixels(0, 0); - _actorX += _vm->virtscr[0].xstart & 7; + _actorX += _vm->_virtscr[kMainVirtScreen].xstart & 7; _out.w = _out.pitch; - _out.pixels = (byte *)_out.pixels - (_vm->virtscr[0].xstart & 7); + _out.pixels = (byte *)_out.pixels - (_vm->_virtscr[kMainVirtScreen].xstart & 7); _numStrips = numStrips; diff --git a/engines/scumm/base-costume.h b/engines/scumm/base-costume.h index 155bbff97f..7acaff2679 100644 --- a/engines/scumm/base-costume.h +++ b/engines/scumm/base-costume.h @@ -42,15 +42,8 @@ struct CostumeInfo { #include "common/pack-end.h" // END STRUCT PACKING - -#ifdef PALMOS_68K -extern const byte *smallCostumeScaleTable; -extern const byte *bigCostumeScaleTable; -#else extern const byte smallCostumeScaleTable[256]; extern const byte bigCostumeScaleTable[768]; -#endif - class Actor; diff --git a/engines/scumm/camera.cpp b/engines/scumm/camera.cpp index d6ecc715ea..ea6ac9b528 100644 --- a/engines/scumm/camera.cpp +++ b/engines/scumm/camera.cpp @@ -199,7 +199,7 @@ void ScummEngine::cameraMoved() { screenLeft = _screenStartStrip * 8; } - virtscr[0].xstart = screenLeft; + _virtscr[kMainVirtScreen].xstart = screenLeft; } void ScummEngine::panCameraTo(int x, int y) { diff --git a/engines/scumm/charset.cpp b/engines/scumm/charset.cpp index 2271bf53a1..6eb6cfd7c6 100644 --- a/engines/scumm/charset.cpp +++ b/engines/scumm/charset.cpp @@ -50,10 +50,7 @@ void ScummEngine::loadCJKFont() { _useCJKMode = false; _textSurfaceMultiplier = 1; - if (_game.platform == Common::kPlatformSegaCD) - return; - - if (_language == Common::JA_JPN && _game.version <= 5) { // FM-TOWNS v3 / v5 Kanji + if (_game.version <= 5 && _game.platform == Common::kPlatformFMTowns && _language == Common::JA_JPN) { // FM-TOWNS v3 / v5 Kanji int numChar = 256 * 32; _2byteWidth = 16; _2byteHeight = 16; @@ -66,7 +63,7 @@ void ScummEngine::loadCJKFont() { fp.close(); } _textSurfaceMultiplier = 2; - } else if (_language == Common::KO_KOR || _language == Common::JA_JPN || _language == Common::ZH_TWN) { + } else if (_game.version >= 7 && (_language == Common::KO_KOR || _language == Common::JA_JPN || _language == Common::ZH_TWN)) { int numChar = 0; const char *fontFile = NULL; @@ -77,7 +74,7 @@ void ScummEngine::loadCJKFont() { break; case Common::JA_JPN: fontFile = (_game.id == GID_DIG) ? "kanji16.fnt" : "japanese.fnt"; - numChar = 1024; //FIXME + numChar = 1024; //FIXME: sev needs japanese font files to clarify font size break; case Common::ZH_TWN: if (_game.id == GID_CMI) { @@ -501,13 +498,6 @@ void CharsetRenderer::addLinebreaks(int a, byte *str, int pos, int maxwidth) { setCurID(oldID); } -#ifdef PALMOS_68K -static const byte *englishCharsetDataV2; -static const byte *germanCharsetDataV2; -static const byte *frenchCharsetDataV2; -static const byte *italianCharsetDataV2; -static const byte *spanishCharsetDataV2; -#else // English Zak font static const byte englishCharsetDataV2[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -1168,7 +1158,6 @@ static const byte spanishCharsetDataV2[] = { 0x1c, 0x36, 0x36, 0x7c, 0x66, 0x66, 0x7c, 0x40, 0x08, 0x0c, 0x0e, 0xff, 0xff, 0x0e, 0x0c, 0x08, }; -#endif CharsetRendererV2::CharsetRendererV2(ScummEngine *vm, Common::Language language) : CharsetRendererV3(vm) { @@ -1237,8 +1226,7 @@ int CharsetRendererV3::getCharWidth(byte chr) { return spacing; } -void CharsetRendererV3::setColor(byte color) -{ +void CharsetRendererV3::setColor(byte color) { bool useShadow = false; _color = color; @@ -1769,7 +1757,7 @@ void CharsetRendererNut::printChar(int chr, bool ignoreCharsetMask) { int drawTop = _top; if (ignoreCharsetMask) { - VirtScreen *vs = &_vm->virtscr[kMainVirtScreen]; + VirtScreen *vs = &_vm->_virtscr[kMainVirtScreen]; s = *vs; s.pixels = vs->getPixels(0, 0); } else { @@ -1893,24 +1881,3 @@ void CharsetRendererNES::drawBits1(const Graphics::Surface &s, byte *dst, const } } // End of namespace Scumm - -#ifdef PALMOS_68K -#include "scumm_globals.h" - -_GINIT(Charset) -_GSETPTR(Scumm::germanCharsetDataV2, GBVARS_GERMANCHARSETDATAV2_INDEX, byte, GBVARS_SCUMM) -_GSETPTR(Scumm::frenchCharsetDataV2, GBVARS_FRENCHCHARSETDATAV2_INDEX, byte, GBVARS_SCUMM) -_GSETPTR(Scumm::englishCharsetDataV2, GBVARS_ENGLISHCHARSETDATAV2_INDEX, byte, GBVARS_SCUMM) -_GSETPTR(Scumm::italianCharsetDataV2, GBVARS_ITALIANCHARSETDATAV2_INDEX, byte, GBVARS_SCUMM) -_GSETPTR(Scumm::spanishCharsetDataV2, GBVARS_SPANISHCHARSETDATAV2_INDEX, byte, GBVARS_SCUMM) -_GEND - -_GRELEASE(Charset) -_GRELEASEPTR(GBVARS_GERMANCHARSETDATAV2_INDEX, GBVARS_SCUMM) -_GRELEASEPTR(GBVARS_FRENCHCHARSETDATAV2_INDEX, GBVARS_SCUMM) -_GRELEASEPTR(GBVARS_ENGLISHCHARSETDATAV2_INDEX, GBVARS_SCUMM) -_GRELEASEPTR(GBVARS_ITALIANCHARSETDATAV2_INDEX, GBVARS_SCUMM) -_GRELEASEPTR(GBVARS_SPANISHCHARSETDATAV2_INDEX, GBVARS_SCUMM) -_GEND - -#endif diff --git a/engines/scumm/costume.cpp b/engines/scumm/costume.cpp index 2c5be5bf21..ac61d39d25 100644 --- a/engines/scumm/costume.cpp +++ b/engines/scumm/costume.cpp @@ -32,9 +32,6 @@ namespace Scumm { -#ifdef PALMOS_68K -const byte *smallCostumeScaleTable; -#else const byte smallCostumeScaleTable[256] = { 0xFF, 0xFD, 0x7D, 0xBD, 0x3D, 0xDD, 0x5D, 0x9D, 0x1D, 0xED, 0x6D, 0xAD, 0x2D, 0xCD, 0x4D, 0x8D, @@ -69,7 +66,6 @@ const byte smallCostumeScaleTable[256] = { 0x0E, 0x8E, 0x4E, 0xCE, 0x2E, 0xAE, 0x6E, 0xEE, 0x1E, 0x9E, 0x5E, 0xDE, 0x3E, 0xBE, 0x7E, 0xFE }; -#endif static const int v1MMNESLookup[25] = { 0x00, 0x03, 0x01, 0x06, 0x08, @@ -1165,16 +1161,3 @@ byte C64CostumeLoader::increaseAnim(Actor *a, int slot) { } // End of namespace Scumm - -#ifdef PALMOS_68K -#include "scumm_globals.h" - -_GINIT(Costume) -_GSETPTR(Scumm::smallCostumeScaleTable, GBVARS_SMALLSCALETABLE_INDEX, byte, GBVARS_SCUMM) -_GEND - -_GRELEASE(Costume) -_GRELEASEPTR(GBVARS_SMALLSCALETABLE_INDEX, GBVARS_SCUMM) -_GEND - -#endif diff --git a/engines/scumm/cursor.cpp b/engines/scumm/cursor.cpp index 23657946c6..b8b2cbcb6d 100644 --- a/engines/scumm/cursor.cpp +++ b/engines/scumm/cursor.cpp @@ -236,7 +236,7 @@ void ScummEngine_v6::setCursorFromImg(uint img, uint room, uint imgindex) { } void ScummEngine_v6::useIm01Cursor(const byte *im, int w, int h) { - VirtScreen *vs = &virtscr[0]; + VirtScreen *vs = &_virtscr[kMainVirtScreen]; byte *buf, *dst; const byte *src; int i; diff --git a/engines/scumm/debugger.cpp b/engines/scumm/debugger.cpp index 83ba9e24c1..68a001c983 100644 --- a/engines/scumm/debugger.cpp +++ b/engines/scumm/debugger.cpp @@ -652,7 +652,7 @@ static int gfxPrimitivesCompareInt(const void *a, const void *b); static void hlineColor(ScummEngine *scumm, int x1, int x2, int y, byte color) { - VirtScreen *vs = &scumm->virtscr[0]; + VirtScreen *vs = &scumm->_virtscr[kMainVirtScreen]; byte *ptr; // Clip y diff --git a/engines/scumm/detection.cpp b/engines/scumm/detection.cpp index be830cab64..90c6e40aa7 100644 --- a/engines/scumm/detection.cpp +++ b/engines/scumm/detection.cpp @@ -18,8 +18,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL:https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/branches/gsoc2007-fsnode/engines/scumm/detection.cpp $ - * $Id:detection.cpp 26949 2007-05-26 20:23:24Z david_corrales $ + * $URL$ + * $Id$ * */ @@ -56,11 +56,7 @@ static int compareMD5Table(const void *a, const void *b) { } static const MD5Table *findInMD5Table(const char *md5) { -#ifdef PALMOS_68K - uint32 arraySize = MemPtrSize((void *)md5table) / sizeof(MD5Table) - 1; -#else uint32 arraySize = ARRAYSIZE(md5table) - 1; -#endif return (const MD5Table *)bsearch(md5, md5table, arraySize, sizeof(MD5Table), compareMD5Table); } @@ -886,11 +882,9 @@ PluginError Engine_SCUMM_create(OSystem *syst, Engine **engine) { *engine = new ScummEngine_v70he(syst, res); break; #endif -#ifndef PALMOS_68K case 61: *engine = new ScummEngine_v60he(syst, res); break; -#endif default: *engine = new ScummEngine_v6(syst, res); } @@ -913,16 +907,3 @@ PluginError Engine_SCUMM_create(OSystem *syst, Engine **engine) { REGISTER_PLUGIN(SCUMM, "Scumm Engine", "LucasArts SCUMM Games (C) LucasArts\n" "Humongous SCUMM Games (C) Humongous" ); - -#ifdef PALMOS_68K -#include "scumm_globals.h" - -_GINIT(Scumm_md5table) -_GSETPTR(md5table, GBVARS_MD5TABLE_INDEX, MD5Table, GBVARS_SCUMM) -_GEND - -_GRELEASE(Scumm_md5table) -_GRELEASEPTR(GBVARS_MD5TABLE_INDEX, GBVARS_SCUMM) -_GEND - -#endif diff --git a/engines/scumm/detection.h b/engines/scumm/detection.h index d0fefe3a29..bc67aafb7e 100644 --- a/engines/scumm/detection.h +++ b/engines/scumm/detection.h @@ -18,8 +18,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL:https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/branches/gsoc2007-fsnode/engines/scumm/detection.h $ - * $Id:detection.h 26949 2007-05-26 20:23:24Z david_corrales $ + * $URL$ + * $Id$ * */ diff --git a/engines/scumm/detection_tables.h b/engines/scumm/detection_tables.h index acde4e5ad0..70118b9baf 100644 --- a/engines/scumm/detection_tables.h +++ b/engines/scumm/detection_tables.h @@ -18,8 +18,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL:https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/branches/gsoc2007-fsnode/engines/scumm/detection_tables.h $ - * $Id:detection_tables.h 26949 2007-05-26 20:23:24Z david_corrales $ + * $URL$ + * $Id$ * */ @@ -37,11 +37,7 @@ //#include "scumm/intern.h" //#include "scumm/he/intern_he.h" -#ifdef PALMOS_68K -#include "extras/palm-scumm-md5.h" -#else #include "scumm/scumm-md5.h" -#endif namespace Scumm { @@ -399,6 +395,7 @@ static const GameFilenamePattern gameFilenamesTable[] = { { "maniac", "Maniac Mansion (SW).prg", kGenUnchanged, Common::SE_SWE, Common::kPlatformNES, "NES" }, { "maniac", "Maniac Mansion (U).prg", kGenUnchanged, Common::EN_USA, Common::kPlatformNES, "NES" }, { "maniac", "Maniac Mansion (G).prg", kGenUnchanged, Common::DE_DEU, Common::kPlatformNES, "NES" }, + { "maniac", "Maniac Mansion (Sp).prg", kGenUnchanged, Common::ES_ESP, Common::kPlatformNES, "NES" }, { "zak", "%02d.LFL", kGenRoomNum, UNK_LANG, UNK, 0 }, { "zak", "zak1.d64", kGenUnchanged, UNK_LANG, Common::kPlatformC64, 0 }, // ... and zak2.d64 diff --git a/engines/scumm/dialogs.cpp b/engines/scumm/dialogs.cpp index 85a72cb090..1666578c4c 100644 --- a/engines/scumm/dialogs.cpp +++ b/engines/scumm/dialogs.cpp @@ -81,11 +81,6 @@ struct ResString { char string[80]; }; -#ifdef PALMOS_68K -static const ResString *string_map_table_v7; -static const ResString *string_map_table_v6; -static const ResString *string_map_table_v5; -#else static const ResString string_map_table_v8[] = { {0, "/BT_100/Please insert disk %d. Press ENTER"}, {0, "/BT__003/Unable to Find %s, (%s %d) Press Button."}, @@ -216,7 +211,6 @@ static const ResString string_map_table_v345[] = { {20, "Select a game to LOAD"}, {28, "Game title"} }; -#endif #pragma mark - @@ -967,20 +961,3 @@ void Indy3IQPointsDialog::handleKeyDown(Common::KeyState state) { } } // End of namespace Scumm - -#ifdef PALMOS_68K -#include "scumm_globals.h" - -_GINIT(Dialogs) -_GSETPTR(Scumm::string_map_table_v7, GBVARS_STRINGMAPTABLEV7_INDEX, Scumm::ResString, GBVARS_SCUMM) -_GSETPTR(Scumm::string_map_table_v6, GBVARS_STRINGMAPTABLEV6_INDEX, Scumm::ResString, GBVARS_SCUMM) -_GSETPTR(Scumm::string_map_table_v5, GBVARS_STRINGMAPTABLEV5_INDEX, Scumm::ResString, GBVARS_SCUMM) -_GEND - -_GRELEASE(Dialogs) -_GRELEASEPTR(GBVARS_STRINGMAPTABLEV7_INDEX, GBVARS_SCUMM) -_GRELEASEPTR(GBVARS_STRINGMAPTABLEV6_INDEX, GBVARS_SCUMM) -_GRELEASEPTR(GBVARS_STRINGMAPTABLEV5_INDEX, GBVARS_SCUMM) -_GEND - -#endif diff --git a/engines/scumm/file.cpp b/engines/scumm/file.cpp index 2c7f9ead5b..b80be63d32 100644 --- a/engines/scumm/file.cpp +++ b/engines/scumm/file.cpp @@ -24,9 +24,6 @@ */ #include "scumm/file.h" -#include "common/endian.h" -#include "common/util.h" -#include "common/md5.h" #include "scumm/scumm.h" @@ -196,1275 +193,6 @@ uint32 ScummFile::write(const void *, uint32) { } #pragma mark - -#pragma mark --- ScummNESFile --- -#pragma mark - - -enum ResType { - NES_UNKNOWN, - NES_GLOBDATA, - NES_ROOM, - NES_SCRIPT, - NES_SOUND, - NES_COSTUME, - NES_ROOMGFX, - NES_COSTUMEGFX, - NES_SPRPALS, - NES_SPRDESC, - NES_SPRLENS, - NES_SPROFFS, - NES_SPRDATA, - NES_CHARSET, - NES_PREPLIST -}; - -struct ScummNESFile::Resource { - uint32 offset; - uint16 length; - ResType type; -}; - -ScummNESFile::ScummNESFile() : _stream(0), _buf(0), _ROMset(kROMsetNum) { -} - -uint32 ScummNESFile::write(const void *, uint32) { - error("ScummNESFile does not support writing!"); - return 0; -} - -void ScummNESFile::setEnc(byte enc) { - _stream->setEnc(enc); -} - -#ifdef PALMOS_68K -static const ScummNESFile::Resource *res_roomgfx_usa; -static const ScummNESFile::Resource *res_roomgfx_eur; -static const ScummNESFile::Resource *res_roomgfx_swe; -static const ScummNESFile::Resource *res_roomgfx_fra; -static const ScummNESFile::Resource *res_roomgfx_ger; -#else -static const ScummNESFile::Resource res_roomgfx_usa[40] = { - { 0x04001, 0x03C9, NES_ROOMGFX }, { 0x043CA, 0x069E, NES_ROOMGFX }, { 0x04A68, 0x0327, NES_ROOMGFX }, { 0x04D8F, 0x053B, NES_ROOMGFX }, { 0x052CA, 0x06BE, NES_ROOMGFX }, - { 0x05988, 0x0682, NES_ROOMGFX }, { 0x0600A, 0x0778, NES_ROOMGFX }, { 0x06782, 0x0517, NES_ROOMGFX }, { 0x06C99, 0x07FB, NES_ROOMGFX }, { 0x07494, 0x07BE, NES_ROOMGFX }, - { 0x08001, 0x07A5, NES_ROOMGFX }, { 0x087A6, 0x06DD, NES_ROOMGFX }, { 0x08E83, 0x04EA, NES_ROOMGFX }, { 0x0936D, 0x0846, NES_ROOMGFX }, { 0x09BB3, 0x08C8, NES_ROOMGFX }, - { 0x0A47B, 0x0844, NES_ROOMGFX }, { 0x0ACBF, 0x0515, NES_ROOMGFX }, { 0x0B1D4, 0x0799, NES_ROOMGFX }, { 0x0B96D, 0x04BB, NES_ROOMGFX }, { 0x07C52, 0x0319, NES_ROOMGFX }, - { 0x0C001, 0x0464, NES_ROOMGFX }, { 0x0C465, 0x076D, NES_ROOMGFX }, { 0x0CBD2, 0x0827, NES_ROOMGFX }, { 0x0D3F9, 0x0515, NES_ROOMGFX }, { 0x0D90E, 0x064E, NES_ROOMGFX }, - { 0x0DF5C, 0x0775, NES_ROOMGFX }, { 0x0E6D1, 0x06DD, NES_ROOMGFX }, { 0x0EDAE, 0x0376, NES_ROOMGFX }, { 0x0F124, 0x05F7, NES_ROOMGFX }, { 0x0F71B, 0x0787, NES_ROOMGFX }, - { 0x10001, 0x02D6, NES_ROOMGFX }, { 0x102D7, 0x06A3, NES_ROOMGFX }, { 0x1097A, 0x099F, NES_ROOMGFX }, { 0x11319, 0x0361, NES_ROOMGFX }, { 0x1167A, 0x0489, NES_ROOMGFX }, - { 0x11B03, 0x0437, NES_ROOMGFX }, { 0x11F3A, 0x084D, NES_ROOMGFX }, { 0x0BE28, 0x0199, NES_ROOMGFX }, { 0x12787, 0x09A7, NES_ROOMGFX }, { 0x1312E, 0x037A, NES_ROOMGFX } -}; -static const ScummNESFile::Resource res_roomgfx_eur[40] = { - { 0x04001, 0x03B9, NES_ROOMGFX }, { 0x043BA, 0x069E, NES_ROOMGFX }, { 0x04A58, 0x0327, NES_ROOMGFX }, { 0x04D7F, 0x053B, NES_ROOMGFX }, { 0x052BA, 0x06BE, NES_ROOMGFX }, - { 0x05978, 0x0682, NES_ROOMGFX }, { 0x05FFA, 0x0778, NES_ROOMGFX }, { 0x06772, 0x0517, NES_ROOMGFX }, { 0x06C89, 0x07FB, NES_ROOMGFX }, { 0x07484, 0x07BE, NES_ROOMGFX }, - { 0x08001, 0x07A5, NES_ROOMGFX }, { 0x087A6, 0x06DD, NES_ROOMGFX }, { 0x08E83, 0x04EA, NES_ROOMGFX }, { 0x0936D, 0x0846, NES_ROOMGFX }, { 0x09BB3, 0x08C8, NES_ROOMGFX }, - { 0x0A47B, 0x0844, NES_ROOMGFX }, { 0x0ACBF, 0x0515, NES_ROOMGFX }, { 0x0B1D4, 0x0799, NES_ROOMGFX }, { 0x0B96D, 0x04BB, NES_ROOMGFX }, { 0x07C42, 0x0319, NES_ROOMGFX }, - { 0x0C001, 0x0464, NES_ROOMGFX }, { 0x0C465, 0x076D, NES_ROOMGFX }, { 0x0CBD2, 0x0827, NES_ROOMGFX }, { 0x0D3F9, 0x0515, NES_ROOMGFX }, { 0x0D90E, 0x064E, NES_ROOMGFX }, - { 0x0DF5C, 0x0775, NES_ROOMGFX }, { 0x0E6D1, 0x06DD, NES_ROOMGFX }, { 0x0EDAE, 0x0376, NES_ROOMGFX }, { 0x0F124, 0x05F7, NES_ROOMGFX }, { 0x0F71B, 0x0787, NES_ROOMGFX }, - { 0x10001, 0x02D6, NES_ROOMGFX }, { 0x102D7, 0x06A3, NES_ROOMGFX }, { 0x1097A, 0x099F, NES_ROOMGFX }, { 0x11319, 0x0361, NES_ROOMGFX }, { 0x1167A, 0x0489, NES_ROOMGFX }, - { 0x11B03, 0x0437, NES_ROOMGFX }, { 0x11F3A, 0x084D, NES_ROOMGFX }, { 0x12787, 0x0199, NES_ROOMGFX }, { 0x12920, 0x09A7, NES_ROOMGFX }, { 0x132C7, 0x037A, NES_ROOMGFX } -}; -static const ScummNESFile::Resource res_roomgfx_swe[40] = { - { 0x04001, 0x03F0, NES_ROOMGFX }, { 0x043F1, 0x069E, NES_ROOMGFX }, { 0x04A8F, 0x0327, NES_ROOMGFX }, { 0x04DB6, 0x053B, NES_ROOMGFX }, { 0x052F1, 0x06BE, NES_ROOMGFX }, - { 0x059AF, 0x0682, NES_ROOMGFX }, { 0x06031, 0x0778, NES_ROOMGFX }, { 0x067A9, 0x0517, NES_ROOMGFX }, { 0x06CC0, 0x07FB, NES_ROOMGFX }, { 0x074BB, 0x07BE, NES_ROOMGFX }, - { 0x08001, 0x07A5, NES_ROOMGFX }, { 0x087A6, 0x06DD, NES_ROOMGFX }, { 0x08E83, 0x04EA, NES_ROOMGFX }, { 0x0936D, 0x07E2, NES_ROOMGFX }, { 0x09B4F, 0x0791, NES_ROOMGFX }, - { 0x0A2E0, 0x07B5, NES_ROOMGFX }, { 0x0AA95, 0x0515, NES_ROOMGFX }, { 0x0AFAA, 0x0799, NES_ROOMGFX }, { 0x0B743, 0x04BF, NES_ROOMGFX }, { 0x0BC02, 0x0319, NES_ROOMGFX }, - { 0x0C001, 0x0464, NES_ROOMGFX }, { 0x0C465, 0x072C, NES_ROOMGFX }, { 0x0CB91, 0x0827, NES_ROOMGFX }, { 0x0D3B8, 0x0515, NES_ROOMGFX }, { 0x0D8CD, 0x064E, NES_ROOMGFX }, - { 0x0DF1B, 0x0775, NES_ROOMGFX }, { 0x0E690, 0x06DD, NES_ROOMGFX }, { 0x0ED6D, 0x0376, NES_ROOMGFX }, { 0x0F0E3, 0x05F7, NES_ROOMGFX }, { 0x0F6DA, 0x0791, NES_ROOMGFX }, - { 0x07C79, 0x02D6, NES_ROOMGFX }, { 0x10001, 0x06A3, NES_ROOMGFX }, { 0x106A4, 0x0921, NES_ROOMGFX }, { 0x10FC5, 0x0361, NES_ROOMGFX }, { 0x11326, 0x0489, NES_ROOMGFX }, - { 0x117AF, 0x0437, NES_ROOMGFX }, { 0x11BE6, 0x084F, NES_ROOMGFX }, { 0x12435, 0x0199, NES_ROOMGFX }, { 0x125CE, 0x0947, NES_ROOMGFX }, { 0x12F15, 0x037A, NES_ROOMGFX } -}; -static const ScummNESFile::Resource res_roomgfx_fra[40] = { - { 0x04001, 0x0426, NES_ROOMGFX }, { 0x04427, 0x069E, NES_ROOMGFX }, { 0x04AC5, 0x0327, NES_ROOMGFX }, { 0x04DEC, 0x053B, NES_ROOMGFX }, { 0x05327, 0x06BE, NES_ROOMGFX }, - { 0x059E5, 0x0682, NES_ROOMGFX }, { 0x06067, 0x0778, NES_ROOMGFX }, { 0x067DF, 0x0517, NES_ROOMGFX }, { 0x06CF6, 0x07FB, NES_ROOMGFX }, { 0x074F1, 0x07BE, NES_ROOMGFX }, - { 0x08001, 0x07A5, NES_ROOMGFX }, { 0x087A6, 0x06DD, NES_ROOMGFX }, { 0x08E83, 0x04EA, NES_ROOMGFX }, { 0x0936D, 0x07E2, NES_ROOMGFX }, { 0x09B4F, 0x0791, NES_ROOMGFX }, - { 0x0A2E0, 0x07B5, NES_ROOMGFX }, { 0x0AA95, 0x0515, NES_ROOMGFX }, { 0x0AFAA, 0x0799, NES_ROOMGFX }, { 0x0B743, 0x04BB, NES_ROOMGFX }, { 0x0BBFE, 0x0319, NES_ROOMGFX }, - { 0x0C001, 0x0464, NES_ROOMGFX }, { 0x0C465, 0x072C, NES_ROOMGFX }, { 0x0CB91, 0x0827, NES_ROOMGFX }, { 0x0D3B8, 0x0515, NES_ROOMGFX }, { 0x0D8CD, 0x064E, NES_ROOMGFX }, - { 0x0DF1B, 0x0775, NES_ROOMGFX }, { 0x0E690, 0x06DD, NES_ROOMGFX }, { 0x0ED6D, 0x0376, NES_ROOMGFX }, { 0x0F0E3, 0x05F7, NES_ROOMGFX }, { 0x0F6DA, 0x0787, NES_ROOMGFX }, - { 0x10001, 0x02D6, NES_ROOMGFX }, { 0x102D7, 0x06A3, NES_ROOMGFX }, { 0x1097A, 0x0921, NES_ROOMGFX }, { 0x1129B, 0x0361, NES_ROOMGFX }, { 0x115FC, 0x0489, NES_ROOMGFX }, - { 0x11A85, 0x0437, NES_ROOMGFX }, { 0x11EBC, 0x070D, NES_ROOMGFX }, { 0x07CAF, 0x0199, NES_ROOMGFX }, { 0x125C9, 0x0947, NES_ROOMGFX }, { 0x12F10, 0x037A, NES_ROOMGFX } -}; -static const ScummNESFile::Resource res_roomgfx_ger[40] = { - { 0x04001, 0x0406, NES_ROOMGFX }, { 0x04407, 0x069E, NES_ROOMGFX }, { 0x04AA5, 0x0327, NES_ROOMGFX }, { 0x04DCC, 0x053B, NES_ROOMGFX }, { 0x05307, 0x06BE, NES_ROOMGFX }, - { 0x059C5, 0x0682, NES_ROOMGFX }, { 0x06047, 0x0778, NES_ROOMGFX }, { 0x067BF, 0x0517, NES_ROOMGFX }, { 0x06CD6, 0x07FB, NES_ROOMGFX }, { 0x074D1, 0x07BE, NES_ROOMGFX }, - { 0x08001, 0x07A5, NES_ROOMGFX }, { 0x087A6, 0x06DD, NES_ROOMGFX }, { 0x08E83, 0x04EA, NES_ROOMGFX }, { 0x0936D, 0x07E2, NES_ROOMGFX }, { 0x09B4F, 0x0791, NES_ROOMGFX }, - { 0x0A2E0, 0x07B5, NES_ROOMGFX }, { 0x0AA95, 0x0515, NES_ROOMGFX }, { 0x0AFAA, 0x0799, NES_ROOMGFX }, { 0x0B743, 0x04BB, NES_ROOMGFX }, { 0x0BBFE, 0x0319, NES_ROOMGFX }, - { 0x0C001, 0x0464, NES_ROOMGFX }, { 0x0C465, 0x072C, NES_ROOMGFX }, { 0x0CB91, 0x0827, NES_ROOMGFX }, { 0x0D3B8, 0x0515, NES_ROOMGFX }, { 0x0D8CD, 0x064E, NES_ROOMGFX }, - { 0x0DF1B, 0x0775, NES_ROOMGFX }, { 0x0E690, 0x06DD, NES_ROOMGFX }, { 0x0ED6D, 0x0376, NES_ROOMGFX }, { 0x0F0E3, 0x05F7, NES_ROOMGFX }, { 0x0F6DA, 0x0787, NES_ROOMGFX }, - { 0x07C8F, 0x02D6, NES_ROOMGFX }, { 0x10001, 0x06A3, NES_ROOMGFX }, { 0x106A4, 0x0921, NES_ROOMGFX }, { 0x10FC5, 0x0361, NES_ROOMGFX }, { 0x11326, 0x0489, NES_ROOMGFX }, - { 0x117AF, 0x0437, NES_ROOMGFX }, { 0x11BE6, 0x07A0, NES_ROOMGFX }, { 0x12386, 0x0199, NES_ROOMGFX }, { 0x1251F, 0x0947, NES_ROOMGFX }, { 0x12E66, 0x037A, NES_ROOMGFX } -}; -#endif -static const ScummNESFile::Resource *res_roomgfx[ScummNESFile::kROMsetNum] = { - res_roomgfx_usa, - res_roomgfx_eur, - res_roomgfx_swe, - res_roomgfx_fra, - res_roomgfx_ger, -}; - -#ifdef PALMOS_68K -static const ScummNESFile::Resource *res_costumegfx_usa; -static const ScummNESFile::Resource *res_costumegfx_eur; -static const ScummNESFile::Resource *res_costumegfx_swe; -static const ScummNESFile::Resource *res_costumegfx_fra; -static const ScummNESFile::Resource *res_costumegfx_ger; -#else -static const ScummNESFile::Resource res_costumegfx_usa[2] = { { 0x30001, 0x0EB8, NES_COSTUMEGFX }, { 0x2F9F1, 0x0340, NES_COSTUMEGFX } }; -static const ScummNESFile::Resource res_costumegfx_eur[2] = { { 0x30001, 0x0EB8, NES_COSTUMEGFX }, { 0x2F9F1, 0x0340, NES_COSTUMEGFX } }; -static const ScummNESFile::Resource res_costumegfx_swe[2] = { { 0x2EFE1, 0x0EB8, NES_COSTUMEGFX }, { 0x30001, 0x0340, NES_COSTUMEGFX } }; -static const ScummNESFile::Resource res_costumegfx_fra[2] = { { 0x30001, 0x0EB8, NES_COSTUMEGFX }, { 0x2F608, 0x0340, NES_COSTUMEGFX } }; -static const ScummNESFile::Resource res_costumegfx_ger[2] = { { 0x30001, 0x0EB8, NES_COSTUMEGFX }, { 0x2F4CE, 0x0340, NES_COSTUMEGFX } }; -#endif -static const ScummNESFile::Resource *res_costumegfx[ScummNESFile::kROMsetNum] = { - res_costumegfx_usa, - res_costumegfx_eur, - res_costumegfx_swe, - res_costumegfx_fra, - res_costumegfx_ger, -}; - -#ifdef PALMOS_68K -static const ScummNESFile::Resource *res_rooms_usa; -static const ScummNESFile::Resource *res_rooms_eur; -static const ScummNESFile::Resource *res_rooms_swe; -static const ScummNESFile::Resource *res_rooms_fra; -static const ScummNESFile::Resource *res_rooms_ger; -#else -static const ScummNESFile::Resource res_rooms_usa[55] = { - { 0x00000, 0x0000, NES_ROOM }, { 0x14001, 0x0D0C, NES_ROOM }, { 0x134A8, 0x04B3, NES_ROOM }, { 0x15397, 0x0849, NES_ROOM }, { 0x15C68, 0x0685, NES_ROOM }, - { 0x16381, 0x0715, NES_ROOM }, { 0x1395B, 0x04E7, NES_ROOM }, { 0x16CE8, 0x0AC0, NES_ROOM }, { 0x18001, 0x06BA, NES_ROOM }, { 0x17AED, 0x03CB, NES_ROOM }, - { 0x18BE7, 0x0663, NES_ROOM }, { 0x192A6, 0x0580, NES_ROOM }, { 0x19A44, 0x0443, NES_ROOM }, { 0x1A106, 0x0563, NES_ROOM }, { 0x1A669, 0x0446, NES_ROOM }, - { 0x1AAAF, 0x03A7, NES_ROOM }, { 0x1AE56, 0x07E3, NES_ROOM }, { 0x1B699, 0x0692, NES_ROOM }, { 0x1C001, 0x0B49, NES_ROOM }, { 0x1CD09, 0x04C6, NES_ROOM }, - { 0x1D4C2, 0x0568, NES_ROOM }, { 0x1DF6C, 0x0514, NES_ROOM }, { 0x1E8FA, 0x05CC, NES_ROOM }, { 0x1EF83, 0x0389, NES_ROOM }, { 0x1F5E4, 0x0723, NES_ROOM }, - { 0x20001, 0x049A, NES_ROOM }, { 0x20511, 0x04F8, NES_ROOM }, { 0x21666, 0x05CB, NES_ROOM }, { 0x21DD6, 0x046B, NES_ROOM }, { 0x222F0, 0x0460, NES_ROOM }, - { 0x227B6, 0x0909, NES_ROOM }, { 0x24001, 0x0366, NES_ROOM }, { 0x23BDF, 0x03CA, NES_ROOM }, { 0x247DB, 0x050D, NES_ROOM }, { 0x25ACF, 0x0346, NES_ROOM }, - { 0x1BDBD, 0x01CA, NES_ROOM }, { 0x25E15, 0x0457, NES_ROOM }, { 0x2626C, 0x0547, NES_ROOM }, { 0x267B3, 0x064A, NES_ROOM }, { 0x1FD72, 0x024B, NES_ROOM }, - { 0x2739A, 0x01FA, NES_ROOM }, { 0x2766D, 0x0219, NES_ROOM }, { 0x28001, 0x02F4, NES_ROOM }, { 0x284D6, 0x045C, NES_ROOM }, { 0x289A3, 0x09CF, NES_ROOM }, - { 0x293C6, 0x05A0, NES_ROOM }, { 0x27B65, 0x0201, NES_ROOM }, { 0x2ADD1, 0x0325, NES_ROOM }, { 0x2B339, 0x01FC, NES_ROOM }, { 0x2B535, 0x02A9, NES_ROOM }, - { 0x2B7DE, 0x02DE, NES_ROOM }, { 0x2C001, 0x03CE, NES_ROOM }, { 0x2BBC0, 0x0205, NES_ROOM }, { 0x2C53A, 0x0170, NES_ROOM }, { 0x13E42, 0x0169, NES_ROOM } -}; -static const ScummNESFile::Resource res_rooms_eur[55] = { - { 0x00000, 0x0000, NES_ROOM }, { 0x14001, 0x0D0C, NES_ROOM }, { 0x13641, 0x04B3, NES_ROOM }, { 0x15397, 0x0849, NES_ROOM }, { 0x15C68, 0x0685, NES_ROOM }, - { 0x16381, 0x0715, NES_ROOM }, { 0x16CE8, 0x04E7, NES_ROOM }, { 0x18001, 0x0ABF, NES_ROOM }, { 0x171CF, 0x06BA, NES_ROOM }, { 0x13AF4, 0x03D2, NES_ROOM }, - { 0x18E1A, 0x0663, NES_ROOM }, { 0x194D9, 0x04A9, NES_ROOM }, { 0x19BA0, 0x0443, NES_ROOM }, { 0x1A262, 0x047C, NES_ROOM }, { 0x1A6DE, 0x0446, NES_ROOM }, - { 0x1AB24, 0x03A7, NES_ROOM }, { 0x1AECB, 0x07E3, NES_ROOM }, { 0x1B70E, 0x0692, NES_ROOM }, { 0x1C001, 0x0ACA, NES_ROOM }, { 0x1CC8A, 0x04C6, NES_ROOM }, - { 0x1D443, 0x0568, NES_ROOM }, { 0x1DEED, 0x0514, NES_ROOM }, { 0x1E87B, 0x05CC, NES_ROOM }, { 0x1EF04, 0x0389, NES_ROOM }, { 0x1F565, 0x0723, NES_ROOM }, - { 0x20001, 0x049A, NES_ROOM }, { 0x20511, 0x04F8, NES_ROOM }, { 0x21666, 0x05D5, NES_ROOM }, { 0x21DE0, 0x046B, NES_ROOM }, { 0x222FA, 0x0460, NES_ROOM }, - { 0x227C0, 0x0909, NES_ROOM }, { 0x24001, 0x0366, NES_ROOM }, { 0x247DB, 0x03CA, NES_ROOM }, { 0x24BA5, 0x050D, NES_ROOM }, { 0x23BE9, 0x0346, NES_ROOM }, - { 0x17DB5, 0x01CA, NES_ROOM }, { 0x25E99, 0x0457, NES_ROOM }, { 0x262F0, 0x0547, NES_ROOM }, { 0x26837, 0x064A, NES_ROOM }, { 0x1FCF3, 0x024B, NES_ROOM }, - { 0x2741E, 0x01FA, NES_ROOM }, { 0x276F1, 0x0219, NES_ROOM }, { 0x28001, 0x02F4, NES_ROOM }, { 0x284D6, 0x045C, NES_ROOM }, { 0x289A3, 0x09CF, NES_ROOM }, - { 0x293C6, 0x05A0, NES_ROOM }, { 0x27BE9, 0x0201, NES_ROOM }, { 0x2ADE3, 0x0325, NES_ROOM }, { 0x2B34B, 0x01FC, NES_ROOM }, { 0x2B547, 0x02A9, NES_ROOM }, - { 0x2B7F0, 0x02DE, NES_ROOM }, { 0x2C001, 0x03CE, NES_ROOM }, { 0x2BBD2, 0x0205, NES_ROOM }, { 0x2C53A, 0x0170, NES_ROOM }, { 0x2BDD7, 0x0169, NES_ROOM } -}; -static const ScummNESFile::Resource res_rooms_swe[55] = { - { 0x00000, 0x0000, NES_ROOM }, { 0x14001, 0x0D12, NES_ROOM }, { 0x1328F, 0x04B3, NES_ROOM }, { 0x15367, 0x0859, NES_ROOM }, { 0x13742, 0x0694, NES_ROOM }, - { 0x15C45, 0x0707, NES_ROOM }, { 0x1658F, 0x04E0, NES_ROOM }, { 0x16A6F, 0x0AC8, NES_ROOM }, { 0x18001, 0x06C7, NES_ROOM }, { 0x1789C, 0x03EA, NES_ROOM }, - { 0x18C09, 0x0649, NES_ROOM }, { 0x192AE, 0x04AB, NES_ROOM }, { 0x19982, 0x0447, NES_ROOM }, { 0x1A04D, 0x047E, NES_ROOM }, { 0x1A4CB, 0x0444, NES_ROOM }, - { 0x1A90F, 0x03B9, NES_ROOM }, { 0x1ACC8, 0x07E9, NES_ROOM }, { 0x1B511, 0x06A4, NES_ROOM }, { 0x1C001, 0x0B1A, NES_ROOM }, { 0x1CCFD, 0x0486, NES_ROOM }, - { 0x1D482, 0x0579, NES_ROOM }, { 0x1DF61, 0x051E, NES_ROOM }, { 0x1E8EC, 0x05CF, NES_ROOM }, { 0x1EF73, 0x0398, NES_ROOM }, { 0x1F5F0, 0x071A, NES_ROOM }, - { 0x20001, 0x049C, NES_ROOM }, { 0x2051E, 0x051E, NES_ROOM }, { 0x21725, 0x05D5, NES_ROOM }, { 0x21EA5, 0x047F, NES_ROOM }, { 0x223D1, 0x0460, NES_ROOM }, - { 0x22897, 0x090D, NES_ROOM }, { 0x24001, 0x0378, NES_ROOM }, { 0x247C9, 0x03CA, NES_ROOM }, { 0x24B93, 0x050D, NES_ROOM }, { 0x25267, 0x0346, NES_ROOM }, - { 0x17CD0, 0x01CA, NES_ROOM }, { 0x255AD, 0x0453, NES_ROOM }, { 0x25A00, 0x053E, NES_ROOM }, { 0x25F3E, 0x0647, NES_ROOM }, { 0x1BC49, 0x024B, NES_ROOM }, - { 0x26B58, 0x01FA, NES_ROOM }, { 0x26E27, 0x0217, NES_ROOM }, { 0x27345, 0x02F4, NES_ROOM }, { 0x27829, 0x045C, NES_ROOM }, { 0x28001, 0x098A, NES_ROOM }, - { 0x289DF, 0x05A1, NES_ROOM }, { 0x2A442, 0x0201, NES_ROOM }, { 0x2A6E9, 0x0325, NES_ROOM }, { 0x1FD75, 0x01FC, NES_ROOM }, { 0x2AC64, 0x02A9, NES_ROOM }, - { 0x2AF0D, 0x02D1, NES_ROOM }, { 0x2B2E6, 0x03CC, NES_ROOM }, { 0x23D61, 0x0205, NES_ROOM }, { 0x2B818, 0x0168, NES_ROOM }, { 0x27CF6, 0x0169, NES_ROOM } -}; -static const ScummNESFile::Resource res_rooms_fra[55] = { - { 0x00000, 0x0000, NES_ROOM }, { 0x14001, 0x0D76, NES_ROOM }, { 0x1328A, 0x04C6, NES_ROOM }, { 0x15451, 0x0885, NES_ROOM }, { 0x13750, 0x0693, NES_ROOM }, - { 0x15D68, 0x0709, NES_ROOM }, { 0x166D4, 0x0528, NES_ROOM }, { 0x16BFC, 0x0ACC, NES_ROOM }, { 0x18001, 0x06E2, NES_ROOM }, { 0x17A63, 0x03E5, NES_ROOM }, - { 0x18C3B, 0x066A, NES_ROOM }, { 0x19301, 0x049E, NES_ROOM }, { 0x199C8, 0x044B, NES_ROOM }, { 0x1A0B1, 0x0478, NES_ROOM }, { 0x1A529, 0x043F, NES_ROOM }, - { 0x1A968, 0x03C8, NES_ROOM }, { 0x1AD30, 0x086F, NES_ROOM }, { 0x1B5FF, 0x069B, NES_ROOM }, { 0x1C001, 0x0AA9, NES_ROOM }, { 0x1CC97, 0x049E, NES_ROOM }, - { 0x1D42C, 0x05A8, NES_ROOM }, { 0x1DF71, 0x054E, NES_ROOM }, { 0x1E9D1, 0x0606, NES_ROOM }, { 0x1F0A2, 0x039A, NES_ROOM }, { 0x1F74E, 0x071C, NES_ROOM }, - { 0x20001, 0x04B5, NES_ROOM }, { 0x2052E, 0x04FF, NES_ROOM }, { 0x2172E, 0x05DB, NES_ROOM }, { 0x21EAD, 0x0489, NES_ROOM }, { 0x223E1, 0x0465, NES_ROOM }, - { 0x228AC, 0x0957, NES_ROOM }, { 0x24001, 0x037E, NES_ROOM }, { 0x2481A, 0x03CA, NES_ROOM }, { 0x24BE4, 0x050D, NES_ROOM }, { 0x252C0, 0x0346, NES_ROOM }, - { 0x1BD30, 0x01CA, NES_ROOM }, { 0x25606, 0x046D, NES_ROOM }, { 0x25A73, 0x055A, NES_ROOM }, { 0x25FCD, 0x0654, NES_ROOM }, { 0x26C98, 0x024B, NES_ROOM }, - { 0x26EE3, 0x01FA, NES_ROOM }, { 0x271DD, 0x0217, NES_ROOM }, { 0x27713, 0x02F4, NES_ROOM }, { 0x28001, 0x045C, NES_ROOM }, { 0x284CE, 0x0975, NES_ROOM }, - { 0x28E97, 0x05E6, NES_ROOM }, { 0x27C3A, 0x0201, NES_ROOM }, { 0x2A9D6, 0x0325, NES_ROOM }, { 0x2AF88, 0x01FC, NES_ROOM }, { 0x2B184, 0x02A9, NES_ROOM }, - { 0x2B42D, 0x02DF, NES_ROOM }, { 0x2B818, 0x03EC, NES_ROOM }, { 0x2BD67, 0x0209, NES_ROOM }, { 0x2C001, 0x0168, NES_ROOM }, { 0x2C4BF, 0x0169, NES_ROOM } -}; -static const ScummNESFile::Resource res_rooms_ger[55] = { - { 0x00000, 0x0000, NES_ROOM }, { 0x14001, 0x0D63, NES_ROOM }, { 0x131E0, 0x04A9, NES_ROOM }, { 0x13689, 0x086B, NES_ROOM }, { 0x15421, 0x06A8, NES_ROOM }, - { 0x15B5D, 0x0731, NES_ROOM }, { 0x16507, 0x0501, NES_ROOM }, { 0x16A08, 0x0AE9, NES_ROOM }, { 0x18001, 0x06DA, NES_ROOM }, { 0x17880, 0x03D0, NES_ROOM }, - { 0x18C7B, 0x0651, NES_ROOM }, { 0x19328, 0x04A7, NES_ROOM }, { 0x199FE, 0x0447, NES_ROOM }, { 0x1A0F1, 0x0486, NES_ROOM }, { 0x1A577, 0x045D, NES_ROOM }, - { 0x1A9D4, 0x03AE, NES_ROOM }, { 0x1AD82, 0x0840, NES_ROOM }, { 0x1B622, 0x06C3, NES_ROOM }, { 0x1C001, 0x0B07, NES_ROOM }, { 0x1CD05, 0x0494, NES_ROOM }, - { 0x1D4A5, 0x05AC, NES_ROOM }, { 0x1DFD6, 0x0524, NES_ROOM }, { 0x1E9C0, 0x05F7, NES_ROOM }, { 0x1F09A, 0x038E, NES_ROOM }, { 0x1F75F, 0x0733, NES_ROOM }, - { 0x20001, 0x04A9, NES_ROOM }, { 0x2052A, 0x052E, NES_ROOM }, { 0x2177C, 0x0621, NES_ROOM }, { 0x21F57, 0x0495, NES_ROOM }, { 0x2249A, 0x045E, NES_ROOM }, - { 0x2295E, 0x0951, NES_ROOM }, { 0x24001, 0x036E, NES_ROOM }, { 0x247F9, 0x03CA, NES_ROOM }, { 0x24BC3, 0x050D, NES_ROOM }, { 0x252A8, 0x0346, NES_ROOM }, - { 0x17CA2, 0x01CA, NES_ROOM }, { 0x255EE, 0x046F, NES_ROOM }, { 0x25A5D, 0x054D, NES_ROOM }, { 0x25FAA, 0x064B, NES_ROOM }, { 0x26BE2, 0x024B, NES_ROOM }, - { 0x26E2D, 0x01FA, NES_ROOM }, { 0x2710F, 0x0217, NES_ROOM }, { 0x27663, 0x02F4, NES_ROOM }, { 0x28001, 0x045C, NES_ROOM }, { 0x284CE, 0x0A8F, NES_ROOM }, - { 0x28FB1, 0x05FF, NES_ROOM }, { 0x27B69, 0x0201, NES_ROOM }, { 0x2AAA9, 0x0325, NES_ROOM }, { 0x1BD7C, 0x01FC, NES_ROOM }, { 0x2B031, 0x02A9, NES_ROOM }, - { 0x2B2DA, 0x02D8, NES_ROOM }, { 0x2B6D2, 0x03D2, NES_ROOM }, { 0x2BC0D, 0x020D, NES_ROOM }, { 0x2C001, 0x0168, NES_ROOM }, { 0x27E11, 0x0169, NES_ROOM } -}; -#endif -static const ScummNESFile::Resource *res_rooms[ScummNESFile::kROMsetNum] = { - res_rooms_usa, - res_rooms_eur, - res_rooms_swe, - res_rooms_fra, - res_rooms_ger, -}; - -#ifdef PALMOS_68K -static const ScummNESFile::Resource *res_scripts_usa; -static const ScummNESFile::Resource *res_scripts_eur; -static const ScummNESFile::Resource *res_scripts_swe; -static const ScummNESFile::Resource *res_scripts_fra; -static const ScummNESFile::Resource *res_scripts_ger; -#else -static const ScummNESFile::Resource res_scripts_usa[179] = { - { 0x00000, 0x0000, NES_SCRIPT }, { 0x29966, 0x044D, NES_SCRIPT }, { 0x29DB3, 0x0207, NES_SCRIPT }, { 0x29FBA, 0x009F, NES_SCRIPT }, { 0x2A059, 0x03F4, NES_SCRIPT }, - { 0x2A44D, 0x01A1, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, { 0x2A5EE, 0x004A, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, { 0x2A638, 0x0005, NES_SCRIPT }, - { 0x2C6AA, 0x000D, NES_SCRIPT }, { 0x2C6B7, 0x000D, NES_SCRIPT }, { 0x186BB, 0x0040, NES_SCRIPT }, { 0x186FB, 0x0016, NES_SCRIPT }, { 0x1B639, 0x0046, NES_SCRIPT }, - { 0x1EEC6, 0x00BD, NES_SCRIPT }, { 0x21C31, 0x0055, NES_SCRIPT }, { 0x177A8, 0x0027, NES_SCRIPT }, { 0x1FD07, 0x0027, NES_SCRIPT }, { 0x1FD2E, 0x0027, NES_SCRIPT }, - { 0x1BD2B, 0x0022, NES_SCRIPT }, { 0x15BE0, 0x0088, NES_SCRIPT }, { 0x22241, 0x0020, NES_SCRIPT }, { 0x22261, 0x008F, NES_SCRIPT }, { 0x1924A, 0x002B, NES_SCRIPT }, - { 0x1CB4A, 0x0061, NES_SCRIPT }, { 0x1CBAB, 0x003C, NES_SCRIPT }, { 0x1CBE7, 0x0042, NES_SCRIPT }, { 0x1CC29, 0x004F, NES_SCRIPT }, { 0x2049B, 0x0076, NES_SCRIPT }, - { 0x16A96, 0x0035, NES_SCRIPT }, { 0x16ACB, 0x001C, NES_SCRIPT }, { 0x16AE7, 0x0014, NES_SCRIPT }, { 0x16AFB, 0x001C, NES_SCRIPT }, { 0x16B17, 0x0027, NES_SCRIPT }, - { 0x16B3E, 0x01AA, NES_SCRIPT }, { 0x1D1CF, 0x0096, NES_SCRIPT }, { 0x1D265, 0x010E, NES_SCRIPT }, { 0x1D373, 0x001C, NES_SCRIPT }, { 0x1D38F, 0x0056, NES_SCRIPT }, - { 0x1D3E5, 0x0072, NES_SCRIPT }, { 0x1E480, 0x0028, NES_SCRIPT }, { 0x1E4A8, 0x017D, NES_SCRIPT }, { 0x1E625, 0x0229, NES_SCRIPT }, { 0x28932, 0x0071, NES_SCRIPT }, - { 0x17EB8, 0x004D, NES_SCRIPT }, { 0x162ED, 0x0039, NES_SCRIPT }, { 0x18711, 0x028B, NES_SCRIPT }, { 0x1899C, 0x00BB, NES_SCRIPT }, { 0x18A57, 0x018B, NES_SCRIPT }, - { 0x00000, 0x0000, NES_SCRIPT }, { 0x19E87, 0x00ED, NES_SCRIPT }, { 0x21C86, 0x00F6, NES_SCRIPT }, { 0x1E84E, 0x009B, NES_SCRIPT }, { 0x21D7C, 0x0047, NES_SCRIPT }, - { 0x2C6C4, 0x004D, NES_SCRIPT }, { 0x16326, 0x0024, NES_SCRIPT }, { 0x14D0D, 0x0014, NES_SCRIPT }, { 0x177CF, 0x0059, NES_SCRIPT }, { 0x17828, 0x0109, NES_SCRIPT }, - { 0x17931, 0x0009, NES_SCRIPT }, { 0x14D21, 0x01B6, NES_SCRIPT }, { 0x2B0F6, 0x0243, NES_SCRIPT }, { 0x230BF, 0x067F, NES_SCRIPT }, { 0x2C711, 0x001C, NES_SCRIPT }, - { 0x2C72D, 0x001A, NES_SCRIPT }, { 0x2C747, 0x0021, NES_SCRIPT }, { 0x2C768, 0x0024, NES_SCRIPT }, { 0x2C78C, 0x0017, NES_SCRIPT }, { 0x2C7A3, 0x0017, NES_SCRIPT }, - { 0x2C7BA, 0x0014, NES_SCRIPT }, { 0x2C7CE, 0x0024, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, { 0x2C7F2, 0x0011, NES_SCRIPT }, { 0x1793A, 0x009D, NES_SCRIPT }, - { 0x22750, 0x0066, NES_SCRIPT }, { 0x14ED7, 0x0075, NES_SCRIPT }, { 0x1F30C, 0x0120, NES_SCRIPT }, { 0x1FD55, 0x001D, NES_SCRIPT }, { 0x1F42C, 0x008F, NES_SCRIPT }, - { 0x1F4BB, 0x0097, NES_SCRIPT }, { 0x179D7, 0x006A, NES_SCRIPT }, { 0x17A41, 0x0030, NES_SCRIPT }, { 0x1F552, 0x0092, NES_SCRIPT }, { 0x2C803, 0x00CC, NES_SCRIPT }, - { 0x2C8CF, 0x00BA, NES_SCRIPT }, { 0x2C989, 0x0088, NES_SCRIPT }, { 0x20A09, 0x01B0, NES_SCRIPT }, { 0x20BB9, 0x0168, NES_SCRIPT }, { 0x20D21, 0x006C, NES_SCRIPT }, - { 0x20D8D, 0x0037, NES_SCRIPT }, { 0x20DC4, 0x00E4, NES_SCRIPT }, { 0x20EA8, 0x0045, NES_SCRIPT }, { 0x20EED, 0x00E1, NES_SCRIPT }, { 0x20FCE, 0x00F6, NES_SCRIPT }, - { 0x210C4, 0x0141, NES_SCRIPT }, { 0x21205, 0x0183, NES_SCRIPT }, { 0x21388, 0x0034, NES_SCRIPT }, { 0x213BC, 0x00A9, NES_SCRIPT }, { 0x24367, 0x011B, NES_SCRIPT }, - { 0x1BD4D, 0x0070, NES_SCRIPT }, { 0x1CC78, 0x0091, NES_SCRIPT }, { 0x29372, 0x0054, NES_SCRIPT }, { 0x19F74, 0x00CE, NES_SCRIPT }, { 0x1A042, 0x0077, NES_SCRIPT }, - { 0x14F4C, 0x0057, NES_SCRIPT }, { 0x27886, 0x02DF, NES_SCRIPT }, { 0x1DA2A, 0x0219, NES_SCRIPT }, { 0x1DC43, 0x00F9, NES_SCRIPT }, { 0x1DD3C, 0x0056, NES_SCRIPT }, - { 0x1DD92, 0x01C2, NES_SCRIPT }, { 0x14FA3, 0x004D, NES_SCRIPT }, { 0x27594, 0x00D9, NES_SCRIPT }, { 0x21DC3, 0x0013, NES_SCRIPT }, { 0x2A63D, 0x00F0, NES_SCRIPT }, - { 0x24482, 0x00E7, NES_SCRIPT }, { 0x21465, 0x00F2, NES_SCRIPT }, { 0x24569, 0x002B, NES_SCRIPT }, { 0x2C3CF, 0x010F, NES_SCRIPT }, { 0x24594, 0x00AA, NES_SCRIPT }, - { 0x24CE8, 0x0DAB, NES_SCRIPT }, { 0x1B67F, 0x000D, NES_SCRIPT }, { 0x1B68C, 0x000D, NES_SCRIPT }, { 0x2373E, 0x017C, NES_SCRIPT }, { 0x282F5, 0x01E1, NES_SCRIPT }, - { 0x238BA, 0x0153, NES_SCRIPT }, { 0x23A0D, 0x019C, NES_SCRIPT }, { 0x23BA9, 0x0016, NES_SCRIPT }, { 0x2C4DE, 0x005C, NES_SCRIPT }, { 0x23BBF, 0x0020, NES_SCRIPT }, - { 0x27D66, 0x00A5, NES_SCRIPT }, { 0x2A72D, 0x034D, NES_SCRIPT }, { 0x14FF0, 0x00E3, NES_SCRIPT }, { 0x2BABC, 0x005F, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, - { 0x25A93, 0x003C, NES_SCRIPT }, { 0x1E8E9, 0x0011, NES_SCRIPT }, { 0x1634A, 0x0018, NES_SCRIPT }, { 0x26DFD, 0x001F, NES_SCRIPT }, { 0x26E1C, 0x0054, NES_SCRIPT }, - { 0x26E70, 0x0149, NES_SCRIPT }, { 0x26FB9, 0x004B, NES_SCRIPT }, { 0x27004, 0x017D, NES_SCRIPT }, { 0x27181, 0x0027, NES_SCRIPT }, { 0x271A8, 0x0041, NES_SCRIPT }, - { 0x271E9, 0x01B1, NES_SCRIPT }, { 0x16362, 0x001F, NES_SCRIPT }, { 0x2463E, 0x002A, NES_SCRIPT }, { 0x150D3, 0x019E, NES_SCRIPT }, { 0x19275, 0x0031, NES_SCRIPT }, - { 0x17A71, 0x007C, NES_SCRIPT }, { 0x21557, 0x00DC, NES_SCRIPT }, { 0x1D457, 0x0018, NES_SCRIPT }, { 0x1D46F, 0x0053, NES_SCRIPT }, { 0x18BE2, 0x0005, NES_SCRIPT }, - { 0x15271, 0x011B, NES_SCRIPT }, { 0x1538C, 0x000B, NES_SCRIPT }, { 0x24668, 0x0138, NES_SCRIPT }, { 0x247A0, 0x0014, NES_SCRIPT }, { 0x1DF54, 0x0018, NES_SCRIPT }, - { 0x247B4, 0x0027, NES_SCRIPT }, { 0x1A0B9, 0x004D, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, { 0x2BB1B, 0x00A5, NES_SCRIPT }, { 0x2AA7A, 0x00C1, NES_SCRIPT }, - { 0x2AB3B, 0x0140, NES_SCRIPT }, { 0x19826, 0x00BF, NES_SCRIPT }, { 0x198E5, 0x014D, NES_SCRIPT }, { 0x19A32, 0x0012, NES_SCRIPT }, { 0x2AC7B, 0x0005, NES_SCRIPT }, - { 0x2AC80, 0x0005, NES_SCRIPT }, { 0x2AC85, 0x0005, NES_SCRIPT }, { 0x2AC8A, 0x0005, NES_SCRIPT }, { 0x2AC8F, 0x0005, NES_SCRIPT }, { 0x21633, 0x0033, NES_SCRIPT }, - { 0x2AC94, 0x0005, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, { 0x2AC99, 0x009C, NES_SCRIPT }, { 0x2AD35, 0x009C, NES_SCRIPT } -}; -static const ScummNESFile::Resource res_scripts_eur[179] = { - { 0x00000, 0x0000, NES_SCRIPT }, { 0x29966, 0x044D, NES_SCRIPT }, { 0x29DB3, 0x0207, NES_SCRIPT }, { 0x29FBA, 0x009F, NES_SCRIPT }, { 0x2A059, 0x03F4, NES_SCRIPT }, - { 0x2A44D, 0x01A1, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, { 0x2A5EE, 0x005C, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, { 0x2A64A, 0x0005, NES_SCRIPT }, - { 0x2C6AA, 0x000D, NES_SCRIPT }, { 0x2C6B7, 0x000D, NES_SCRIPT }, { 0x17889, 0x0040, NES_SCRIPT }, { 0x178C9, 0x0016, NES_SCRIPT }, { 0x1B6AE, 0x0046, NES_SCRIPT }, - { 0x1EE47, 0x00BD, NES_SCRIPT }, { 0x21C3B, 0x0055, NES_SCRIPT }, { 0x18AC0, 0x0027, NES_SCRIPT }, { 0x1FC88, 0x0027, NES_SCRIPT }, { 0x1FCAF, 0x0027, NES_SCRIPT }, - { 0x1BDA0, 0x0022, NES_SCRIPT }, { 0x15BE0, 0x0088, NES_SCRIPT }, { 0x2224B, 0x0020, NES_SCRIPT }, { 0x2226B, 0x008F, NES_SCRIPT }, { 0x1947D, 0x002B, NES_SCRIPT }, - { 0x1CACB, 0x0061, NES_SCRIPT }, { 0x1CB2C, 0x003C, NES_SCRIPT }, { 0x1CB68, 0x0042, NES_SCRIPT }, { 0x1CBAA, 0x004F, NES_SCRIPT }, { 0x2049B, 0x0076, NES_SCRIPT }, - { 0x16A96, 0x0035, NES_SCRIPT }, { 0x16ACB, 0x001C, NES_SCRIPT }, { 0x16AE7, 0x0014, NES_SCRIPT }, { 0x16AFB, 0x001C, NES_SCRIPT }, { 0x16B17, 0x0027, NES_SCRIPT }, - { 0x16B3E, 0x01AA, NES_SCRIPT }, { 0x1D150, 0x0096, NES_SCRIPT }, { 0x1D1E6, 0x010E, NES_SCRIPT }, { 0x1D2F4, 0x001C, NES_SCRIPT }, { 0x1D310, 0x0056, NES_SCRIPT }, - { 0x1D366, 0x0072, NES_SCRIPT }, { 0x1E401, 0x0028, NES_SCRIPT }, { 0x1E429, 0x017D, NES_SCRIPT }, { 0x1E5A6, 0x0229, NES_SCRIPT }, { 0x28932, 0x0071, NES_SCRIPT }, - { 0x13EC6, 0x004D, NES_SCRIPT }, { 0x162ED, 0x0039, NES_SCRIPT }, { 0x178DF, 0x028B, NES_SCRIPT }, { 0x17B6A, 0x00BB, NES_SCRIPT }, { 0x17C25, 0x018B, NES_SCRIPT }, - { 0x00000, 0x0000, NES_SCRIPT }, { 0x19FE3, 0x00ED, NES_SCRIPT }, { 0x21C90, 0x00F6, NES_SCRIPT }, { 0x1E7CF, 0x009B, NES_SCRIPT }, { 0x21D86, 0x0047, NES_SCRIPT }, - { 0x2C6C4, 0x004D, NES_SCRIPT }, { 0x16326, 0x0024, NES_SCRIPT }, { 0x14D0D, 0x0014, NES_SCRIPT }, { 0x18AE7, 0x0059, NES_SCRIPT }, { 0x18B40, 0x011E, NES_SCRIPT }, - { 0x18C5E, 0x0009, NES_SCRIPT }, { 0x14D21, 0x01B6, NES_SCRIPT }, { 0x2B108, 0x0243, NES_SCRIPT }, { 0x230C9, 0x067F, NES_SCRIPT }, { 0x2C711, 0x001C, NES_SCRIPT }, - { 0x2C72D, 0x001A, NES_SCRIPT }, { 0x2C747, 0x0021, NES_SCRIPT }, { 0x2C768, 0x0024, NES_SCRIPT }, { 0x2C78C, 0x0017, NES_SCRIPT }, { 0x2C7A3, 0x0017, NES_SCRIPT }, - { 0x2C7BA, 0x0014, NES_SCRIPT }, { 0x2C7CE, 0x0024, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, { 0x2C7F2, 0x0011, NES_SCRIPT }, { 0x18C67, 0x009D, NES_SCRIPT }, - { 0x2275A, 0x0066, NES_SCRIPT }, { 0x14ED7, 0x0075, NES_SCRIPT }, { 0x1F28D, 0x0120, NES_SCRIPT }, { 0x1FCD6, 0x001D, NES_SCRIPT }, { 0x1F3AD, 0x008F, NES_SCRIPT }, - { 0x1F43C, 0x0097, NES_SCRIPT }, { 0x18D04, 0x006A, NES_SCRIPT }, { 0x18D6E, 0x0030, NES_SCRIPT }, { 0x1F4D3, 0x0092, NES_SCRIPT }, { 0x2C803, 0x00CC, NES_SCRIPT }, - { 0x2C8CF, 0x00BA, NES_SCRIPT }, { 0x2C989, 0x0088, NES_SCRIPT }, { 0x20A09, 0x01B0, NES_SCRIPT }, { 0x20BB9, 0x0168, NES_SCRIPT }, { 0x20D21, 0x006C, NES_SCRIPT }, - { 0x20D8D, 0x0037, NES_SCRIPT }, { 0x20DC4, 0x00E4, NES_SCRIPT }, { 0x20EA8, 0x0045, NES_SCRIPT }, { 0x20EED, 0x00E1, NES_SCRIPT }, { 0x20FCE, 0x00F6, NES_SCRIPT }, - { 0x210C4, 0x0141, NES_SCRIPT }, { 0x21205, 0x0183, NES_SCRIPT }, { 0x21388, 0x0034, NES_SCRIPT }, { 0x213BC, 0x00A9, NES_SCRIPT }, { 0x24367, 0x011B, NES_SCRIPT }, - { 0x1BDC2, 0x0070, NES_SCRIPT }, { 0x1CBF9, 0x0091, NES_SCRIPT }, { 0x29372, 0x0054, NES_SCRIPT }, { 0x1A0D0, 0x00CE, NES_SCRIPT }, { 0x1A19E, 0x0077, NES_SCRIPT }, - { 0x14F4C, 0x0057, NES_SCRIPT }, { 0x2790A, 0x02DF, NES_SCRIPT }, { 0x1D9AB, 0x0219, NES_SCRIPT }, { 0x1DBC4, 0x00F9, NES_SCRIPT }, { 0x1DCBD, 0x0056, NES_SCRIPT }, - { 0x1DD13, 0x01C2, NES_SCRIPT }, { 0x14FA3, 0x004D, NES_SCRIPT }, { 0x27618, 0x00D9, NES_SCRIPT }, { 0x21DCD, 0x0013, NES_SCRIPT }, { 0x2A64F, 0x00F0, NES_SCRIPT }, - { 0x24482, 0x00E7, NES_SCRIPT }, { 0x21465, 0x00F2, NES_SCRIPT }, { 0x24569, 0x002B, NES_SCRIPT }, { 0x2C3CF, 0x010F, NES_SCRIPT }, { 0x24594, 0x00AA, NES_SCRIPT }, - { 0x250B2, 0x0DAB, NES_SCRIPT }, { 0x1B6F4, 0x000D, NES_SCRIPT }, { 0x1B701, 0x000D, NES_SCRIPT }, { 0x23748, 0x017C, NES_SCRIPT }, { 0x282F5, 0x01E1, NES_SCRIPT }, - { 0x238C4, 0x0153, NES_SCRIPT }, { 0x23A17, 0x019C, NES_SCRIPT }, { 0x23BB3, 0x0016, NES_SCRIPT }, { 0x2C4DE, 0x005C, NES_SCRIPT }, { 0x23BC9, 0x0020, NES_SCRIPT }, - { 0x27DEA, 0x00A5, NES_SCRIPT }, { 0x2A73F, 0x034D, NES_SCRIPT }, { 0x14FF0, 0x00E3, NES_SCRIPT }, { 0x2BACE, 0x005F, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, - { 0x25E5D, 0x003C, NES_SCRIPT }, { 0x1E86A, 0x0011, NES_SCRIPT }, { 0x1634A, 0x0018, NES_SCRIPT }, { 0x26E81, 0x001F, NES_SCRIPT }, { 0x26EA0, 0x0054, NES_SCRIPT }, - { 0x26EF4, 0x0149, NES_SCRIPT }, { 0x2703D, 0x004B, NES_SCRIPT }, { 0x27088, 0x017D, NES_SCRIPT }, { 0x27205, 0x0027, NES_SCRIPT }, { 0x2722C, 0x0041, NES_SCRIPT }, - { 0x2726D, 0x01B1, NES_SCRIPT }, { 0x16362, 0x001F, NES_SCRIPT }, { 0x2463E, 0x002A, NES_SCRIPT }, { 0x150D3, 0x019E, NES_SCRIPT }, { 0x194A8, 0x0031, NES_SCRIPT }, - { 0x18D9E, 0x007C, NES_SCRIPT }, { 0x21557, 0x00DC, NES_SCRIPT }, { 0x1D3D8, 0x0018, NES_SCRIPT }, { 0x1D3F0, 0x0053, NES_SCRIPT }, { 0x17DB0, 0x0005, NES_SCRIPT }, - { 0x15271, 0x011B, NES_SCRIPT }, { 0x1538C, 0x000B, NES_SCRIPT }, { 0x24668, 0x0138, NES_SCRIPT }, { 0x247A0, 0x0014, NES_SCRIPT }, { 0x1DED5, 0x0018, NES_SCRIPT }, - { 0x247B4, 0x0027, NES_SCRIPT }, { 0x1A215, 0x004D, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, { 0x2BB2D, 0x00A5, NES_SCRIPT }, { 0x2AA8C, 0x00C1, NES_SCRIPT }, - { 0x2AB4D, 0x0140, NES_SCRIPT }, { 0x19982, 0x00BF, NES_SCRIPT }, { 0x19A41, 0x014D, NES_SCRIPT }, { 0x19B8E, 0x0012, NES_SCRIPT }, { 0x2AC8D, 0x0005, NES_SCRIPT }, - { 0x2AC92, 0x0005, NES_SCRIPT }, { 0x2AC97, 0x0005, NES_SCRIPT }, { 0x2AC9C, 0x0005, NES_SCRIPT }, { 0x2ACA1, 0x0005, NES_SCRIPT }, { 0x21633, 0x0033, NES_SCRIPT }, - { 0x2ACA6, 0x0005, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, { 0x2ACAB, 0x009C, NES_SCRIPT }, { 0x2AD47, 0x009C, NES_SCRIPT } -}; -static const ScummNESFile::Resource res_scripts_swe[179] = { - { 0x00000, 0x0000, NES_SCRIPT }, { 0x28F80, 0x043B, NES_SCRIPT }, { 0x293BB, 0x0209, NES_SCRIPT }, { 0x295C4, 0x00AB, NES_SCRIPT }, { 0x2966F, 0x03FD, NES_SCRIPT }, - { 0x29A6C, 0x01A1, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, { 0x29C0D, 0x005C, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, { 0x29C69, 0x0005, NES_SCRIPT }, - { 0x2B980, 0x000D, NES_SCRIPT }, { 0x2B98D, 0x000D, NES_SCRIPT }, { 0x186C8, 0x0040, NES_SCRIPT }, { 0x18708, 0x0016, NES_SCRIPT }, { 0x1B4B1, 0x0046, NES_SCRIPT }, - { 0x1EEBB, 0x00B8, NES_SCRIPT }, { 0x21CFA, 0x005C, NES_SCRIPT }, { 0x17537, 0x0027, NES_SCRIPT }, { 0x1FD0A, 0x0027, NES_SCRIPT }, { 0x1FD31, 0x0027, NES_SCRIPT }, - { 0x1BBB5, 0x0022, NES_SCRIPT }, { 0x15BC0, 0x0085, NES_SCRIPT }, { 0x22324, 0x001E, NES_SCRIPT }, { 0x22342, 0x008F, NES_SCRIPT }, { 0x19252, 0x002B, NES_SCRIPT }, - { 0x1CB1B, 0x006D, NES_SCRIPT }, { 0x1CB88, 0x004C, NES_SCRIPT }, { 0x1CBD4, 0x0044, NES_SCRIPT }, { 0x1CC18, 0x0053, NES_SCRIPT }, { 0x2049D, 0x0081, NES_SCRIPT }, - { 0x1634C, 0x0035, NES_SCRIPT }, { 0x16381, 0x001C, NES_SCRIPT }, { 0x1639D, 0x0014, NES_SCRIPT }, { 0x163B1, 0x001C, NES_SCRIPT }, { 0x163CD, 0x0027, NES_SCRIPT }, - { 0x163F4, 0x019B, NES_SCRIPT }, { 0x1D183, 0x0094, NES_SCRIPT }, { 0x1D217, 0x0117, NES_SCRIPT }, { 0x1D32E, 0x001C, NES_SCRIPT }, { 0x1D34A, 0x0056, NES_SCRIPT }, - { 0x1D3A0, 0x0072, NES_SCRIPT }, { 0x1E47F, 0x0028, NES_SCRIPT }, { 0x1E4A7, 0x0175, NES_SCRIPT }, { 0x1E61C, 0x022B, NES_SCRIPT }, { 0x27C85, 0x0071, NES_SCRIPT }, - { 0x17C86, 0x004A, NES_SCRIPT }, { 0x13DD6, 0x0039, NES_SCRIPT }, { 0x1871E, 0x0270, NES_SCRIPT }, { 0x1898E, 0x00C0, NES_SCRIPT }, { 0x18A4E, 0x01B6, NES_SCRIPT }, - { 0x00000, 0x0000, NES_SCRIPT }, { 0x19DC9, 0x00EE, NES_SCRIPT }, { 0x21D56, 0x00F5, NES_SCRIPT }, { 0x1E847, 0x0094, NES_SCRIPT }, { 0x21E4B, 0x0047, NES_SCRIPT }, - { 0x2B99A, 0x004D, NES_SCRIPT }, { 0x13E0F, 0x0024, NES_SCRIPT }, { 0x14D13, 0x0014, NES_SCRIPT }, { 0x1755E, 0x0054, NES_SCRIPT }, { 0x175B2, 0x011A, NES_SCRIPT }, - { 0x176CC, 0x0009, NES_SCRIPT }, { 0x14D27, 0x01B9, NES_SCRIPT }, { 0x2AA0E, 0x0256, NES_SCRIPT }, { 0x231A4, 0x06D2, NES_SCRIPT }, { 0x2B9E7, 0x001D, NES_SCRIPT }, - { 0x2BA04, 0x0016, NES_SCRIPT }, { 0x2BA1A, 0x002D, NES_SCRIPT }, { 0x2BA47, 0x0027, NES_SCRIPT }, { 0x2BA6E, 0x0016, NES_SCRIPT }, { 0x2BA84, 0x0014, NES_SCRIPT }, - { 0x2BA98, 0x0015, NES_SCRIPT }, { 0x2BAAD, 0x0029, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, { 0x2BAD6, 0x0010, NES_SCRIPT }, { 0x176D5, 0x00A2, NES_SCRIPT }, - { 0x22831, 0x0066, NES_SCRIPT }, { 0x14EE0, 0x0077, NES_SCRIPT }, { 0x1F30B, 0x011A, NES_SCRIPT }, { 0x1FD58, 0x001D, NES_SCRIPT }, { 0x1F425, 0x0095, NES_SCRIPT }, - { 0x1F4BA, 0x009E, NES_SCRIPT }, { 0x17777, 0x006F, NES_SCRIPT }, { 0x177E6, 0x002F, NES_SCRIPT }, { 0x1F558, 0x0098, NES_SCRIPT }, { 0x2BAE6, 0x00C4, NES_SCRIPT }, - { 0x2BBAA, 0x00AE, NES_SCRIPT }, { 0x2BC58, 0x0088, NES_SCRIPT }, { 0x20A3C, 0x01BB, NES_SCRIPT }, { 0x20BF7, 0x0197, NES_SCRIPT }, { 0x20D8E, 0x006E, NES_SCRIPT }, - { 0x20DFC, 0x0028, NES_SCRIPT }, { 0x20E24, 0x00EA, NES_SCRIPT }, { 0x20F0E, 0x0049, NES_SCRIPT }, { 0x20F57, 0x00E7, NES_SCRIPT }, { 0x2103E, 0x010C, NES_SCRIPT }, - { 0x2114A, 0x0151, NES_SCRIPT }, { 0x2129B, 0x01B0, NES_SCRIPT }, { 0x2144B, 0x0034, NES_SCRIPT }, { 0x2147F, 0x00A9, NES_SCRIPT }, { 0x24379, 0x010E, NES_SCRIPT }, - { 0x1BBD7, 0x0072, NES_SCRIPT }, { 0x1CC6B, 0x0092, NES_SCRIPT }, { 0x2898B, 0x0054, NES_SCRIPT }, { 0x19EB7, 0x00D3, NES_SCRIPT }, { 0x19F8A, 0x0077, NES_SCRIPT }, - { 0x14F57, 0x0057, NES_SCRIPT }, { 0x2703E, 0x0307, NES_SCRIPT }, { 0x1D9FB, 0x024F, NES_SCRIPT }, { 0x1DC4A, 0x00E4, NES_SCRIPT }, { 0x1DD2E, 0x0059, NES_SCRIPT }, - { 0x1DD87, 0x01C2, NES_SCRIPT }, { 0x14FAE, 0x004D, NES_SCRIPT }, { 0x26D52, 0x00D5, NES_SCRIPT }, { 0x21E92, 0x0013, NES_SCRIPT }, { 0x29C6E, 0x00F0, NES_SCRIPT }, - { 0x24487, 0x00E0, NES_SCRIPT }, { 0x21528, 0x00F2, NES_SCRIPT }, { 0x24567, 0x0023, NES_SCRIPT }, { 0x2B6B2, 0x010B, NES_SCRIPT }, { 0x2458A, 0x00A1, NES_SCRIPT }, - { 0x250A0, 0x018B, NES_SCRIPT }, { 0x1B4F7, 0x000D, NES_SCRIPT }, { 0x1B504, 0x000D, NES_SCRIPT }, { 0x23876, 0x018E, NES_SCRIPT }, { 0x27639, 0x01F0, NES_SCRIPT }, - { 0x23A04, 0x017B, NES_SCRIPT }, { 0x23B7F, 0x01AC, NES_SCRIPT }, { 0x23D2B, 0x0016, NES_SCRIPT }, { 0x2B7BD, 0x005B, NES_SCRIPT }, { 0x23D41, 0x0020, NES_SCRIPT }, - { 0x2A643, 0x00A6, NES_SCRIPT }, { 0x29D5E, 0x0399, NES_SCRIPT }, { 0x14FFB, 0x00D2, NES_SCRIPT }, { 0x2B1DE, 0x0063, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, - { 0x2522B, 0x003C, NES_SCRIPT }, { 0x1E8DB, 0x0011, NES_SCRIPT }, { 0x13E33, 0x0018, NES_SCRIPT }, { 0x26585, 0x001F, NES_SCRIPT }, { 0x265A4, 0x0054, NES_SCRIPT }, - { 0x265F8, 0x017D, NES_SCRIPT }, { 0x26775, 0x004B, NES_SCRIPT }, { 0x267C0, 0x0165, NES_SCRIPT }, { 0x26925, 0x0027, NES_SCRIPT }, { 0x2694C, 0x0041, NES_SCRIPT }, - { 0x2698D, 0x01CB, NES_SCRIPT }, { 0x13E4B, 0x001F, NES_SCRIPT }, { 0x2462B, 0x002A, NES_SCRIPT }, { 0x150CD, 0x0187, NES_SCRIPT }, { 0x1927D, 0x0031, NES_SCRIPT }, - { 0x17815, 0x0087, NES_SCRIPT }, { 0x2161A, 0x00D8, NES_SCRIPT }, { 0x1D412, 0x0018, NES_SCRIPT }, { 0x1D42A, 0x0058, NES_SCRIPT }, { 0x18C04, 0x0005, NES_SCRIPT }, - { 0x15254, 0x0108, NES_SCRIPT }, { 0x1535C, 0x000B, NES_SCRIPT }, { 0x24655, 0x0139, NES_SCRIPT }, { 0x2478E, 0x0014, NES_SCRIPT }, { 0x1DF49, 0x0018, NES_SCRIPT }, - { 0x247A2, 0x0027, NES_SCRIPT }, { 0x1A001, 0x004C, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, { 0x2B241, 0x00A5, NES_SCRIPT }, { 0x2A0F7, 0x00B5, NES_SCRIPT }, - { 0x2A1AC, 0x0140, NES_SCRIPT }, { 0x19759, 0x00CA, NES_SCRIPT }, { 0x19823, 0x014D, NES_SCRIPT }, { 0x19970, 0x0012, NES_SCRIPT }, { 0x2A2EC, 0x0005, NES_SCRIPT }, - { 0x2A2F1, 0x0005, NES_SCRIPT }, { 0x2A2F6, 0x0005, NES_SCRIPT }, { 0x2A2FB, 0x0005, NES_SCRIPT }, { 0x2A300, 0x0005, NES_SCRIPT }, { 0x216F2, 0x0033, NES_SCRIPT }, - { 0x2A305, 0x0005, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, { 0x2A30A, 0x009C, NES_SCRIPT }, { 0x2A3A6, 0x009C, NES_SCRIPT } -}; -static const ScummNESFile::Resource res_scripts_fra[179] = { - { 0x00000, 0x0000, NES_SCRIPT }, { 0x2947D, 0x0480, NES_SCRIPT }, { 0x298FD, 0x0226, NES_SCRIPT }, { 0x29B23, 0x0092, NES_SCRIPT }, { 0x29BB5, 0x040C, NES_SCRIPT }, - { 0x29FC1, 0x01A1, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, { 0x2A162, 0x005C, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, { 0x2A1BE, 0x0005, NES_SCRIPT }, - { 0x2C169, 0x000D, NES_SCRIPT }, { 0x2C176, 0x000D, NES_SCRIPT }, { 0x186E3, 0x0040, NES_SCRIPT }, { 0x18723, 0x0016, NES_SCRIPT }, { 0x1B59F, 0x0046, NES_SCRIPT }, - { 0x1EFD7, 0x00CB, NES_SCRIPT }, { 0x21D09, 0x0054, NES_SCRIPT }, { 0x176C8, 0x0027, NES_SCRIPT }, { 0x1FE6A, 0x0027, NES_SCRIPT }, { 0x1FE91, 0x0027, NES_SCRIPT }, - { 0x1BC9A, 0x0022, NES_SCRIPT }, { 0x15CD6, 0x0092, NES_SCRIPT }, { 0x22336, 0x001C, NES_SCRIPT }, { 0x22352, 0x008F, NES_SCRIPT }, { 0x192A5, 0x002B, NES_SCRIPT }, - { 0x1CAAA, 0x0069, NES_SCRIPT }, { 0x1CB13, 0x0054, NES_SCRIPT }, { 0x1CB67, 0x0048, NES_SCRIPT }, { 0x1CBAF, 0x0058, NES_SCRIPT }, { 0x204B6, 0x0078, NES_SCRIPT }, - { 0x16471, 0x0035, NES_SCRIPT }, { 0x164A6, 0x001C, NES_SCRIPT }, { 0x164C2, 0x0014, NES_SCRIPT }, { 0x164D6, 0x001C, NES_SCRIPT }, { 0x164F2, 0x0027, NES_SCRIPT }, - { 0x16519, 0x01BB, NES_SCRIPT }, { 0x1D135, 0x008D, NES_SCRIPT }, { 0x1D1C2, 0x0119, NES_SCRIPT }, { 0x1D2DB, 0x001C, NES_SCRIPT }, { 0x1D2F7, 0x0056, NES_SCRIPT }, - { 0x1D34D, 0x0072, NES_SCRIPT }, { 0x1E4BF, 0x0028, NES_SCRIPT }, { 0x1E4E7, 0x01E0, NES_SCRIPT }, { 0x1E6C7, 0x0241, NES_SCRIPT }, { 0x2845D, 0x0071, NES_SCRIPT }, - { 0x17E48, 0x004C, NES_SCRIPT }, { 0x13DE3, 0x0039, NES_SCRIPT }, { 0x18739, 0x0296, NES_SCRIPT }, { 0x189CF, 0x00C2, NES_SCRIPT }, { 0x18A91, 0x01A5, NES_SCRIPT }, - { 0x00000, 0x0000, NES_SCRIPT }, { 0x19E13, 0x00F3, NES_SCRIPT }, { 0x21D5D, 0x00F6, NES_SCRIPT }, { 0x1E908, 0x00B8, NES_SCRIPT }, { 0x21E53, 0x0047, NES_SCRIPT }, - { 0x2C183, 0x004D, NES_SCRIPT }, { 0x13E1C, 0x0024, NES_SCRIPT }, { 0x14D77, 0x0014, NES_SCRIPT }, { 0x176EF, 0x0059, NES_SCRIPT }, { 0x17748, 0x013F, NES_SCRIPT }, - { 0x17887, 0x0009, NES_SCRIPT }, { 0x14D8B, 0x01D4, NES_SCRIPT }, { 0x2ACFB, 0x028D, NES_SCRIPT }, { 0x23203, 0x0779, NES_SCRIPT }, { 0x2C1D0, 0x001B, NES_SCRIPT }, - { 0x2C1EB, 0x001F, NES_SCRIPT }, { 0x2C20A, 0x0024, NES_SCRIPT }, { 0x2C22E, 0x0019, NES_SCRIPT }, { 0x2C247, 0x0018, NES_SCRIPT }, { 0x2C25F, 0x001D, NES_SCRIPT }, - { 0x2C27C, 0x0016, NES_SCRIPT }, { 0x2C292, 0x0027, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, { 0x2C2B9, 0x0011, NES_SCRIPT }, { 0x17890, 0x00AA, NES_SCRIPT }, - { 0x22846, 0x0066, NES_SCRIPT }, { 0x14F5F, 0x0083, NES_SCRIPT }, { 0x1F43C, 0x013A, NES_SCRIPT }, { 0x1FEB8, 0x001D, NES_SCRIPT }, { 0x1F576, 0x0098, NES_SCRIPT }, - { 0x1F60E, 0x009B, NES_SCRIPT }, { 0x1793A, 0x006E, NES_SCRIPT }, { 0x179A8, 0x0033, NES_SCRIPT }, { 0x1F6A9, 0x00A5, NES_SCRIPT }, { 0x2C2CA, 0x00BA, NES_SCRIPT }, - { 0x2C384, 0x00AC, NES_SCRIPT }, { 0x2C430, 0x008F, NES_SCRIPT }, { 0x20A2D, 0x01BE, NES_SCRIPT }, { 0x20BEB, 0x0158, NES_SCRIPT }, { 0x20D43, 0x0079, NES_SCRIPT }, - { 0x20DBC, 0x002B, NES_SCRIPT }, { 0x20DE7, 0x00E8, NES_SCRIPT }, { 0x20ECF, 0x004A, NES_SCRIPT }, { 0x20F19, 0x0110, NES_SCRIPT }, { 0x21029, 0x0136, NES_SCRIPT }, - { 0x2115F, 0x0152, NES_SCRIPT }, { 0x212B1, 0x01B3, NES_SCRIPT }, { 0x21464, 0x0032, NES_SCRIPT }, { 0x21496, 0x00A9, NES_SCRIPT }, { 0x2437F, 0x0133, NES_SCRIPT }, - { 0x1BCBC, 0x0074, NES_SCRIPT }, { 0x1CC07, 0x0090, NES_SCRIPT }, { 0x28E43, 0x0054, NES_SCRIPT }, { 0x19F06, 0x00DB, NES_SCRIPT }, { 0x19FE1, 0x0080, NES_SCRIPT }, - { 0x14FE2, 0x0057, NES_SCRIPT }, { 0x273F4, 0x031F, NES_SCRIPT }, { 0x1D9D4, 0x0238, NES_SCRIPT }, { 0x1DC0C, 0x00FE, NES_SCRIPT }, { 0x1DD0A, 0x005A, NES_SCRIPT }, - { 0x1DD64, 0x01F5, NES_SCRIPT }, { 0x15039, 0x004D, NES_SCRIPT }, { 0x270DD, 0x0100, NES_SCRIPT }, { 0x21E9A, 0x0013, NES_SCRIPT }, { 0x2A1C3, 0x00F0, NES_SCRIPT }, - { 0x244B2, 0x00E4, NES_SCRIPT }, { 0x2153F, 0x00EC, NES_SCRIPT }, { 0x24596, 0x0033, NES_SCRIPT }, { 0x2BC04, 0x0108, NES_SCRIPT }, { 0x245C9, 0x009F, NES_SCRIPT }, - { 0x250F1, 0x0193, NES_SCRIPT }, { 0x1B5E5, 0x000D, NES_SCRIPT }, { 0x1B5F2, 0x000D, NES_SCRIPT }, { 0x2397C, 0x0199, NES_SCRIPT }, { 0x27A07, 0x0233, NES_SCRIPT }, - { 0x23B15, 0x0171, NES_SCRIPT }, { 0x23C86, 0x01BC, NES_SCRIPT }, { 0x23E42, 0x0016, NES_SCRIPT }, { 0x2BD0C, 0x005B, NES_SCRIPT }, { 0x23E58, 0x0020, NES_SCRIPT }, - { 0x27E3B, 0x00B9, NES_SCRIPT }, { 0x2A2B3, 0x03D3, NES_SCRIPT }, { 0x15086, 0x00E4, NES_SCRIPT }, { 0x2B70C, 0x0067, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, - { 0x25284, 0x003C, NES_SCRIPT }, { 0x1E9C0, 0x0011, NES_SCRIPT }, { 0x13E40, 0x0018, NES_SCRIPT }, { 0x26621, 0x001F, NES_SCRIPT }, { 0x26640, 0x0054, NES_SCRIPT }, - { 0x26694, 0x0173, NES_SCRIPT }, { 0x26807, 0x004B, NES_SCRIPT }, { 0x26852, 0x0190, NES_SCRIPT }, { 0x269E2, 0x0027, NES_SCRIPT }, { 0x26A09, 0x0041, NES_SCRIPT }, - { 0x26A4A, 0x024E, NES_SCRIPT }, { 0x13E58, 0x001F, NES_SCRIPT }, { 0x24668, 0x002A, NES_SCRIPT }, { 0x1516A, 0x01C9, NES_SCRIPT }, { 0x192D0, 0x0031, NES_SCRIPT }, - { 0x179DB, 0x0088, NES_SCRIPT }, { 0x2162B, 0x00D0, NES_SCRIPT }, { 0x1D3BF, 0x0018, NES_SCRIPT }, { 0x1D3D7, 0x0055, NES_SCRIPT }, { 0x18C36, 0x0005, NES_SCRIPT }, - { 0x15333, 0x0113, NES_SCRIPT }, { 0x15446, 0x000B, NES_SCRIPT }, { 0x24692, 0x014D, NES_SCRIPT }, { 0x247DF, 0x0014, NES_SCRIPT }, { 0x1DF59, 0x0018, NES_SCRIPT }, - { 0x247F3, 0x0027, NES_SCRIPT }, { 0x1A061, 0x0050, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, { 0x2B773, 0x00A5, NES_SCRIPT }, { 0x2A686, 0x00BA, NES_SCRIPT }, - { 0x2A740, 0x0140, NES_SCRIPT }, { 0x1979F, 0x00CA, NES_SCRIPT }, { 0x19869, 0x014D, NES_SCRIPT }, { 0x199B6, 0x0012, NES_SCRIPT }, { 0x2A880, 0x0005, NES_SCRIPT }, - { 0x2A885, 0x0005, NES_SCRIPT }, { 0x2A88A, 0x0005, NES_SCRIPT }, { 0x2A88F, 0x0005, NES_SCRIPT }, { 0x2A894, 0x0005, NES_SCRIPT }, { 0x216FB, 0x0033, NES_SCRIPT }, - { 0x2A899, 0x0005, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, { 0x2A89E, 0x009C, NES_SCRIPT }, { 0x2A93A, 0x009C, NES_SCRIPT } -}; -static const ScummNESFile::Resource res_scripts_ger[179] = { - { 0x00000, 0x0000, NES_SCRIPT }, { 0x295B0, 0x045A, NES_SCRIPT }, { 0x29A0A, 0x0218, NES_SCRIPT }, { 0x29C22, 0x00B1, NES_SCRIPT }, { 0x29CD3, 0x0408, NES_SCRIPT }, - { 0x2A0DB, 0x01A1, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, { 0x2A27C, 0x005C, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, { 0x2A2D8, 0x0005, NES_SCRIPT }, - { 0x2C169, 0x000D, NES_SCRIPT }, { 0x2C176, 0x000D, NES_SCRIPT }, { 0x186DB, 0x0040, NES_SCRIPT }, { 0x1871B, 0x0016, NES_SCRIPT }, { 0x1B5C2, 0x0046, NES_SCRIPT }, - { 0x1EFB7, 0x00E3, NES_SCRIPT }, { 0x21D9D, 0x0069, NES_SCRIPT }, { 0x174F1, 0x0027, NES_SCRIPT }, { 0x1FE92, 0x0027, NES_SCRIPT }, { 0x1FEB9, 0x0027, NES_SCRIPT }, - { 0x1BCE5, 0x0022, NES_SCRIPT }, { 0x13EF4, 0x0087, NES_SCRIPT }, { 0x223EC, 0x001F, NES_SCRIPT }, { 0x2240B, 0x008F, NES_SCRIPT }, { 0x192CC, 0x002B, NES_SCRIPT }, - { 0x1CB08, 0x006E, NES_SCRIPT }, { 0x1CB76, 0x004E, NES_SCRIPT }, { 0x1CBC4, 0x004D, NES_SCRIPT }, { 0x1CC11, 0x0059, NES_SCRIPT }, { 0x204AA, 0x0080, NES_SCRIPT }, - { 0x1628E, 0x0035, NES_SCRIPT }, { 0x162C3, 0x001C, NES_SCRIPT }, { 0x162DF, 0x0014, NES_SCRIPT }, { 0x162F3, 0x001C, NES_SCRIPT }, { 0x1630F, 0x0027, NES_SCRIPT }, - { 0x16336, 0x01D1, NES_SCRIPT }, { 0x1D199, 0x00A0, NES_SCRIPT }, { 0x1D239, 0x011C, NES_SCRIPT }, { 0x1D355, 0x001C, NES_SCRIPT }, { 0x1D371, 0x0056, NES_SCRIPT }, - { 0x1D3C7, 0x0072, NES_SCRIPT }, { 0x1E4FA, 0x0028, NES_SCRIPT }, { 0x1E522, 0x019D, NES_SCRIPT }, { 0x1E6BF, 0x023B, NES_SCRIPT }, { 0x2845D, 0x0071, NES_SCRIPT }, - { 0x17C50, 0x0052, NES_SCRIPT }, { 0x15AC9, 0x0039, NES_SCRIPT }, { 0x18731, 0x02E7, NES_SCRIPT }, { 0x18A18, 0x00BC, NES_SCRIPT }, { 0x18AD4, 0x01A2, NES_SCRIPT }, - { 0x00000, 0x0000, NES_SCRIPT }, { 0x19E45, 0x00F8, NES_SCRIPT }, { 0x21E06, 0x00F7, NES_SCRIPT }, { 0x1E8FA, 0x00B5, NES_SCRIPT }, { 0x21EFD, 0x0047, NES_SCRIPT }, - { 0x2C183, 0x004D, NES_SCRIPT }, { 0x15B02, 0x0024, NES_SCRIPT }, { 0x14D64, 0x0014, NES_SCRIPT }, { 0x17518, 0x005E, NES_SCRIPT }, { 0x17576, 0x0125, NES_SCRIPT }, - { 0x1769B, 0x0009, NES_SCRIPT }, { 0x14D78, 0x01C7, NES_SCRIPT }, { 0x2ADCE, 0x0263, NES_SCRIPT }, { 0x232AF, 0x077F, NES_SCRIPT }, { 0x2C1D0, 0x001E, NES_SCRIPT }, - { 0x2C1EE, 0x0024, NES_SCRIPT }, { 0x2C212, 0x002E, NES_SCRIPT }, { 0x2C240, 0x0022, NES_SCRIPT }, { 0x2C262, 0x0013, NES_SCRIPT }, { 0x2C275, 0x001E, NES_SCRIPT }, - { 0x2C293, 0x0016, NES_SCRIPT }, { 0x2C2A9, 0x0027, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, { 0x2C2D0, 0x0012, NES_SCRIPT }, { 0x176A4, 0x00A4, NES_SCRIPT }, - { 0x228F8, 0x0066, NES_SCRIPT }, { 0x14F3F, 0x007F, NES_SCRIPT }, { 0x1F428, 0x013A, NES_SCRIPT }, { 0x1FEE0, 0x001D, NES_SCRIPT }, { 0x1F562, 0x00A0, NES_SCRIPT }, - { 0x1F602, 0x00A4, NES_SCRIPT }, { 0x17748, 0x0076, NES_SCRIPT }, { 0x177BE, 0x0036, NES_SCRIPT }, { 0x1F6A6, 0x00B9, NES_SCRIPT }, { 0x2C2E2, 0x00CB, NES_SCRIPT }, - { 0x2C3AD, 0x00B7, NES_SCRIPT }, { 0x2C464, 0x008A, NES_SCRIPT }, { 0x20A58, 0x01BD, NES_SCRIPT }, { 0x20C15, 0x0181, NES_SCRIPT }, { 0x20D96, 0x0078, NES_SCRIPT }, - { 0x20E0E, 0x003C, NES_SCRIPT }, { 0x20E4A, 0x00E9, NES_SCRIPT }, { 0x20F33, 0x0046, NES_SCRIPT }, { 0x20F79, 0x00F6, NES_SCRIPT }, { 0x2106F, 0x0118, NES_SCRIPT }, - { 0x21187, 0x015B, NES_SCRIPT }, { 0x212E2, 0x01AC, NES_SCRIPT }, { 0x2148E, 0x003F, NES_SCRIPT }, { 0x214CD, 0x00A9, NES_SCRIPT }, { 0x2436F, 0x0126, NES_SCRIPT }, - { 0x1BD07, 0x0075, NES_SCRIPT }, { 0x1CC6A, 0x009B, NES_SCRIPT }, { 0x28F5D, 0x0054, NES_SCRIPT }, { 0x19F3D, 0x00E1, NES_SCRIPT }, { 0x1A01E, 0x0086, NES_SCRIPT }, - { 0x14FBE, 0x0057, NES_SCRIPT }, { 0x27326, 0x033D, NES_SCRIPT }, { 0x1DA51, 0x023B, NES_SCRIPT }, { 0x1DC8C, 0x00FB, NES_SCRIPT }, { 0x1DD87, 0x0056, NES_SCRIPT }, - { 0x1DDDD, 0x01E1, NES_SCRIPT }, { 0x15015, 0x004D, NES_SCRIPT }, { 0x27027, 0x00E8, NES_SCRIPT }, { 0x21F44, 0x0013, NES_SCRIPT }, { 0x2A2DD, 0x00F0, NES_SCRIPT }, - { 0x24495, 0x00F8, NES_SCRIPT }, { 0x21576, 0x00F9, NES_SCRIPT }, { 0x2458D, 0x002B, NES_SCRIPT }, { 0x2BAA4, 0x010F, NES_SCRIPT }, { 0x245B8, 0x00A5, NES_SCRIPT }, - { 0x250D0, 0x019C, NES_SCRIPT }, { 0x1B608, 0x000D, NES_SCRIPT }, { 0x1B615, 0x000D, NES_SCRIPT }, { 0x23A2E, 0x0185, NES_SCRIPT }, { 0x27957, 0x0212, NES_SCRIPT }, - { 0x23BB3, 0x0158, NES_SCRIPT }, { 0x23D0B, 0x01C4, NES_SCRIPT }, { 0x23ECF, 0x0016, NES_SCRIPT }, { 0x2BBB3, 0x005A, NES_SCRIPT }, { 0x23EE5, 0x0020, NES_SCRIPT }, - { 0x27D6A, 0x00A7, NES_SCRIPT }, { 0x2A3CD, 0x038C, NES_SCRIPT }, { 0x15062, 0x00F6, NES_SCRIPT }, { 0x2B5B2, 0x007B, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, - { 0x2526C, 0x003C, NES_SCRIPT }, { 0x1E9AF, 0x0011, NES_SCRIPT }, { 0x15B26, 0x0018, NES_SCRIPT }, { 0x265F5, 0x001F, NES_SCRIPT }, { 0x26614, 0x0054, NES_SCRIPT }, - { 0x26668, 0x018E, NES_SCRIPT }, { 0x267F6, 0x004B, NES_SCRIPT }, { 0x26841, 0x0196, NES_SCRIPT }, { 0x269D7, 0x0027, NES_SCRIPT }, { 0x269FE, 0x0041, NES_SCRIPT }, - { 0x26A3F, 0x01A3, NES_SCRIPT }, { 0x15B3E, 0x001F, NES_SCRIPT }, { 0x2465D, 0x002A, NES_SCRIPT }, { 0x15158, 0x0198, NES_SCRIPT }, { 0x192F7, 0x0031, NES_SCRIPT }, - { 0x177F4, 0x008C, NES_SCRIPT }, { 0x2166F, 0x00DA, NES_SCRIPT }, { 0x1D439, 0x0018, NES_SCRIPT }, { 0x1D451, 0x0054, NES_SCRIPT }, { 0x18C76, 0x0005, NES_SCRIPT }, - { 0x152F0, 0x0126, NES_SCRIPT }, { 0x15416, 0x000B, NES_SCRIPT }, { 0x24687, 0x0137, NES_SCRIPT }, { 0x247BE, 0x0014, NES_SCRIPT }, { 0x1DFBE, 0x0018, NES_SCRIPT }, - { 0x247D2, 0x0027, NES_SCRIPT }, { 0x1A0A4, 0x004D, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, { 0x2B62D, 0x00A5, NES_SCRIPT }, { 0x2A759, 0x00BA, NES_SCRIPT }, - { 0x2A813, 0x0140, NES_SCRIPT }, { 0x197CF, 0x00D0, NES_SCRIPT }, { 0x1989F, 0x014D, NES_SCRIPT }, { 0x199EC, 0x0012, NES_SCRIPT }, { 0x2A953, 0x0005, NES_SCRIPT }, - { 0x2A958, 0x0005, NES_SCRIPT }, { 0x2A95D, 0x0005, NES_SCRIPT }, { 0x2A962, 0x0005, NES_SCRIPT }, { 0x2A967, 0x0005, NES_SCRIPT }, { 0x21749, 0x0033, NES_SCRIPT }, - { 0x2A96C, 0x0005, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, { 0x2A971, 0x009C, NES_SCRIPT }, { 0x2AA0D, 0x009C, NES_SCRIPT } -}; -#endif -static const ScummNESFile::Resource *res_scripts[ScummNESFile::kROMsetNum] = { - res_scripts_usa, - res_scripts_eur, - res_scripts_swe, - res_scripts_fra, - res_scripts_ger, -}; - -#ifdef PALMOS_68K -static const ScummNESFile::Resource *res_sounds_usa; -static const ScummNESFile::Resource *res_sounds_eur; -static const ScummNESFile::Resource *res_sounds_swe; -static const ScummNESFile::Resource *res_sounds_fra; -static const ScummNESFile::Resource *res_sounds_ger; -#else -static const ScummNESFile::Resource res_sounds_usa[82] = { - { 0x0FFE8, 0x000A, NES_SOUND }, { 0x30ECA, 0x0832, NES_SOUND }, { 0x30ECA, 0x0832, NES_SOUND }, { 0x30ECA, 0x0832, NES_SOUND }, { 0x30ECA, 0x0832, NES_SOUND }, - { 0x30ECA, 0x0832, NES_SOUND }, { 0x17FCA, 0x0011, NES_SOUND }, { 0x27E0B, 0x0073, NES_SOUND }, { 0x17FDB, 0x0011, NES_SOUND }, { 0x17FEC, 0x0011, NES_SOUND }, - { 0x27E7E, 0x0056, NES_SOUND }, { 0x27ED4, 0x001F, NES_SOUND }, { 0x23FEE, 0x0011, NES_SOUND }, { 0x0FFF2, 0x000A, NES_SOUND }, { 0x27EF3, 0x000A, NES_SOUND }, - { 0x27EFD, 0x0019, NES_SOUND }, { 0x27F16, 0x004B, NES_SOUND }, { 0x27F61, 0x000A, NES_SOUND }, { 0x27F6B, 0x000F, NES_SOUND }, { 0x27F7A, 0x001D, NES_SOUND }, - { 0x27F97, 0x0045, NES_SOUND }, { 0x27FDC, 0x000F, NES_SOUND }, { 0x2FD42, 0x001B, NES_SOUND }, { 0x2FD5D, 0x0033, NES_SOUND }, { 0x27FEB, 0x0011, NES_SOUND }, - { 0x2BFEF, 0x000F, NES_SOUND }, { 0x2FD90, 0x0075, NES_SOUND }, { 0x2FE05, 0x0014, NES_SOUND }, { 0x0FFE8, 0x000A, NES_SOUND }, { 0x2FE19, 0x00FF, NES_SOUND }, - { 0x2FF18, 0x000F, NES_SOUND }, { 0x2FF27, 0x000F, NES_SOUND }, { 0x2FF36, 0x0092, NES_SOUND }, { 0x2FF36, 0x0092, NES_SOUND }, { 0x2FFC8, 0x002D, NES_SOUND }, - { 0x316FC, 0x00F8, NES_SOUND }, { 0x317F4, 0x0016, NES_SOUND }, { 0x3180A, 0x0011, NES_SOUND }, { 0x3181B, 0x004B, NES_SOUND }, { 0x31866, 0x0011, NES_SOUND }, - { 0x31877, 0x003B, NES_SOUND }, { 0x318B2, 0x008A, NES_SOUND }, { 0x3193C, 0x0011, NES_SOUND }, { 0x3194D, 0x000F, NES_SOUND }, { 0x3195C, 0x00A2, NES_SOUND }, - { 0x319FE, 0x00D3, NES_SOUND }, { 0x31AD1, 0x0097, NES_SOUND }, { 0x2BFEF, 0x000F, NES_SOUND }, { 0x3195C, 0x00A2, NES_SOUND }, { 0x31B68, 0x05D1, NES_SOUND }, - { 0x31B68, 0x05D1, NES_SOUND }, { 0x32139, 0x0011, NES_SOUND }, { 0x0FFE8, 0x000A, NES_SOUND }, { 0x2FD90, 0x0075, NES_SOUND }, { 0x27ED4, 0x001F, NES_SOUND }, - { 0x3214A, 0x098E, NES_SOUND }, { 0x3181B, 0x004B, NES_SOUND }, { 0x32AD8, 0x0011, NES_SOUND }, { 0x30ECA, 0x0832, NES_SOUND }, { 0x32AE9, 0x000F, NES_SOUND }, - { 0x32AF8, 0x002F, NES_SOUND }, { 0x32B27, 0x001D, NES_SOUND }, { 0x32B44, 0x0018, NES_SOUND }, { 0x32B5C, 0x0016, NES_SOUND }, { 0x32B72, 0x001B, NES_SOUND }, - { 0x32B8D, 0x0088, NES_SOUND }, { 0x32C15, 0x0065, NES_SOUND }, { 0x32C7A, 0x0065, NES_SOUND }, { 0x32CDF, 0x0073, NES_SOUND }, { 0x32D52, 0x00F9, NES_SOUND }, - { 0x32E4B, 0x049E, NES_SOUND }, { 0x34001, 0x0EA8, NES_SOUND }, { 0x332E9, 0x0B18, NES_SOUND }, { 0x34EA9, 0x0B9C, NES_SOUND }, { 0x35A45, 0x0C6B, NES_SOUND }, - { 0x366B0, 0x0E56, NES_SOUND }, { 0x38001, 0x0C70, NES_SOUND }, { 0x38C71, 0x0DEC, NES_SOUND }, { 0x39A5D, 0x0B77, NES_SOUND }, { 0x37506, 0x042F, NES_SOUND }, - { 0x3A5D4, 0x0AC5, NES_SOUND }, { 0x3B099, 0x0BE4, NES_SOUND } -}; -static const ScummNESFile::Resource res_sounds_eur[82] = { - { 0x0BF54, 0x000A, NES_SOUND }, { 0x30ECA, 0x0832, NES_SOUND }, { 0x30ECA, 0x0832, NES_SOUND }, { 0x30ECA, 0x0832, NES_SOUND }, { 0x30ECA, 0x0832, NES_SOUND }, - { 0x30ECA, 0x0832, NES_SOUND }, { 0x0BF5E, 0x0011, NES_SOUND }, { 0x27ECB, 0x0073, NES_SOUND }, { 0x0BF6F, 0x0011, NES_SOUND }, { 0x0FF5D, 0x0011, NES_SOUND }, - { 0x316FC, 0x0056, NES_SOUND }, { 0x13F4E, 0x001F, NES_SOUND }, { 0x0FF6E, 0x0011, NES_SOUND }, { 0x13F6D, 0x000A, NES_SOUND }, { 0x1BF47, 0x000A, NES_SOUND }, - { 0x1BF51, 0x0019, NES_SOUND }, { 0x31752, 0x004B, NES_SOUND }, { 0x1BF6A, 0x000A, NES_SOUND }, { 0x27F3E, 0x000F, NES_SOUND }, { 0x27F4D, 0x001D, NES_SOUND }, - { 0x3179D, 0x0045, NES_SOUND }, { 0x27F6A, 0x000F, NES_SOUND }, { 0x2BF40, 0x001B, NES_SOUND }, { 0x317E2, 0x0033, NES_SOUND }, { 0x2BF5B, 0x0011, NES_SOUND }, - { 0x2BF6C, 0x000F, NES_SOUND }, { 0x31815, 0x0075, NES_SOUND }, { 0x2FF6C, 0x0014, NES_SOUND }, { 0x0BF54, 0x000A, NES_SOUND }, { 0x3188A, 0x00FF, NES_SOUND }, - { 0x31989, 0x000F, NES_SOUND }, { 0x31998, 0x000F, NES_SOUND }, { 0x319A7, 0x0092, NES_SOUND }, { 0x319A7, 0x0092, NES_SOUND }, { 0x31A39, 0x002D, NES_SOUND }, - { 0x31A66, 0x00F8, NES_SOUND }, { 0x31B5E, 0x0016, NES_SOUND }, { 0x31B74, 0x0011, NES_SOUND }, { 0x31B85, 0x004B, NES_SOUND }, { 0x31BD0, 0x0011, NES_SOUND }, - { 0x31BE1, 0x003B, NES_SOUND }, { 0x31C1C, 0x008A, NES_SOUND }, { 0x31CA6, 0x0011, NES_SOUND }, { 0x31CB7, 0x000F, NES_SOUND }, { 0x31CC6, 0x00A2, NES_SOUND }, - { 0x31D68, 0x00D3, NES_SOUND }, { 0x31E3B, 0x0097, NES_SOUND }, { 0x2BF6C, 0x000F, NES_SOUND }, { 0x31CC6, 0x00A2, NES_SOUND }, { 0x31ED2, 0x05D1, NES_SOUND }, - { 0x31ED2, 0x05D1, NES_SOUND }, { 0x324A3, 0x0011, NES_SOUND }, { 0x0BF54, 0x000A, NES_SOUND }, { 0x31815, 0x0075, NES_SOUND }, { 0x13F4E, 0x001F, NES_SOUND }, - { 0x324B4, 0x098E, NES_SOUND }, { 0x31B85, 0x004B, NES_SOUND }, { 0x32E42, 0x0011, NES_SOUND }, { 0x30ECA, 0x0832, NES_SOUND }, { 0x32E53, 0x000F, NES_SOUND }, - { 0x32E62, 0x002F, NES_SOUND }, { 0x32E91, 0x001D, NES_SOUND }, { 0x32EAE, 0x0018, NES_SOUND }, { 0x32EC6, 0x0016, NES_SOUND }, { 0x32EDC, 0x001B, NES_SOUND }, - { 0x32EF7, 0x0088, NES_SOUND }, { 0x32F7F, 0x0065, NES_SOUND }, { 0x32FE4, 0x0065, NES_SOUND }, { 0x33049, 0x0073, NES_SOUND }, { 0x330BC, 0x00F9, NES_SOUND }, - { 0x331B5, 0x049E, NES_SOUND }, { 0x34001, 0x0EA8, NES_SOUND }, { 0x34EA9, 0x0B18, NES_SOUND }, { 0x359C1, 0x0B9C, NES_SOUND }, { 0x3655D, 0x0C6B, NES_SOUND }, - { 0x38001, 0x0E56, NES_SOUND }, { 0x371C8, 0x0C70, NES_SOUND }, { 0x38E57, 0x0DEC, NES_SOUND }, { 0x39C43, 0x0B77, NES_SOUND }, { 0x33653, 0x042F, NES_SOUND }, - { 0x3A7BA, 0x0AC5, NES_SOUND }, { 0x3B27F, 0x0BE4, NES_SOUND } -}; -static const ScummNESFile::Resource res_sounds_swe[82] = { - { 0x0BF58, 0x000A, NES_SOUND }, { 0x30352, 0x0832, NES_SOUND }, { 0x30352, 0x0832, NES_SOUND }, { 0x30352, 0x0832, NES_SOUND }, { 0x30352, 0x0832, NES_SOUND }, - { 0x30352, 0x0832, NES_SOUND }, { 0x0BF62, 0x0011, NES_SOUND }, { 0x27E5F, 0x0073, NES_SOUND }, { 0x17F5A, 0x0011, NES_SOUND }, { 0x17F6B, 0x0011, NES_SOUND }, - { 0x27ED2, 0x0056, NES_SOUND }, { 0x1BF55, 0x001F, NES_SOUND }, { 0x23F66, 0x0011, NES_SOUND }, { 0x0BF73, 0x000A, NES_SOUND }, { 0x1BF74, 0x000A, NES_SOUND }, - { 0x27F28, 0x0019, NES_SOUND }, { 0x2BF0A, 0x004B, NES_SOUND }, { 0x1FF71, 0x000A, NES_SOUND }, { 0x27F41, 0x000F, NES_SOUND }, { 0x27F50, 0x001D, NES_SOUND }, - { 0x2FEAA, 0x0045, NES_SOUND }, { 0x27F6D, 0x000F, NES_SOUND }, { 0x2BF55, 0x001B, NES_SOUND }, { 0x2FEEF, 0x0033, NES_SOUND }, { 0x2FF22, 0x0011, NES_SOUND }, - { 0x2BF70, 0x000F, NES_SOUND }, { 0x30B84, 0x0075, NES_SOUND }, { 0x2FF33, 0x0014, NES_SOUND }, { 0x0BF58, 0x000A, NES_SOUND }, { 0x30BF9, 0x00FF, NES_SOUND }, - { 0x2FF47, 0x000F, NES_SOUND }, { 0x2FF56, 0x000F, NES_SOUND }, { 0x30CF8, 0x0092, NES_SOUND }, { 0x30CF8, 0x0092, NES_SOUND }, { 0x30D8A, 0x002D, NES_SOUND }, - { 0x30DB7, 0x00F8, NES_SOUND }, { 0x2FF65, 0x0016, NES_SOUND }, { 0x30EAF, 0x0011, NES_SOUND }, { 0x30EC0, 0x004B, NES_SOUND }, { 0x30F0B, 0x0011, NES_SOUND }, - { 0x30F1C, 0x003B, NES_SOUND }, { 0x30F57, 0x008A, NES_SOUND }, { 0x30FE1, 0x0011, NES_SOUND }, { 0x30FF2, 0x000F, NES_SOUND }, { 0x31001, 0x00A2, NES_SOUND }, - { 0x310A3, 0x00D3, NES_SOUND }, { 0x31176, 0x0097, NES_SOUND }, { 0x2BF70, 0x000F, NES_SOUND }, { 0x31001, 0x00A2, NES_SOUND }, { 0x3120D, 0x05D1, NES_SOUND }, - { 0x3120D, 0x05D1, NES_SOUND }, { 0x317DE, 0x0011, NES_SOUND }, { 0x0BF58, 0x000A, NES_SOUND }, { 0x30B84, 0x0075, NES_SOUND }, { 0x1BF55, 0x001F, NES_SOUND }, - { 0x317EF, 0x098E, NES_SOUND }, { 0x30EC0, 0x004B, NES_SOUND }, { 0x3217D, 0x0011, NES_SOUND }, { 0x30352, 0x0832, NES_SOUND }, { 0x3218E, 0x000F, NES_SOUND }, - { 0x3219D, 0x002F, NES_SOUND }, { 0x321CC, 0x001D, NES_SOUND }, { 0x321E9, 0x0018, NES_SOUND }, { 0x32201, 0x0016, NES_SOUND }, { 0x32217, 0x001B, NES_SOUND }, - { 0x32232, 0x0088, NES_SOUND }, { 0x322BA, 0x0065, NES_SOUND }, { 0x3231F, 0x0065, NES_SOUND }, { 0x32384, 0x0073, NES_SOUND }, { 0x323F7, 0x00F9, NES_SOUND }, - { 0x324F0, 0x049E, NES_SOUND }, { 0x3298E, 0x0EA8, NES_SOUND }, { 0x34001, 0x0B18, NES_SOUND }, { 0x34B19, 0x0B9C, NES_SOUND }, { 0x356B5, 0x0C6B, NES_SOUND }, - { 0x36320, 0x0E56, NES_SOUND }, { 0x37176, 0x0C70, NES_SOUND }, { 0x38001, 0x0DEC, NES_SOUND }, { 0x38DED, 0x0B77, NES_SOUND }, { 0x33836, 0x042F, NES_SOUND }, - { 0x39964, 0x0AC5, NES_SOUND }, { 0x3A429, 0x0BE4, NES_SOUND } -}; -static const ScummNESFile::Resource res_sounds_fra[82] = { - { 0x07F74, 0x000A, NES_SOUND }, { 0x30ECA, 0x0832, NES_SOUND }, { 0x30ECA, 0x0832, NES_SOUND }, { 0x30ECA, 0x0832, NES_SOUND }, { 0x30ECA, 0x0832, NES_SOUND }, - { 0x30ECA, 0x0832, NES_SOUND }, { 0x0BF6C, 0x0011, NES_SOUND }, { 0x1BEFA, 0x0073, NES_SOUND }, { 0x17F10, 0x0011, NES_SOUND }, { 0x17F21, 0x0011, NES_SOUND }, - { 0x1FED5, 0x0056, NES_SOUND }, { 0x17F32, 0x001F, NES_SOUND }, { 0x17F51, 0x0011, NES_SOUND }, { 0x0FF76, 0x000A, NES_SOUND }, { 0x17F62, 0x000A, NES_SOUND }, - { 0x1FF2B, 0x0019, NES_SOUND }, { 0x23E78, 0x004B, NES_SOUND }, { 0x17F6C, 0x000A, NES_SOUND }, { 0x1BF6D, 0x000F, NES_SOUND }, { 0x1FF44, 0x001D, NES_SOUND }, - { 0x23EC3, 0x0045, NES_SOUND }, { 0x1FF61, 0x000F, NES_SOUND }, { 0x23F08, 0x001B, NES_SOUND }, { 0x23F23, 0x0033, NES_SOUND }, { 0x23F56, 0x0011, NES_SOUND }, - { 0x1FF70, 0x000F, NES_SOUND }, { 0x27EF4, 0x0075, NES_SOUND }, { 0x23F67, 0x0014, NES_SOUND }, { 0x07F74, 0x000A, NES_SOUND }, { 0x2FB83, 0x00FF, NES_SOUND }, - { 0x27F69, 0x000F, NES_SOUND }, { 0x2BF70, 0x000F, NES_SOUND }, { 0x2FC82, 0x0092, NES_SOUND }, { 0x2FC82, 0x0092, NES_SOUND }, { 0x2FD14, 0x002D, NES_SOUND }, - { 0x2FD41, 0x00F8, NES_SOUND }, { 0x2FE39, 0x0016, NES_SOUND }, { 0x2FE4F, 0x0011, NES_SOUND }, { 0x2FE60, 0x004B, NES_SOUND }, { 0x2FEAB, 0x0011, NES_SOUND }, - { 0x2FEBC, 0x003B, NES_SOUND }, { 0x316FC, 0x008A, NES_SOUND }, { 0x2FEF7, 0x0011, NES_SOUND }, { 0x2FF08, 0x000F, NES_SOUND }, { 0x31786, 0x00A2, NES_SOUND }, - { 0x31828, 0x00D3, NES_SOUND }, { 0x318FB, 0x0097, NES_SOUND }, { 0x1FF70, 0x000F, NES_SOUND }, { 0x31786, 0x00A2, NES_SOUND }, { 0x31992, 0x05D1, NES_SOUND }, - { 0x31992, 0x05D1, NES_SOUND }, { 0x2FF17, 0x0011, NES_SOUND }, { 0x07F74, 0x000A, NES_SOUND }, { 0x27EF4, 0x0075, NES_SOUND }, { 0x17F32, 0x001F, NES_SOUND }, - { 0x31F63, 0x098E, NES_SOUND }, { 0x2FE60, 0x004B, NES_SOUND }, { 0x2FF28, 0x0011, NES_SOUND }, { 0x30ECA, 0x0832, NES_SOUND }, { 0x2FF39, 0x000F, NES_SOUND }, - { 0x2FF48, 0x002F, NES_SOUND }, { 0x328F1, 0x001D, NES_SOUND }, { 0x3290E, 0x0018, NES_SOUND }, { 0x32926, 0x0016, NES_SOUND }, { 0x3293C, 0x001B, NES_SOUND }, - { 0x32957, 0x0088, NES_SOUND }, { 0x329DF, 0x0065, NES_SOUND }, { 0x32A44, 0x0065, NES_SOUND }, { 0x32AA9, 0x0073, NES_SOUND }, { 0x32B1C, 0x00F9, NES_SOUND }, - { 0x32C15, 0x049E, NES_SOUND }, { 0x330B3, 0x0EA8, NES_SOUND }, { 0x34001, 0x0B18, NES_SOUND }, { 0x34B19, 0x0B9C, NES_SOUND }, { 0x356B5, 0x0C6B, NES_SOUND }, - { 0x36320, 0x0E56, NES_SOUND }, { 0x37176, 0x0C70, NES_SOUND }, { 0x38001, 0x0DEC, NES_SOUND }, { 0x38DED, 0x0B77, NES_SOUND }, { 0x39964, 0x042F, NES_SOUND }, - { 0x39D93, 0x0AC5, NES_SOUND }, { 0x3A858, 0x0BE4, NES_SOUND } -}; -static const ScummNESFile::Resource res_sounds_ger[82] = { - { 0x0BF6D, 0x000A, NES_SOUND }, { 0x30ECA, 0x0832, NES_SOUND }, { 0x30ECA, 0x0832, NES_SOUND }, { 0x30ECA, 0x0832, NES_SOUND }, { 0x30ECA, 0x0832, NES_SOUND }, - { 0x30ECA, 0x0832, NES_SOUND }, { 0x23F05, 0x0011, NES_SOUND }, { 0x2FA49, 0x0073, NES_SOUND }, { 0x23F16, 0x0011, NES_SOUND }, { 0x23F27, 0x0011, NES_SOUND }, - { 0x2FABC, 0x0056, NES_SOUND }, { 0x23F38, 0x001F, NES_SOUND }, { 0x23F57, 0x0011, NES_SOUND }, { 0x0FF76, 0x000A, NES_SOUND }, { 0x17F71, 0x000A, NES_SOUND }, - { 0x2BF2F, 0x0019, NES_SOUND }, { 0x2FB12, 0x004B, NES_SOUND }, { 0x23F68, 0x000A, NES_SOUND }, { 0x2BF48, 0x000F, NES_SOUND }, { 0x2BF57, 0x001D, NES_SOUND }, - { 0x2FB5D, 0x0045, NES_SOUND }, { 0x2FBA2, 0x000F, NES_SOUND }, { 0x2FBB1, 0x001B, NES_SOUND }, { 0x2FBCC, 0x0033, NES_SOUND }, { 0x2FBFF, 0x0011, NES_SOUND }, - { 0x2FC10, 0x000F, NES_SOUND }, { 0x2FC1F, 0x0075, NES_SOUND }, { 0x2FC94, 0x0014, NES_SOUND }, { 0x0BF6D, 0x000A, NES_SOUND }, { 0x2FCA8, 0x00FF, NES_SOUND }, - { 0x2FDA7, 0x000F, NES_SOUND }, { 0x2FDB6, 0x000F, NES_SOUND }, { 0x2FDC5, 0x0092, NES_SOUND }, { 0x2FDC5, 0x0092, NES_SOUND }, { 0x2FE57, 0x002D, NES_SOUND }, - { 0x2FE84, 0x00F8, NES_SOUND }, { 0x316FC, 0x0016, NES_SOUND }, { 0x31712, 0x0011, NES_SOUND }, { 0x31723, 0x004B, NES_SOUND }, { 0x3176E, 0x0011, NES_SOUND }, - { 0x3177F, 0x003B, NES_SOUND }, { 0x317BA, 0x008A, NES_SOUND }, { 0x31844, 0x0011, NES_SOUND }, { 0x31855, 0x000F, NES_SOUND }, { 0x31864, 0x00A2, NES_SOUND }, - { 0x31906, 0x00D3, NES_SOUND }, { 0x319D9, 0x0097, NES_SOUND }, { 0x2FC10, 0x000F, NES_SOUND }, { 0x31864, 0x00A2, NES_SOUND }, { 0x31A70, 0x05D1, NES_SOUND }, - { 0x31A70, 0x05D1, NES_SOUND }, { 0x32041, 0x0011, NES_SOUND }, { 0x0BF6D, 0x000A, NES_SOUND }, { 0x2FC1F, 0x0075, NES_SOUND }, { 0x23F38, 0x001F, NES_SOUND }, - { 0x32052, 0x098E, NES_SOUND }, { 0x31723, 0x004B, NES_SOUND }, { 0x329E0, 0x0011, NES_SOUND }, { 0x30ECA, 0x0832, NES_SOUND }, { 0x329F1, 0x000F, NES_SOUND }, - { 0x32A00, 0x002F, NES_SOUND }, { 0x32A2F, 0x001D, NES_SOUND }, { 0x32A4C, 0x0018, NES_SOUND }, { 0x32A64, 0x0016, NES_SOUND }, { 0x32A7A, 0x001B, NES_SOUND }, - { 0x32A95, 0x0088, NES_SOUND }, { 0x32B1D, 0x0065, NES_SOUND }, { 0x32B82, 0x0065, NES_SOUND }, { 0x32BE7, 0x0073, NES_SOUND }, { 0x32C5A, 0x00F9, NES_SOUND }, - { 0x32D53, 0x049E, NES_SOUND }, { 0x34001, 0x0EA8, NES_SOUND }, { 0x331F1, 0x0B18, NES_SOUND }, { 0x34EA9, 0x0B9C, NES_SOUND }, { 0x35A45, 0x0C6B, NES_SOUND }, - { 0x366B0, 0x0E56, NES_SOUND }, { 0x38001, 0x0C70, NES_SOUND }, { 0x38C71, 0x0DEC, NES_SOUND }, { 0x39A5D, 0x0B77, NES_SOUND }, { 0x37506, 0x042F, NES_SOUND }, - { 0x3A5D4, 0x0AC5, NES_SOUND }, { 0x3B099, 0x0BE4, NES_SOUND } -}; -#endif -static const ScummNESFile::Resource *res_sounds[ScummNESFile::kROMsetNum] = { - res_sounds_usa, - res_sounds_eur, - res_sounds_swe, - res_sounds_fra, - res_sounds_ger, -}; - -#ifdef PALMOS_68K -static const ScummNESFile::Resource *res_costumes_usa; -static const ScummNESFile::Resource *res_costumes_eur; -static const ScummNESFile::Resource *res_costumes_swe; -static const ScummNESFile::Resource *res_costumes_fra; -static const ScummNESFile::Resource *res_costumes_ger; -#else -static const ScummNESFile::Resource res_costumes_usa[25] = { - { 0x17F05, 0x0055, NES_COSTUME }, { 0x17F05, 0x0055, NES_COSTUME }, { 0x17F05, 0x0055, NES_COSTUME }, { 0x17F05, 0x0055, NES_COSTUME }, { 0x17F05, 0x0055, NES_COSTUME }, - { 0x17F05, 0x0055, NES_COSTUME }, { 0x17F05, 0x0055, NES_COSTUME }, { 0x17F05, 0x0055, NES_COSTUME }, { 0x13FAB, 0x004B, NES_COSTUME }, { 0x17F05, 0x0055, NES_COSTUME }, - { 0x17F05, 0x0055, NES_COSTUME }, { 0x17F05, 0x0055, NES_COSTUME }, { 0x17F5A, 0x0036, NES_COSTUME }, { 0x17F90, 0x003A, NES_COSTUME }, { 0x17F90, 0x003A, NES_COSTUME }, - { 0x17F05, 0x0055, NES_COSTUME }, { 0x1BF87, 0x003B, NES_COSTUME }, { 0x17F05, 0x0055, NES_COSTUME }, { 0x23FA9, 0x0045, NES_COSTUME }, { 0x1FFBD, 0x0040, NES_COSTUME }, - { 0x1BFC2, 0x003C, NES_COSTUME }, { 0x17F90, 0x003A, NES_COSTUME }, { 0x17F90, 0x003A, NES_COSTUME }, { 0x17F05, 0x0055, NES_COSTUME }, { 0x13FAB, 0x004B, NES_COSTUME } -}; -static const ScummNESFile::Resource res_costumes_eur[25] = { - { 0x0BEFF, 0x0055, NES_COSTUME }, { 0x0BEFF, 0x0055, NES_COSTUME }, { 0x0BEFF, 0x0055, NES_COSTUME }, { 0x0BEFF, 0x0055, NES_COSTUME }, { 0x0BEFF, 0x0055, NES_COSTUME }, - { 0x0BEFF, 0x0055, NES_COSTUME }, { 0x0BEFF, 0x0055, NES_COSTUME }, { 0x0BEFF, 0x0055, NES_COSTUME }, { 0x0FEA2, 0x004B, NES_COSTUME }, { 0x0BEFF, 0x0055, NES_COSTUME }, - { 0x0BEFF, 0x0055, NES_COSTUME }, { 0x0BEFF, 0x0055, NES_COSTUME }, { 0x0FEED, 0x0036, NES_COSTUME }, { 0x0FF23, 0x003A, NES_COSTUME }, { 0x0FF23, 0x003A, NES_COSTUME }, - { 0x0BEFF, 0x0055, NES_COSTUME }, { 0x13F13, 0x003B, NES_COSTUME }, { 0x0BEFF, 0x0055, NES_COSTUME }, { 0x23F2F, 0x0045, NES_COSTUME }, { 0x1FF3E, 0x0040, NES_COSTUME }, - { 0x27E8F, 0x003C, NES_COSTUME }, { 0x0FF23, 0x003A, NES_COSTUME }, { 0x0FF23, 0x003A, NES_COSTUME }, { 0x0BEFF, 0x0055, NES_COSTUME }, { 0x0FEA2, 0x004B, NES_COSTUME } -}; -static const ScummNESFile::Resource res_costumes_swe[25] = { - { 0x0FEF5, 0x0055, NES_COSTUME }, { 0x0FEF5, 0x0055, NES_COSTUME }, { 0x0FEF5, 0x0055, NES_COSTUME }, { 0x0FEF5, 0x0055, NES_COSTUME }, { 0x0FEF5, 0x0055, NES_COSTUME }, - { 0x0FEF5, 0x0055, NES_COSTUME }, { 0x0FEF5, 0x0055, NES_COSTUME }, { 0x0FEF5, 0x0055, NES_COSTUME }, { 0x17E9A, 0x004B, NES_COSTUME }, { 0x0FEF5, 0x0055, NES_COSTUME }, - { 0x0FEF5, 0x0055, NES_COSTUME }, { 0x0FEF5, 0x0055, NES_COSTUME }, { 0x0FF4A, 0x0036, NES_COSTUME }, { 0x17EE5, 0x003A, NES_COSTUME }, { 0x17EE5, 0x003A, NES_COSTUME }, - { 0x0FEF5, 0x0055, NES_COSTUME }, { 0x17F1F, 0x003B, NES_COSTUME }, { 0x0FEF5, 0x0055, NES_COSTUME }, { 0x1BE94, 0x0045, NES_COSTUME }, { 0x1BED9, 0x0040, NES_COSTUME }, - { 0x1BF19, 0x003C, NES_COSTUME }, { 0x17EE5, 0x003A, NES_COSTUME }, { 0x17EE5, 0x003A, NES_COSTUME }, { 0x0FEF5, 0x0055, NES_COSTUME }, { 0x17E9A, 0x004B, NES_COSTUME } -}; -static const ScummNESFile::Resource res_costumes_fra[25] = { - { 0x0BF17, 0x0055, NES_COSTUME }, { 0x0BF17, 0x0055, NES_COSTUME }, { 0x0BF17, 0x0055, NES_COSTUME }, { 0x0BF17, 0x0055, NES_COSTUME }, { 0x0BF17, 0x0055, NES_COSTUME }, - { 0x0BF17, 0x0055, NES_COSTUME }, { 0x0BF17, 0x0055, NES_COSTUME }, { 0x0BF17, 0x0055, NES_COSTUME }, { 0x13E77, 0x004B, NES_COSTUME }, { 0x0BF17, 0x0055, NES_COSTUME }, - { 0x0BF17, 0x0055, NES_COSTUME }, { 0x0BF17, 0x0055, NES_COSTUME }, { 0x07F3E, 0x0036, NES_COSTUME }, { 0x13EC2, 0x003A, NES_COSTUME }, { 0x13EC2, 0x003A, NES_COSTUME }, - { 0x0BF17, 0x0055, NES_COSTUME }, { 0x13EFC, 0x003B, NES_COSTUME }, { 0x0BF17, 0x0055, NES_COSTUME }, { 0x13F37, 0x0045, NES_COSTUME }, { 0x17E94, 0x0040, NES_COSTUME }, - { 0x17ED4, 0x003C, NES_COSTUME }, { 0x13EC2, 0x003A, NES_COSTUME }, { 0x13EC2, 0x003A, NES_COSTUME }, { 0x0BF17, 0x0055, NES_COSTUME }, { 0x13E77, 0x004B, NES_COSTUME } -}; -static const ScummNESFile::Resource res_costumes_ger[25] = { - { 0x0FEEB, 0x0055, NES_COSTUME }, { 0x0FEEB, 0x0055, NES_COSTUME }, { 0x0FEEB, 0x0055, NES_COSTUME }, { 0x0FEEB, 0x0055, NES_COSTUME }, { 0x0FEEB, 0x0055, NES_COSTUME }, - { 0x0FEEB, 0x0055, NES_COSTUME }, { 0x0FEEB, 0x0055, NES_COSTUME }, { 0x0FEEB, 0x0055, NES_COSTUME }, { 0x17E6C, 0x004B, NES_COSTUME }, { 0x0FEEB, 0x0055, NES_COSTUME }, - { 0x0FEEB, 0x0055, NES_COSTUME }, { 0x0FEEB, 0x0055, NES_COSTUME }, { 0x0FF40, 0x0036, NES_COSTUME }, { 0x17EB7, 0x003A, NES_COSTUME }, { 0x17EB7, 0x003A, NES_COSTUME }, - { 0x0FEEB, 0x0055, NES_COSTUME }, { 0x17EF1, 0x003B, NES_COSTUME }, { 0x0FEEB, 0x0055, NES_COSTUME }, { 0x17F2C, 0x0045, NES_COSTUME }, { 0x1FEFD, 0x0040, NES_COSTUME }, - { 0x1FF3D, 0x003C, NES_COSTUME }, { 0x17EB7, 0x003A, NES_COSTUME }, { 0x17EB7, 0x003A, NES_COSTUME }, { 0x0FEEB, 0x0055, NES_COSTUME }, { 0x17E6C, 0x004B, NES_COSTUME } -}; -#endif -static const ScummNESFile::Resource *res_costumes[ScummNESFile::kROMsetNum] = { - res_costumes_usa, - res_costumes_eur, - res_costumes_swe, - res_costumes_fra, - res_costumes_ger, -}; - -#ifdef PALMOS_68K -static const ScummNESFile::Resource *res_globdata_usa; -static const ScummNESFile::Resource *res_globdata_eur; -static const ScummNESFile::Resource *res_globdata_swe; -static const ScummNESFile::Resource *res_globdata_fra; -static const ScummNESFile::Resource *res_globdata_ger; -#else -static const ScummNESFile::Resource res_globdata_usa[1] = { { 0x2CA11, 0x0307, NES_GLOBDATA } }; -static const ScummNESFile::Resource res_globdata_eur[1] = { { 0x2CA11, 0x0307, NES_GLOBDATA } }; -static const ScummNESFile::Resource res_globdata_swe[1] = { { 0x2C001, 0x0307, NES_GLOBDATA } }; -static const ScummNESFile::Resource res_globdata_fra[1] = { { 0x2C628, 0x0307, NES_GLOBDATA } }; -static const ScummNESFile::Resource res_globdata_ger[1] = { { 0x2C4EE, 0x0307, NES_GLOBDATA } }; -#endif -static const ScummNESFile::Resource *res_globdata[ScummNESFile::kROMsetNum] = { - res_globdata_usa, - res_globdata_eur, - res_globdata_swe, - res_globdata_fra, - res_globdata_ger, -}; - -#ifdef PALMOS_68K -static const ScummNESFile::Resource *res_sprpals_usa; -static const ScummNESFile::Resource *res_sprpals_eur; -static const ScummNESFile::Resource *res_sprpals_swe; -static const ScummNESFile::Resource *res_sprpals_fra; -static const ScummNESFile::Resource *res_sprpals_ger; -#else -// sprite palette data -static const ScummNESFile::Resource res_sprpals_usa[2] = { { 0x0BFC1, 0x0010, NES_SPRPALS }, { 0x0BFD1, 0x0010, NES_SPRPALS } }; -static const ScummNESFile::Resource res_sprpals_eur[2] = { { 0x07F61, 0x0010, NES_SPRPALS }, { 0x0BEB2, 0x0010, NES_SPRPALS } }; -static const ScummNESFile::Resource res_sprpals_swe[2] = { { 0x07F55, 0x0010, NES_SPRPALS }, { 0x07F65, 0x0010, NES_SPRPALS } }; -static const ScummNESFile::Resource res_sprpals_fra[2] = { { 0x07ED8, 0x0010, NES_SPRPALS }, { 0x07EE8, 0x0010, NES_SPRPALS } }; -static const ScummNESFile::Resource res_sprpals_ger[2] = { { 0x07F6B, 0x0010, NES_SPRPALS }, { 0x0BF17, 0x0010, NES_SPRPALS } }; -#endif -static const ScummNESFile::Resource *res_sprpals[ScummNESFile::kROMsetNum] = { - res_sprpals_usa, - res_sprpals_eur, - res_sprpals_swe, - res_sprpals_fra, - res_sprpals_ger, -}; - -#ifdef PALMOS_68K -static const ScummNESFile::Resource *res_sprdesc_usa; -static const ScummNESFile::Resource *res_sprdesc_eur; -static const ScummNESFile::Resource *res_sprdesc_swe; -static const ScummNESFile::Resource *res_sprdesc_fra; -static const ScummNESFile::Resource *res_sprdesc_ger; -#else -// associates costume IDs with sprite sets (indexes into SPRLENS/SPROFFS) -static const ScummNESFile::Resource res_sprdesc_usa[2] = { { 0x0FFB7, 0x0031, NES_SPRDESC }, { 0x0BFE1, 0x0009, NES_SPRDESC } }; -static const ScummNESFile::Resource res_sprdesc_eur[2] = { { 0x0BEC2, 0x0031, NES_SPRDESC }, { 0x07F71, 0x0009, NES_SPRDESC } }; -static const ScummNESFile::Resource res_sprdesc_swe[2] = { { 0x0BF1B, 0x0031, NES_SPRDESC }, { 0x07F75, 0x0009, NES_SPRDESC } }; -static const ScummNESFile::Resource res_sprdesc_fra[2] = { { 0x07EF8, 0x0031, NES_SPRDESC }, { 0x07F29, 0x0009, NES_SPRDESC } }; -static const ScummNESFile::Resource res_sprdesc_ger[2] = { { 0x0BF27, 0x0031, NES_SPRDESC }, { 0x0BF58, 0x0009, NES_SPRDESC } }; -#endif -static const ScummNESFile::Resource *res_sprdesc[ScummNESFile::kROMsetNum] = { - res_sprdesc_usa, - res_sprdesc_eur, - res_sprdesc_swe, - res_sprdesc_fra, - res_sprdesc_ger, -}; - -#ifdef PALMOS_68K -static const ScummNESFile::Resource *res_sprlens_usa; -static const ScummNESFile::Resource *res_sprlens_eur; -static const ScummNESFile::Resource *res_sprlens_swe; -static const ScummNESFile::Resource *res_sprlens_fra; -static const ScummNESFile::Resource *res_sprlens_ger; -#else -// number of sprites in each set (indicates length within SPRDATA) -static const ScummNESFile::Resource res_sprlens_usa[2] = { { 0x0FEA2, 0x0115, NES_SPRLENS }, { 0x07FF5, 0x0006, NES_SPRLENS } }; -static const ScummNESFile::Resource res_sprlens_eur[2] = { { 0x1BE32, 0x0115, NES_SPRLENS }, { 0x07F5B, 0x0006, NES_SPRLENS } }; -static const ScummNESFile::Resource res_sprlens_swe[2] = { { 0x13E6A, 0x0115, NES_SPRLENS }, { 0x07F4F, 0x0006, NES_SPRLENS } }; -static const ScummNESFile::Resource res_sprlens_fra[2] = { { 0x0FE61, 0x0115, NES_SPRLENS }, { 0x07ED2, 0x0006, NES_SPRLENS } }; -static const ScummNESFile::Resource res_sprlens_ger[2] = { { 0x2BE1A, 0x0115, NES_SPRLENS }, { 0x07F65, 0x0006, NES_SPRLENS } }; -#endif -static const ScummNESFile::Resource *res_sprlens[ScummNESFile::kROMsetNum] = { - res_sprlens_usa, - res_sprlens_eur, - res_sprlens_swe, - res_sprlens_fra, - res_sprlens_ger, -}; - -#ifdef PALMOS_68K -static const ScummNESFile::Resource *res_sproffs_usa; -static const ScummNESFile::Resource *res_sproffs_eur; -static const ScummNESFile::Resource *res_sproffs_swe; -static const ScummNESFile::Resource *res_sproffs_fra; -static const ScummNESFile::Resource *res_sproffs_ger; -#else -// offset of each sprite set (indexes into SPRDATA) -static const ScummNESFile::Resource res_sproffs_usa[2] = { { 0x2BDC5, 0x022A, NES_SPROFFS }, { 0x0BFEA, 0x000C, NES_SPROFFS } }; -static const ScummNESFile::Resource res_sproffs_eur[2] = { { 0x2FD42, 0x022A, NES_SPROFFS }, { 0x0BEF3, 0x000C, NES_SPROFFS } }; -static const ScummNESFile::Resource res_sproffs_swe[2] = { { 0x2BCE0, 0x022A, NES_SPROFFS }, { 0x0BF4C, 0x000C, NES_SPROFFS } }; -static const ScummNESFile::Resource res_sproffs_fra[2] = { { 0x2F959, 0x022A, NES_SPROFFS }, { 0x07F32, 0x000C, NES_SPROFFS } }; -static const ScummNESFile::Resource res_sproffs_ger[2] = { { 0x2F81F, 0x022A, NES_SPROFFS }, { 0x0BF61, 0x000C, NES_SPROFFS } }; -#endif -static const ScummNESFile::Resource *res_sproffs[ScummNESFile::kROMsetNum] = { - res_sproffs_usa, - res_sproffs_eur, - res_sproffs_swe, - res_sproffs_fra, - res_sproffs_ger, -}; - -#ifdef PALMOS_68K -static const ScummNESFile::Resource *res_sprdata_usa; -static const ScummNESFile::Resource *res_sprdata_eur; -static const ScummNESFile::Resource *res_sprdata_swe; -static const ScummNESFile::Resource *res_sprdata_fra; -static const ScummNESFile::Resource *res_sprdata_ger; -#else -// sprite data sets (packed NES sprite data) -static const ScummNESFile::Resource res_sprdata_usa[2] = { { 0x2CE11, 0x2BE0, NES_SPRDATA }, { 0x07F6B, 0x008A, NES_SPRDATA } }; -static const ScummNESFile::Resource res_sprdata_eur[2] = { { 0x2CE11, 0x2BE0, NES_SPRDATA }, { 0x0BE28, 0x008A, NES_SPRDATA } }; -static const ScummNESFile::Resource res_sprdata_swe[2] = { { 0x2C401, 0x2BE0, NES_SPRDATA }, { 0x0FE6B, 0x008A, NES_SPRDATA } }; -static const ScummNESFile::Resource res_sprdata_fra[2] = { { 0x2CA28, 0x2BE0, NES_SPRDATA }, { 0x07E48, 0x008A, NES_SPRDATA } }; -static const ScummNESFile::Resource res_sprdata_ger[2] = { { 0x2C8EE, 0x2BE0, NES_SPRDATA }, { 0x0FE61, 0x008A, NES_SPRDATA } }; -static const ScummNESFile::Resource *res_sprdata[ScummNESFile::kROMsetNum] = { - res_sprdata_usa, - res_sprdata_eur, - res_sprdata_swe, - res_sprdata_fra, - res_sprdata_ger, -}; -#endif - -#ifdef PALMOS_68K -static const ScummNESFile::Resource *res_charset_usa; -static const ScummNESFile::Resource *res_charset_eur; -static const ScummNESFile::Resource *res_charset_swe; -static const ScummNESFile::Resource *res_charset_fra; -static const ScummNESFile::Resource *res_charset_ger; -#else -static const ScummNESFile::Resource res_charset_usa[1] = { { 0x3F6EE, 0x0090, NES_CHARSET } }; -static const ScummNESFile::Resource res_charset_eur[1] = { { 0x3F724, 0x0090, NES_CHARSET } }; -static const ScummNESFile::Resource res_charset_swe[1] = { { 0x3F739, 0x0090, NES_CHARSET } }; -static const ScummNESFile::Resource res_charset_fra[1] = { { 0x3F739, 0x0090, NES_CHARSET } }; -static const ScummNESFile::Resource res_charset_ger[1] = { { 0x3F739, 0x0090, NES_CHARSET } }; -#endif -static const ScummNESFile::Resource *res_charset[ScummNESFile::kROMsetNum] = { - res_charset_usa, - res_charset_eur, - res_charset_swe, - res_charset_fra, - res_charset_ger, -}; - -#ifdef PALMOS_68K -static const ScummNESFile::Resource *res_preplist_usa; -static const ScummNESFile::Resource *res_preplist_eur; -static const ScummNESFile::Resource *res_preplist_swe; -static const ScummNESFile::Resource *res_preplist_fra; -static const ScummNESFile::Resource *res_preplist_ger; -#else -static const ScummNESFile::Resource res_preplist_usa[1] = { { 0x3FB5A, 0x000E, NES_PREPLIST } }; -static const ScummNESFile::Resource res_preplist_eur[1] = { { 0x3FB90, 0x000E, NES_PREPLIST } }; -static const ScummNESFile::Resource res_preplist_swe[1] = { { 0x3FBA9, 0x000E, NES_PREPLIST } }; -static const ScummNESFile::Resource res_preplist_fra[1] = { { 0x3FBAF, 0x0010, NES_PREPLIST } }; -static const ScummNESFile::Resource res_preplist_ger[1] = { { 0x3FBAB, 0x000F, NES_PREPLIST } }; -#endif -static const ScummNESFile::Resource *res_preplist[ScummNESFile::kROMsetNum] = { - res_preplist_usa, - res_preplist_eur, - res_preplist_swe, - res_preplist_fra, - res_preplist_ger, -}; - -uint16 write_byte(Common::WriteStream *out, byte val) { - val ^= 0xFF; - if (out != 0) - out->writeByte(val); - return 1; -} - -uint16 write_word(Common::WriteStream *out, uint16 val) { - val ^= 0xFFFF; - if (out != 0) - out->writeUint16LE(val); - return 2; -} - -byte ScummNESFile::fileReadByte() { - byte b = 0; - File::read(&b, 1); - return b; -} - -uint16 ScummNESFile::fileReadUint16LE() { - uint16 a = fileReadByte(); - uint16 b = fileReadByte(); - return a | (b << 8); -} - -uint16 ScummNESFile::extractResource(Common::WriteStream *output, const Resource *res) { - uint16 len, i, j; - byte val; - byte cnt; - uint16 reslen = 0; - - if (res == NULL) - error("extract_resource - no resource specified"); - - if ((res->offset == 0) && (res->length == 0)) - return 0; /* there are 8 scripts that are zero bytes long, so we should skip them */ - - File::seek(res->offset,SEEK_SET); - - switch (res->type) { - case NES_GLOBDATA: - len = res->length; - - for (i = 0; i < len; i++) - reslen += write_byte(output, fileReadByte()); - - break; - - case NES_ROOMGFX: - case NES_COSTUMEGFX: - reslen += write_word(output, (uint16)(res->length + 2)); - len = fileReadByte(); - reslen += write_byte(output, (byte)len); - - if (!len) - len = 256; - len = len << 4; - - for (i = 0; i < len;) { - reslen += write_byte(output, cnt = fileReadByte()); - for (j = 0; j < (cnt & 0x7F); j++, i++) - if ((cnt & 0x80) || (j == 0)) - reslen += write_byte(output, fileReadByte()); - } - - if (File::pos() - res->offset != res->length) - error("extract_resource - length mismatch while extracting graphics resource (was %04X, should be %04X)", File::pos() - res->offset, res->length); - - break; - - case NES_ROOM: - case NES_SCRIPT: - len = fileReadUint16LE(); - - if (len != res->length) - error("extract_resource - length mismatch while extracting room/script resource (was %04X, should be %04X)", len, res->length); - - File::seek(-2, SEEK_CUR); - - for (i = 0; i < len; i++) - reslen += write_byte(output, fileReadByte()); - - break; - - case NES_SOUND: - len = res->length + 2; - val = fileReadByte(); - cnt = fileReadByte(); - - if ((val == 2) && (cnt == 100)) { - reslen += write_word(output, len); - reslen += write_byte(output, val); - reslen += write_byte(output, cnt); - - cnt = fileReadByte(); - reslen += write_byte(output, cnt); - for (i = 0; i < cnt; i++) - reslen += write_byte(output, fileReadByte()); - for (i = 0; i < cnt; i++) - reslen += write_byte(output, fileReadByte()); - - while (1) { - reslen += write_byte(output, val = fileReadByte()); - if (val >= 0xFE) - break; - } - } else if (((val == 0) || (val == 1) || (val == 4)) && (cnt == 10)) { - reslen += write_word(output, len); - reslen += write_byte(output, val); - reslen += write_byte(output, cnt); - while (1) { - reslen += write_byte(output, val = fileReadByte()); - - if (val >= 0xFE) - break; - - if (val >= 0x10) - reslen += write_byte(output, fileReadByte()); - else { - reslen += write_byte(output, fileReadByte()); - reslen += write_byte(output, fileReadByte()); - reslen += write_byte(output, fileReadByte()); - reslen += write_byte(output, fileReadByte()); - } - } - } else - error("extract_resource - unknown sound type %d/%d detected",val,cnt); - - if (File::pos() - res->offset != res->length) - error("extract_resource - length mismatch while extracting sound resource (was %04X, should be %04X)", File::pos() - res->offset, res->length); - - break; - - case NES_COSTUME: - case NES_SPRPALS: - case NES_SPRDESC: - case NES_SPRLENS: - case NES_SPROFFS: - case NES_SPRDATA: - case NES_CHARSET: - len = res->length; - reslen += write_word(output, (uint16)(len + 2)); - - for (i = 0; i < len; i++) - reslen += write_byte(output, fileReadByte()); - - break; - - case NES_PREPLIST: - len = res->length; - reslen += write_word(output, 0x002A); - - reslen += write_byte(output, ' '); - for (i = 1; i < 8; i++) - reslen += write_byte(output, 0); - - for (j = 0; j < 4; j++) - { - reslen += write_byte(output,' '); - for (i = 1; (val = fileReadByte()); i++) - reslen += write_byte(output, val); - for (; i < 8; i++) - reslen += write_byte(output, 0); - } - break; - - default: - error("extract_resource - unknown resource type %d specified!", res->type); - } - - return reslen; -} - -struct ScummNESFile::LFLEntry { - const Resource **type; - int index; -}; - -// based on structure of Classic PC Maniac Mansion LFL files -// (roomgfx resources are arranged in order, one per file, -// after the room blocks) -static const ScummNESFile::LFLEntry lfl_01[] = { {res_rooms, 1}, {res_roomgfx, 1}, {res_scripts, 57}, {res_scripts, 61}, {res_scripts, 76}, {res_scripts, 105}, {res_scripts, 111}, {res_sounds, 5}, {res_scripts, 132}, {res_scripts, 148}, {res_scripts, 155}, {res_scripts, 156}, {res_sounds, 39}, {NULL, 0} }; -static const ScummNESFile::LFLEntry lfl_02[] = { {res_rooms, 2}, {res_roomgfx, 2}, {NULL, 0} }; -static const ScummNESFile::LFLEntry lfl_03[] = { {res_rooms, 3}, {res_roomgfx, 3}, {res_scripts, 21}, {res_sounds, 26}, {NULL, 0} }; -static const ScummNESFile::LFLEntry lfl_04[] = { {res_rooms, 4}, {res_roomgfx, 4}, {res_scripts, 46}, {res_scripts, 56}, {res_scripts, 137}, {res_scripts, 146}, {res_sounds, 12}, {res_sounds, 11}, {res_sounds, 13}, {res_sounds, 42}, {NULL, 0} }; -static const ScummNESFile::LFLEntry lfl_05[] = { {res_rooms, 5}, {res_roomgfx, 5}, {res_scripts, 30}, {res_scripts, 31}, {res_scripts, 32}, {res_scripts, 33}, {res_scripts, 34}, {res_scripts, 35}, {res_sounds, 22}, {res_sounds, 23}, {res_sounds, 24}, {res_sounds, 21}, {res_sounds, 46}, {NULL, 0} }; -static const ScummNESFile::LFLEntry lfl_06[] = { {res_rooms, 6}, {res_roomgfx, 6}, {NULL, 0} }; -static const ScummNESFile::LFLEntry lfl_07[] = { {res_rooms, 7}, {res_roomgfx, 7}, {res_scripts, 17}, {res_scripts, 58}, {res_scripts, 59}, {res_scripts, 60}, {res_scripts, 74}, {res_scripts, 81}, {res_scripts, 82}, {res_scripts, 150}, {res_sounds, 14}, {res_sounds, 15}, {res_sounds, 16}, {res_sounds, 17}, {NULL, 0} }; -static const ScummNESFile::LFLEntry lfl_08[] = { {res_rooms, 8}, {res_roomgfx, 8}, {res_scripts, 7}, {res_scripts, 12}, {res_scripts, 13}, {res_scripts, 47}, {res_scripts, 48}, {res_scripts, 49}, {res_scripts, 154}, {res_sounds, 32}, {res_sounds, 33}, {res_sounds, 36}, {NULL, 0} }; -static const ScummNESFile::LFLEntry lfl_09[] = { {res_rooms, 9}, {res_roomgfx, 9}, {res_scripts, 10}, {res_scripts, 11}, {res_scripts, 45}, {res_scripts, 55}, {res_scripts, 84}, {res_scripts, 85}, {res_scripts, 86}, {NULL, 0} }; -static const ScummNESFile::LFLEntry lfl_10[] = { {res_rooms, 10}, {res_roomgfx, 10}, {res_scripts, 24}, {res_scripts, 149}, {res_sounds, 28}, {NULL, 0} }; -static const ScummNESFile::LFLEntry lfl_11[] = { {res_rooms, 11}, {res_roomgfx, 11}, {res_scripts, 166}, {res_scripts, 167}, {res_scripts, 168}, {NULL, 0} }; -static const ScummNESFile::LFLEntry lfl_12[] = { {res_rooms, 12}, {res_roomgfx, 12}, {res_scripts, 51}, {res_scripts, 103}, {res_scripts, 104}, {res_scripts, 161}, {res_sounds, 63}, {res_costumes, 14}, {NULL, 0} }; -static const ScummNESFile::LFLEntry lfl_13[] = { {res_rooms, 13}, {res_roomgfx, 13}, {NULL, 0} }; -static const ScummNESFile::LFLEntry lfl_14[] = { {res_rooms, 14}, {res_roomgfx, 14}, {NULL, 0} }; -static const ScummNESFile::LFLEntry lfl_15[] = { {res_rooms, 15}, {res_roomgfx, 15}, {res_sounds, 27}, {NULL, 0} }; -static const ScummNESFile::LFLEntry lfl_16[] = { {res_rooms, 16}, {res_roomgfx, 16}, {res_scripts, 14}, {res_scripts, 121}, {res_scripts, 122}, {res_sounds, 40}, {res_sounds, 64}, {res_sounds, 68}, {NULL, 0} }; -static const ScummNESFile::LFLEntry lfl_17[] = { {res_rooms, 17}, {res_roomgfx, 17}, {res_scripts, 20}, {res_scripts, 100}, {res_sounds, 25}, {res_sounds, 44}, {res_sounds, 2}, {res_sounds, 50}, {res_sounds, 52}, {NULL, 0} }; -static const ScummNESFile::LFLEntry lfl_18[] = { {res_rooms, 18}, {res_roomgfx, 18}, {res_scripts, 25}, {res_scripts, 26}, {res_scripts, 27}, {res_scripts, 28}, {res_scripts, 64}, {res_scripts, 65}, {res_scripts, 66}, {res_scripts, 67}, {res_scripts, 68}, {res_scripts, 69}, {res_scripts, 70}, {res_scripts, 71}, {res_scripts, 73}, {res_scripts, 101}, {res_sounds, 35}, {NULL, 0} }; -static const ScummNESFile::LFLEntry lfl_19[] = { {res_rooms, 19}, {res_roomgfx, 19}, {res_scripts, 36}, {res_scripts, 37}, {res_scripts, 38}, {res_scripts, 39}, {res_scripts, 40}, {res_scripts, 152}, {res_scripts, 153}, {res_costumes, 10}, {NULL, 0} }; -static const ScummNESFile::LFLEntry lfl_20[] = { {res_rooms, 20}, {res_roomgfx, 20}, {res_scripts, 107}, {res_scripts, 108}, {res_scripts, 109}, {res_scripts, 110}, {res_scripts, 159}, {NULL, 0} }; -static const ScummNESFile::LFLEntry lfl_21[] = { {res_rooms, 21}, {res_roomgfx, 21}, {res_scripts, 41}, {res_scripts, 42}, {res_scripts, 43}, {res_scripts, 53}, {res_scripts, 136}, {res_sounds, 29}, {res_sounds, 20}, {res_sounds, 37}, {NULL, 0} }; -static const ScummNESFile::LFLEntry lfl_22[] = { {res_rooms, 22}, {res_roomgfx, 22}, {res_scripts, 15}, {NULL, 0} }; -static const ScummNESFile::LFLEntry lfl_23[] = { {res_rooms, 23}, {res_roomgfx, 23}, {res_scripts, 77}, {res_scripts, 79}, {res_scripts, 80}, {res_scripts, 83}, {res_sounds, 41}, {NULL, 0} }; -static const ScummNESFile::LFLEntry lfl_24[] = { {res_rooms, 24}, {res_roomgfx, 24}, {res_scripts, 18}, {res_scripts, 19}, {res_scripts, 78}, {res_sounds, 7}, {res_sounds, 3}, {res_sounds, 18}, {res_sounds, 34}, {res_costumes, 12}, {NULL, 0} }; -static const ScummNESFile::LFLEntry lfl_25[] = { {res_rooms, 25}, {res_roomgfx, 25}, {res_scripts, 29}, {res_sounds, 30}, {res_sounds, 31}, {NULL, 0} }; -static const ScummNESFile::LFLEntry lfl_26[] = { {res_rooms, 26}, {res_roomgfx, 26}, {res_scripts, 87}, {res_scripts, 88}, {res_scripts, 89}, {res_scripts, 90}, {res_scripts, 91}, {res_scripts, 92}, {res_scripts, 93}, {res_scripts, 94}, {res_scripts, 95}, {res_scripts, 96}, {res_scripts, 97}, {res_scripts, 98}, {res_scripts, 116}, {res_scripts, 151}, {res_scripts, 174}, {res_costumes, 11}, {NULL, 0} }; -static const ScummNESFile::LFLEntry lfl_27[] = { {res_rooms, 27}, {res_roomgfx, 27}, {res_scripts, 16}, {res_scripts, 52}, {res_scripts, 54}, {res_scripts, 113}, {res_sounds, 45}, {res_costumes, 19}, {NULL, 0} }; -static const ScummNESFile::LFLEntry lfl_28[] = { {res_rooms, 28}, {res_roomgfx, 28}, {res_scripts, 22}, {res_scripts, 23}, {NULL, 0} }; -static const ScummNESFile::LFLEntry lfl_29[] = { {res_rooms, 29}, {res_roomgfx, 29}, {res_scripts, 75}, {res_sounds, 43}, {NULL, 0} }; -static const ScummNESFile::LFLEntry lfl_30[] = { {res_rooms, 30}, {res_roomgfx, 30}, {res_scripts, 63}, {res_sounds, 0}, {res_scripts, 123}, {res_scripts, 125}, {res_scripts, 126}, {res_scripts, 127}, {res_scripts, 129}, {res_sounds, 55}, {res_sounds, 59}, {res_sounds, 60}, {res_costumes, 8}, {NULL, 0} }; -static const ScummNESFile::LFLEntry lfl_31[] = { {res_rooms, 31}, {res_roomgfx, 31}, {res_scripts, 99}, {res_scripts, 115}, {res_scripts, 117}, {res_scripts, 119}, {res_scripts, 147}, {res_scripts, 157}, {res_scripts, 158}, {res_scripts, 160}, {res_costumes, 13}, {res_costumes, 9}, {res_costumes, 23}, {res_costumes, 24}, {NULL, 0} }; -static const ScummNESFile::LFLEntry lfl_32[] = { {res_rooms, 32}, {res_roomgfx, 32}, {res_costumes, 15}, {NULL, 0} }; -static const ScummNESFile::LFLEntry lfl_33[] = { {res_rooms, 33}, {res_roomgfx, 33}, {res_scripts, 120}, {res_scripts, 135}, {res_sounds, 56}, {res_sounds, 57}, {res_sounds, 58}, {res_sounds, 1}, {res_costumes, 22}, {NULL, 0} }; -static const ScummNESFile::LFLEntry lfl_34[] = { {res_rooms, 34}, {res_roomgfx, 34}, {NULL, 0} }; -static const ScummNESFile::LFLEntry lfl_35[] = { {res_rooms, 35}, {res_roomgfx, 35}, {NULL, 0} }; -static const ScummNESFile::LFLEntry lfl_36[] = { {res_rooms, 36}, {res_roomgfx, 36}, {res_sounds, 10}, {res_sounds, 4}, {NULL, 0} }; -static const ScummNESFile::LFLEntry lfl_37[] = { {res_rooms, 37}, {res_roomgfx, 37}, {NULL, 0} }; -static const ScummNESFile::LFLEntry lfl_38[] = { {res_rooms, 38}, {res_roomgfx, 38}, {res_scripts, 138}, {res_scripts, 139}, {res_scripts, 140}, {res_scripts, 141}, {res_scripts, 142}, {res_scripts, 143}, {res_scripts, 144}, {res_scripts, 145}, {NULL, 0} }; -static const ScummNESFile::LFLEntry lfl_39[] = { {res_rooms, 39}, {res_roomgfx, 39}, {NULL, 0} }; -static const ScummNESFile::LFLEntry lfl_40[] = { {res_rooms, 40}, {res_roomgfx, 0}, {res_scripts, 112}, {res_costumes, 17}, {NULL, 0} }; -static const ScummNESFile::LFLEntry lfl_41[] = { {res_rooms, 41}, {res_scripts, 106}, {res_sounds, 47}, {res_sounds, 48}, {res_sounds, 53}, {res_sounds, 49}, {res_sounds, 51}, {NULL, 0} }; -static const ScummNESFile::LFLEntry lfl_42[] = { {res_rooms, 42}, {res_scripts, 124}, {res_costumes, 18}, {NULL, 0} }; -static const ScummNESFile::LFLEntry lfl_43[] = { {res_rooms, 43}, {res_scripts, 44}, {res_sounds, 19}, {NULL, 0} }; -static const ScummNESFile::LFLEntry lfl_44[] = { {res_rooms, 44}, {res_scripts, 102}, {res_sounds, 6}, {res_sounds, 38}, {res_sounds, 8}, {res_sounds, 9}, {res_costumes, 1}, {res_costumes, 2}, {res_costumes, 5}, {res_costumes, 6}, {res_costumes, 3}, {res_costumes, 4}, {res_costumes, 7}, {NULL, 0} }; -static const ScummNESFile::LFLEntry lfl_45[] = { {res_rooms, 45}, {res_scripts, 1}, {res_scripts, 2}, {res_scripts, 3}, {res_scripts, 4}, {res_scripts, 5}, {res_scripts, 9}, {res_scripts, 114}, {res_scripts, 131}, {res_scripts, 164}, {res_scripts, 165}, {res_scripts, 169}, {res_scripts, 170}, {res_scripts, 171}, {res_scripts, 172}, {res_scripts, 173}, {res_scripts, 175}, {res_sounds, 54}, {NULL, 0} }; -static const ScummNESFile::LFLEntry lfl_46[] = { {res_rooms, 46}, {res_scripts, 130}, {res_sounds, 65}, {res_costumes, 0}, {res_costumes, 21}, {NULL, 0} }; -static const ScummNESFile::LFLEntry lfl_47[] = { {res_rooms, 47}, {res_scripts, 62}, {res_sounds, 69}, {NULL, 0} }; -static const ScummNESFile::LFLEntry lfl_48[] = { {res_rooms, 48}, {NULL, 0} }; -static const ScummNESFile::LFLEntry lfl_49[] = { {res_rooms, 49}, {NULL, 0} }; -static const ScummNESFile::LFLEntry lfl_50[] = { {res_rooms, 50}, {res_scripts, 133}, {res_scripts, 163}, {NULL, 0} }; -static const ScummNESFile::LFLEntry lfl_51[] = { {res_rooms, 51}, {res_scripts, 118}, {res_scripts, 128}, {res_sounds, 61}, {res_sounds, 62}, {res_sounds, 67}, {res_sounds, 66}, {res_costumes, 16}, {res_costumes, 20}, {NULL, 0} }; -static const ScummNESFile::LFLEntry lfl_52[] = { {res_rooms, 52}, {NULL, 0} }; -// remaining 'standard' resources (not used by any of the original LFL files) -static const ScummNESFile::LFLEntry lfl_53[] = { {res_rooms, 53}, {res_scripts, 177}, {res_scripts, 178}, {res_sounds, 70}, {res_sounds, 71}, {res_sounds, 72}, {res_sounds, 73}, {res_sounds, 74}, {res_sounds, 75}, {res_sounds, 76}, {res_sounds, 77}, {res_sounds, 78}, {res_sounds, 79}, {res_sounds, 80}, {res_sounds, 81}, {NULL, 0} }; -// all 'non-standard' resources (the costume-related stuff) -static const ScummNESFile::LFLEntry lfl_54[] = { {res_rooms, 54}, {res_sprdesc, 0}, {res_sprdesc, 1}, {res_sprlens, 0}, {res_sprlens, 1}, {res_sproffs, 0}, {res_sproffs, 1}, {res_sprdata, 0}, {res_sprdata, 1}, {res_costumegfx, 0}, {res_costumegfx, 1}, {res_sprpals, 0}, {res_sprpals, 1}, {res_charset, 0}, {res_preplist, 0}, {NULL, 0} }; - -struct ScummNESFile::LFL { - int num; - const ScummNESFile::LFLEntry *entries; -}; - -static const ScummNESFile::LFL lfls[] = { - { 1, lfl_01 }, - { 2, lfl_02 }, - { 3, lfl_03 }, - { 4, lfl_04 }, - { 5, lfl_05 }, - { 6, lfl_06 }, - { 7, lfl_07 }, - { 8, lfl_08 }, - { 9, lfl_09 }, - { 10, lfl_10 }, - { 11, lfl_11 }, - { 12, lfl_12 }, - { 13, lfl_13 }, - { 14, lfl_14 }, - { 15, lfl_15 }, - { 16, lfl_16 }, - { 17, lfl_17 }, - { 18, lfl_18 }, - { 19, lfl_19 }, - { 20, lfl_20 }, - { 21, lfl_21 }, - { 22, lfl_22 }, - { 23, lfl_23 }, - { 24, lfl_24 }, - { 25, lfl_25 }, - { 26, lfl_26 }, - { 27, lfl_27 }, - { 28, lfl_28 }, - { 29, lfl_29 }, - { 30, lfl_30 }, - { 31, lfl_31 }, - { 32, lfl_32 }, - { 33, lfl_33 }, - { 34, lfl_34 }, - { 35, lfl_35 }, - { 36, lfl_36 }, - { 37, lfl_37 }, - { 38, lfl_38 }, - { 39, lfl_39 }, - { 40, lfl_40 }, - { 41, lfl_41 }, - { 42, lfl_42 }, - { 43, lfl_43 }, - { 44, lfl_44 }, - { 45, lfl_45 }, - { 46, lfl_46 }, - { 47, lfl_47 }, - { 48, lfl_48 }, - { 49, lfl_49 }, - { 50, lfl_50 }, - { 51, lfl_51 }, - { 52, lfl_52 }, - { 53, lfl_53 }, - { 54, lfl_54 }, - { -1, NULL } -}; - -#include "common/pack-start.h" // START STRUCT PACKING - -struct _lfl_index { - byte room_lfl[55]; - uint16 room_addr[55]; - byte costume_lfl[80]; - uint16 costume_addr[80]; - byte script_lfl[200]; - uint16 script_addr[200]; - byte sound_lfl[100]; - uint16 sound_addr[100]; -} PACKED_STRUCT; - -#include "common/pack-end.h" // END STRUCT PACKING - -_lfl_index lfl_index; - -bool ScummNESFile::generateResource(int res) { - const LFL *lfl = &lfls[res - 1]; - int j; - int bufsize = 2; - - for (j = 0; lfl->entries[j].type != NULL; j++) - bufsize += extractResource(0, &lfl->entries[j].type[_ROMset][lfl->entries[j].index]); - - free(_buf); - _buf = (byte *)calloc(1, bufsize); - - Common::MemoryWriteStream out(_buf, bufsize); - - for (j = 0; lfl->entries[j].type != NULL; j++) { - const Resource *entry = &lfl->entries[j].type[_ROMset][lfl->entries[j].index]; - extractResource(&out, entry); - } - write_byte(&out, 0xD1); - write_byte(&out, 0xF5); - - if (_stream) - delete _stream; - - _stream = new Common::MemoryReadStream(_buf, bufsize); - - return true; -} - -bool ScummNESFile::generateIndex() { - int i, j; - - for (i = 0; lfls[i].num != -1; i++) { - const LFL *lfl = &lfls[i]; - uint16 respos = 0; - - for (j = 0; lfl->entries[j].type != NULL; j++) { - const LFLEntry *entry = &lfl->entries[j]; - - switch (entry->type[_ROMset][entry->index].type) { - case NES_ROOM: - lfl_index.room_lfl[entry->index] = lfl->num; - lfl_index.room_addr[entry->index] = TO_LE_16(respos); - break; - case NES_COSTUME: - lfl_index.costume_lfl[entry->index] = lfl->num; - lfl_index.costume_addr[entry->index] = TO_LE_16(respos); - break; - case NES_SPRDESC: - lfl_index.costume_lfl[entry->index + 25] = lfl->num; - lfl_index.costume_addr[entry->index + 25] = TO_LE_16(respos); - break; - case NES_SPRLENS: - lfl_index.costume_lfl[entry->index + 27] = lfl->num; - lfl_index.costume_addr[entry->index + 27] = TO_LE_16(respos); - break; - case NES_SPROFFS: - lfl_index.costume_lfl[entry->index + 29] = lfl->num; - lfl_index.costume_addr[entry->index + 29] = TO_LE_16(respos); - break; - case NES_SPRDATA: - lfl_index.costume_lfl[entry->index + 31] = lfl->num; - lfl_index.costume_addr[entry->index + 31] = TO_LE_16(respos); - break; - case NES_COSTUMEGFX: - lfl_index.costume_lfl[entry->index + 33] = lfl->num; - lfl_index.costume_addr[entry->index + 33] = TO_LE_16(respos); - break; - case NES_SPRPALS: - lfl_index.costume_lfl[entry->index + 35] = lfl->num; - lfl_index.costume_addr[entry->index + 35] = TO_LE_16(respos); - break; - case NES_ROOMGFX: - lfl_index.costume_lfl[entry->index + 37] = lfl->num; - lfl_index.costume_addr[entry->index + 37] = TO_LE_16(respos); - break; - case NES_SCRIPT: - lfl_index.script_lfl[entry->index] = lfl->num; - lfl_index.script_addr[entry->index] = TO_LE_16(respos); - break; - case NES_SOUND: - lfl_index.sound_lfl[entry->index] = lfl->num; - lfl_index.sound_addr[entry->index] = TO_LE_16(respos); - break; - case NES_CHARSET: - lfl_index.costume_lfl[77] = lfl->num; - lfl_index.costume_addr[77] = TO_LE_16(respos); - break; - case NES_PREPLIST: - lfl_index.costume_lfl[78] = lfl->num; - lfl_index.costume_addr[78] = TO_LE_16(respos); - break; - default: - error("Unindexed entry found!"); - break; - } - respos += extractResource(0, &entry->type[_ROMset][entry->index]); - } - } - - int bufsize = 2; - - bufsize += 775; - bufsize += sizeof(lfl_index); - - free(_buf); - _buf = (byte *)calloc(1, bufsize); - - Common::MemoryWriteStream out(_buf, bufsize); - - write_byte(&out, 0x43); - write_byte(&out, 0x46); - - extractResource(&out, &res_globdata[_ROMset][0]); - - for (i = 0; i < (int)sizeof(lfl_index); i++) - write_byte(&out, ((byte *)&lfl_index)[i]); - - if (_stream) - delete _stream; - - _stream = new Common::MemoryReadStream(_buf, bufsize); - - return true; -} - -bool ScummNESFile::open(const Common::String &filename, AccessMode mode) { - - if (_ROMset == kROMsetNum) { - char md5str[32+1]; - if (Common::md5_file_string(filename.c_str(), md5str)) { - - if (!strcmp(md5str, "3905799e081b80a61d4460b7b733c206")) { - _ROMset = kROMsetUSA; - debug(1, "ROM contents verified as Maniac Mansion (USA)"); - } else if (!strcmp(md5str, "d8d07efcb88f396bee0b402b10c3b1c9")) { - _ROMset = kROMsetEurope; - debug(1, "ROM contents verified as Maniac Mansion (Europe)"); - } else if (!strcmp(md5str, "22d07d6c386c9c25aca5dac2a0c0d94b")) { - _ROMset = kROMsetSweden; - debug(1, "ROM contents verified as Maniac Mansion (Sweden)"); - } else if (!strcmp(md5str, "81bbfa181184cb494e7a81dcfa94fbd9")) { - _ROMset = kROMsetFrance; - debug(2, "ROM contents verified as Maniac Mansion (France)"); - } else if (!strcmp(md5str, "257f8c14d8c584f7ddd601bcb00920c7")) { - _ROMset = kROMsetGermany; - debug(2, "ROM contents verified as Maniac Mansion (Germany)"); - } else { - error("Unsupported Maniac Mansion ROM, md5: %s", md5str); - return false; - } - } else { - return false; - } - } - - if (File::open(filename, mode)) { - if (_stream) - delete _stream; - _stream = 0; - - free(_buf); - _buf = 0; - - return true; - } else { - return false; - } -} - -void ScummNESFile::close() { - if (_stream) - delete _stream; - _stream = 0; - - free(_buf); - _buf = 0; - - File::close(); -} - -bool ScummNESFile::openSubFile(const Common::String &filename) { - assert(isOpen()); - - const char *ext = strrchr(filename.c_str(), '.'); - char resNum[3]; - int res; - - // We always have file name in form of XX.lfl - resNum[0] = ext[-2]; - resNum[1] = ext[-1]; - resNum[2] = 0; - - res = atoi(resNum); - - if (res == 0) { - return generateIndex(); - } else { - return generateResource(res); - } -} - -#pragma mark - #pragma mark --- ScummDiskImage --- #pragma mark - @@ -1487,6 +215,20 @@ static const int zakResourcesPerFile[59] = { }; +static uint16 write_byte(Common::WriteStream *out, byte val) { + val ^= 0xFF; + if (out != 0) + out->writeByte(val); + return 1; +} + +static uint16 write_word(Common::WriteStream *out, uint16 val) { + val ^= 0xFFFF; + if (out != 0) + out->writeUint16LE(val); + return 2; +} + ScummDiskImage::ScummDiskImage(const char *disk1, const char *disk2, GameSettings game) : _stream(0), _buf(0) { _disk1 = disk1; _disk2 = disk2; diff --git a/engines/scumm/file.h b/engines/scumm/file.h index 18b7b8fb18..10ab031c7e 100644 --- a/engines/scumm/file.h +++ b/engines/scumm/file.h @@ -70,50 +70,6 @@ public: uint32 write(const void *dataPtr, uint32 dataSize); }; -class ScummNESFile : public BaseScummFile { -public: - enum ROMset { - kROMsetUSA, - kROMsetEurope, - kROMsetSweden, - kROMsetFrance, - kROMsetGermany, - kROMsetNum - }; - - struct Resource; - struct LFLEntry; - struct LFL; - -private: - Common::MemoryReadStream *_stream; - ROMset _ROMset; - byte *_buf; - - bool generateIndex(); - bool generateResource(int res); - uint16 extractResource(Common::WriteStream *out, const Resource *res); - - byte fileReadByte(); - uint16 fileReadUint16LE(); - -public: - ScummNESFile(); - void setEnc(byte value); - - bool open(const Common::String &filename, AccessMode mode = kFileReadMode); - bool openSubFile(const Common::String &filename); - - void close(); - bool eof() { return _stream->eos(); } - uint32 pos() { return _stream->pos(); } - uint32 size() { return _stream->size(); } - void seek(int32 offs, int whence = SEEK_SET) { _stream->seek(offs, whence); } - uint32 read(void *dataPtr, uint32 dataSize) { return _stream->read(dataPtr, dataSize); } - uint32 write(const void *dataPtr, uint32 dataSize); -}; - - class ScummDiskImage : public BaseScummFile { private: Common::MemoryReadStream *_stream; diff --git a/engines/scumm/file_nes.cpp b/engines/scumm/file_nes.cpp new file mode 100644 index 0000000000..88b4253a1d --- /dev/null +++ b/engines/scumm/file_nes.cpp @@ -0,0 +1,1317 @@ +/* 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. + * + * $URL$ + * $Id$ + * + */ + +#include "scumm/file_nes.h" +#include "common/endian.h" +#include "common/md5.h" + +using Common::File; + +namespace Scumm { + +#pragma mark - +#pragma mark --- ScummNESFile --- +#pragma mark - + +enum ResType { + NES_UNKNOWN, + NES_GLOBDATA, + NES_ROOM, + NES_SCRIPT, + NES_SOUND, + NES_COSTUME, + NES_ROOMGFX, + NES_COSTUMEGFX, + NES_SPRPALS, + NES_SPRDESC, + NES_SPRLENS, + NES_SPROFFS, + NES_SPRDATA, + NES_CHARSET, + NES_PREPLIST +}; + +struct ScummNESFile::Resource { + uint32 offset; + uint16 length; + ResType type; +}; + +ScummNESFile::ScummNESFile() : _stream(0), _buf(0), _ROMset(kROMsetNum) { +} + +uint32 ScummNESFile::write(const void *, uint32) { + error("ScummNESFile does not support writing!"); + return 0; +} + +void ScummNESFile::setEnc(byte enc) { + _stream->setEnc(enc); +} + +static const ScummNESFile::Resource res_roomgfx_usa[40] = { + { 0x04001, 0x03C9, NES_ROOMGFX }, { 0x043CA, 0x069E, NES_ROOMGFX }, { 0x04A68, 0x0327, NES_ROOMGFX }, { 0x04D8F, 0x053B, NES_ROOMGFX }, { 0x052CA, 0x06BE, NES_ROOMGFX }, + { 0x05988, 0x0682, NES_ROOMGFX }, { 0x0600A, 0x0778, NES_ROOMGFX }, { 0x06782, 0x0517, NES_ROOMGFX }, { 0x06C99, 0x07FB, NES_ROOMGFX }, { 0x07494, 0x07BE, NES_ROOMGFX }, + { 0x08001, 0x07A5, NES_ROOMGFX }, { 0x087A6, 0x06DD, NES_ROOMGFX }, { 0x08E83, 0x04EA, NES_ROOMGFX }, { 0x0936D, 0x0846, NES_ROOMGFX }, { 0x09BB3, 0x08C8, NES_ROOMGFX }, + { 0x0A47B, 0x0844, NES_ROOMGFX }, { 0x0ACBF, 0x0515, NES_ROOMGFX }, { 0x0B1D4, 0x0799, NES_ROOMGFX }, { 0x0B96D, 0x04BB, NES_ROOMGFX }, { 0x07C52, 0x0319, NES_ROOMGFX }, + { 0x0C001, 0x0464, NES_ROOMGFX }, { 0x0C465, 0x076D, NES_ROOMGFX }, { 0x0CBD2, 0x0827, NES_ROOMGFX }, { 0x0D3F9, 0x0515, NES_ROOMGFX }, { 0x0D90E, 0x064E, NES_ROOMGFX }, + { 0x0DF5C, 0x0775, NES_ROOMGFX }, { 0x0E6D1, 0x06DD, NES_ROOMGFX }, { 0x0EDAE, 0x0376, NES_ROOMGFX }, { 0x0F124, 0x05F7, NES_ROOMGFX }, { 0x0F71B, 0x0787, NES_ROOMGFX }, + { 0x10001, 0x02D6, NES_ROOMGFX }, { 0x102D7, 0x06A3, NES_ROOMGFX }, { 0x1097A, 0x099F, NES_ROOMGFX }, { 0x11319, 0x0361, NES_ROOMGFX }, { 0x1167A, 0x0489, NES_ROOMGFX }, + { 0x11B03, 0x0437, NES_ROOMGFX }, { 0x11F3A, 0x084D, NES_ROOMGFX }, { 0x0BE28, 0x0199, NES_ROOMGFX }, { 0x12787, 0x09A7, NES_ROOMGFX }, { 0x1312E, 0x037A, NES_ROOMGFX } +}; +static const ScummNESFile::Resource res_roomgfx_eur[40] = { + { 0x04001, 0x03B9, NES_ROOMGFX }, { 0x043BA, 0x069E, NES_ROOMGFX }, { 0x04A58, 0x0327, NES_ROOMGFX }, { 0x04D7F, 0x053B, NES_ROOMGFX }, { 0x052BA, 0x06BE, NES_ROOMGFX }, + { 0x05978, 0x0682, NES_ROOMGFX }, { 0x05FFA, 0x0778, NES_ROOMGFX }, { 0x06772, 0x0517, NES_ROOMGFX }, { 0x06C89, 0x07FB, NES_ROOMGFX }, { 0x07484, 0x07BE, NES_ROOMGFX }, + { 0x08001, 0x07A5, NES_ROOMGFX }, { 0x087A6, 0x06DD, NES_ROOMGFX }, { 0x08E83, 0x04EA, NES_ROOMGFX }, { 0x0936D, 0x0846, NES_ROOMGFX }, { 0x09BB3, 0x08C8, NES_ROOMGFX }, + { 0x0A47B, 0x0844, NES_ROOMGFX }, { 0x0ACBF, 0x0515, NES_ROOMGFX }, { 0x0B1D4, 0x0799, NES_ROOMGFX }, { 0x0B96D, 0x04BB, NES_ROOMGFX }, { 0x07C42, 0x0319, NES_ROOMGFX }, + { 0x0C001, 0x0464, NES_ROOMGFX }, { 0x0C465, 0x076D, NES_ROOMGFX }, { 0x0CBD2, 0x0827, NES_ROOMGFX }, { 0x0D3F9, 0x0515, NES_ROOMGFX }, { 0x0D90E, 0x064E, NES_ROOMGFX }, + { 0x0DF5C, 0x0775, NES_ROOMGFX }, { 0x0E6D1, 0x06DD, NES_ROOMGFX }, { 0x0EDAE, 0x0376, NES_ROOMGFX }, { 0x0F124, 0x05F7, NES_ROOMGFX }, { 0x0F71B, 0x0787, NES_ROOMGFX }, + { 0x10001, 0x02D6, NES_ROOMGFX }, { 0x102D7, 0x06A3, NES_ROOMGFX }, { 0x1097A, 0x099F, NES_ROOMGFX }, { 0x11319, 0x0361, NES_ROOMGFX }, { 0x1167A, 0x0489, NES_ROOMGFX }, + { 0x11B03, 0x0437, NES_ROOMGFX }, { 0x11F3A, 0x084D, NES_ROOMGFX }, { 0x12787, 0x0199, NES_ROOMGFX }, { 0x12920, 0x09A7, NES_ROOMGFX }, { 0x132C7, 0x037A, NES_ROOMGFX } +}; +static const ScummNESFile::Resource res_roomgfx_swe[40] = { + { 0x04001, 0x03F0, NES_ROOMGFX }, { 0x043F1, 0x069E, NES_ROOMGFX }, { 0x04A8F, 0x0327, NES_ROOMGFX }, { 0x04DB6, 0x053B, NES_ROOMGFX }, { 0x052F1, 0x06BE, NES_ROOMGFX }, + { 0x059AF, 0x0682, NES_ROOMGFX }, { 0x06031, 0x0778, NES_ROOMGFX }, { 0x067A9, 0x0517, NES_ROOMGFX }, { 0x06CC0, 0x07FB, NES_ROOMGFX }, { 0x074BB, 0x07BE, NES_ROOMGFX }, + { 0x08001, 0x07A5, NES_ROOMGFX }, { 0x087A6, 0x06DD, NES_ROOMGFX }, { 0x08E83, 0x04EA, NES_ROOMGFX }, { 0x0936D, 0x07E2, NES_ROOMGFX }, { 0x09B4F, 0x0791, NES_ROOMGFX }, + { 0x0A2E0, 0x07B5, NES_ROOMGFX }, { 0x0AA95, 0x0515, NES_ROOMGFX }, { 0x0AFAA, 0x0799, NES_ROOMGFX }, { 0x0B743, 0x04BF, NES_ROOMGFX }, { 0x0BC02, 0x0319, NES_ROOMGFX }, + { 0x0C001, 0x0464, NES_ROOMGFX }, { 0x0C465, 0x072C, NES_ROOMGFX }, { 0x0CB91, 0x0827, NES_ROOMGFX }, { 0x0D3B8, 0x0515, NES_ROOMGFX }, { 0x0D8CD, 0x064E, NES_ROOMGFX }, + { 0x0DF1B, 0x0775, NES_ROOMGFX }, { 0x0E690, 0x06DD, NES_ROOMGFX }, { 0x0ED6D, 0x0376, NES_ROOMGFX }, { 0x0F0E3, 0x05F7, NES_ROOMGFX }, { 0x0F6DA, 0x0791, NES_ROOMGFX }, + { 0x07C79, 0x02D6, NES_ROOMGFX }, { 0x10001, 0x06A3, NES_ROOMGFX }, { 0x106A4, 0x0921, NES_ROOMGFX }, { 0x10FC5, 0x0361, NES_ROOMGFX }, { 0x11326, 0x0489, NES_ROOMGFX }, + { 0x117AF, 0x0437, NES_ROOMGFX }, { 0x11BE6, 0x084F, NES_ROOMGFX }, { 0x12435, 0x0199, NES_ROOMGFX }, { 0x125CE, 0x0947, NES_ROOMGFX }, { 0x12F15, 0x037A, NES_ROOMGFX } +}; +static const ScummNESFile::Resource res_roomgfx_fra[40] = { + { 0x04001, 0x0426, NES_ROOMGFX }, { 0x04427, 0x069E, NES_ROOMGFX }, { 0x04AC5, 0x0327, NES_ROOMGFX }, { 0x04DEC, 0x053B, NES_ROOMGFX }, { 0x05327, 0x06BE, NES_ROOMGFX }, + { 0x059E5, 0x0682, NES_ROOMGFX }, { 0x06067, 0x0778, NES_ROOMGFX }, { 0x067DF, 0x0517, NES_ROOMGFX }, { 0x06CF6, 0x07FB, NES_ROOMGFX }, { 0x074F1, 0x07BE, NES_ROOMGFX }, + { 0x08001, 0x07A5, NES_ROOMGFX }, { 0x087A6, 0x06DD, NES_ROOMGFX }, { 0x08E83, 0x04EA, NES_ROOMGFX }, { 0x0936D, 0x07E2, NES_ROOMGFX }, { 0x09B4F, 0x0791, NES_ROOMGFX }, + { 0x0A2E0, 0x07B5, NES_ROOMGFX }, { 0x0AA95, 0x0515, NES_ROOMGFX }, { 0x0AFAA, 0x0799, NES_ROOMGFX }, { 0x0B743, 0x04BB, NES_ROOMGFX }, { 0x0BBFE, 0x0319, NES_ROOMGFX }, + { 0x0C001, 0x0464, NES_ROOMGFX }, { 0x0C465, 0x072C, NES_ROOMGFX }, { 0x0CB91, 0x0827, NES_ROOMGFX }, { 0x0D3B8, 0x0515, NES_ROOMGFX }, { 0x0D8CD, 0x064E, NES_ROOMGFX }, + { 0x0DF1B, 0x0775, NES_ROOMGFX }, { 0x0E690, 0x06DD, NES_ROOMGFX }, { 0x0ED6D, 0x0376, NES_ROOMGFX }, { 0x0F0E3, 0x05F7, NES_ROOMGFX }, { 0x0F6DA, 0x0787, NES_ROOMGFX }, + { 0x10001, 0x02D6, NES_ROOMGFX }, { 0x102D7, 0x06A3, NES_ROOMGFX }, { 0x1097A, 0x0921, NES_ROOMGFX }, { 0x1129B, 0x0361, NES_ROOMGFX }, { 0x115FC, 0x0489, NES_ROOMGFX }, + { 0x11A85, 0x0437, NES_ROOMGFX }, { 0x11EBC, 0x070D, NES_ROOMGFX }, { 0x07CAF, 0x0199, NES_ROOMGFX }, { 0x125C9, 0x0947, NES_ROOMGFX }, { 0x12F10, 0x037A, NES_ROOMGFX } +}; +static const ScummNESFile::Resource res_roomgfx_ger[40] = { + { 0x04001, 0x0406, NES_ROOMGFX }, { 0x04407, 0x069E, NES_ROOMGFX }, { 0x04AA5, 0x0327, NES_ROOMGFX }, { 0x04DCC, 0x053B, NES_ROOMGFX }, { 0x05307, 0x06BE, NES_ROOMGFX }, + { 0x059C5, 0x0682, NES_ROOMGFX }, { 0x06047, 0x0778, NES_ROOMGFX }, { 0x067BF, 0x0517, NES_ROOMGFX }, { 0x06CD6, 0x07FB, NES_ROOMGFX }, { 0x074D1, 0x07BE, NES_ROOMGFX }, + { 0x08001, 0x07A5, NES_ROOMGFX }, { 0x087A6, 0x06DD, NES_ROOMGFX }, { 0x08E83, 0x04EA, NES_ROOMGFX }, { 0x0936D, 0x07E2, NES_ROOMGFX }, { 0x09B4F, 0x0791, NES_ROOMGFX }, + { 0x0A2E0, 0x07B5, NES_ROOMGFX }, { 0x0AA95, 0x0515, NES_ROOMGFX }, { 0x0AFAA, 0x0799, NES_ROOMGFX }, { 0x0B743, 0x04BB, NES_ROOMGFX }, { 0x0BBFE, 0x0319, NES_ROOMGFX }, + { 0x0C001, 0x0464, NES_ROOMGFX }, { 0x0C465, 0x072C, NES_ROOMGFX }, { 0x0CB91, 0x0827, NES_ROOMGFX }, { 0x0D3B8, 0x0515, NES_ROOMGFX }, { 0x0D8CD, 0x064E, NES_ROOMGFX }, + { 0x0DF1B, 0x0775, NES_ROOMGFX }, { 0x0E690, 0x06DD, NES_ROOMGFX }, { 0x0ED6D, 0x0376, NES_ROOMGFX }, { 0x0F0E3, 0x05F7, NES_ROOMGFX }, { 0x0F6DA, 0x0787, NES_ROOMGFX }, + { 0x07C8F, 0x02D6, NES_ROOMGFX }, { 0x10001, 0x06A3, NES_ROOMGFX }, { 0x106A4, 0x0921, NES_ROOMGFX }, { 0x10FC5, 0x0361, NES_ROOMGFX }, { 0x11326, 0x0489, NES_ROOMGFX }, + { 0x117AF, 0x0437, NES_ROOMGFX }, { 0x11BE6, 0x07A0, NES_ROOMGFX }, { 0x12386, 0x0199, NES_ROOMGFX }, { 0x1251F, 0x0947, NES_ROOMGFX }, { 0x12E66, 0x037A, NES_ROOMGFX } +}; +static const ScummNESFile::Resource res_roomgfx_esp[40] = { + { 0x04001, 0x041B, NES_ROOMGFX }, { 0x0441C, 0x069E, NES_ROOMGFX }, { 0x04ABA, 0x0327, NES_ROOMGFX }, { 0x04DE1, 0x053B, NES_ROOMGFX }, { 0x0531C, 0x06BE, NES_ROOMGFX }, + { 0x059DA, 0x0682, NES_ROOMGFX }, { 0x0605C, 0x0778, NES_ROOMGFX }, { 0x067D4, 0x0517, NES_ROOMGFX }, { 0x06CEB, 0x07FB, NES_ROOMGFX }, { 0x074E6, 0x07BE, NES_ROOMGFX }, + { 0x08001, 0x07A5, NES_ROOMGFX }, { 0x087A6, 0x06DD, NES_ROOMGFX }, { 0x08E83, 0x04EA, NES_ROOMGFX }, { 0x0936D, 0x07E2, NES_ROOMGFX }, { 0x09B4F, 0x0791, NES_ROOMGFX }, + { 0x0A2E0, 0x07B5, NES_ROOMGFX }, { 0x0AA95, 0x0515, NES_ROOMGFX }, { 0x0AFAA, 0x0799, NES_ROOMGFX }, { 0x0B743, 0x04B9, NES_ROOMGFX }, { 0x0BBFC, 0x0319, NES_ROOMGFX }, + { 0x0C001, 0x0464, NES_ROOMGFX }, { 0x0C465, 0x072C, NES_ROOMGFX }, { 0x0CB91, 0x0827, NES_ROOMGFX }, { 0x0D3B8, 0x0515, NES_ROOMGFX }, { 0x0D8CD, 0x064E, NES_ROOMGFX }, + { 0x0DF1B, 0x0775, NES_ROOMGFX }, { 0x0E690, 0x06DD, NES_ROOMGFX }, { 0x0ED6D, 0x0376, NES_ROOMGFX }, { 0x0F0E3, 0x05F7, NES_ROOMGFX }, { 0x0F6DA, 0x078D, NES_ROOMGFX }, + { 0x07CA4, 0x02D6, NES_ROOMGFX }, { 0x10001, 0x06A3, NES_ROOMGFX }, { 0x106A4, 0x091F, NES_ROOMGFX }, { 0x10FC3, 0x0361, NES_ROOMGFX }, { 0x11324, 0x0489, NES_ROOMGFX }, + { 0x117AD, 0x0437, NES_ROOMGFX }, { 0x11BE4, 0x086E, NES_ROOMGFX }, { 0x12452, 0x0199, NES_ROOMGFX }, { 0x125EB, 0x0947, NES_ROOMGFX }, { 0x12F32, 0x037A, NES_ROOMGFX } +}; + +static const ScummNESFile::Resource *res_roomgfx[ScummNESFile::kROMsetNum] = { + res_roomgfx_usa, + res_roomgfx_eur, + res_roomgfx_swe, + res_roomgfx_fra, + res_roomgfx_ger, + res_roomgfx_esp, +}; + +static const ScummNESFile::Resource res_costumegfx_usa[2] = { { 0x30001, 0x0EB8, NES_COSTUMEGFX }, { 0x2F9F1, 0x0340, NES_COSTUMEGFX } }; +static const ScummNESFile::Resource res_costumegfx_eur[2] = { { 0x30001, 0x0EB8, NES_COSTUMEGFX }, { 0x2F9F1, 0x0340, NES_COSTUMEGFX } }; +static const ScummNESFile::Resource res_costumegfx_swe[2] = { { 0x2EFE1, 0x0EB8, NES_COSTUMEGFX }, { 0x30001, 0x0340, NES_COSTUMEGFX } }; +static const ScummNESFile::Resource res_costumegfx_fra[2] = { { 0x30001, 0x0EB8, NES_COSTUMEGFX }, { 0x2F608, 0x0340, NES_COSTUMEGFX } }; +static const ScummNESFile::Resource res_costumegfx_ger[2] = { { 0x30001, 0x0EB8, NES_COSTUMEGFX }, { 0x2F4CE, 0x0340, NES_COSTUMEGFX } }; +static const ScummNESFile::Resource res_costumegfx_esp[2] = { { 0x30001, 0x0EB8, NES_COSTUMEGFX }, { 0x2F0F6, 0x0340, NES_COSTUMEGFX } }; + +static const ScummNESFile::Resource *res_costumegfx[ScummNESFile::kROMsetNum] = { + res_costumegfx_usa, + res_costumegfx_eur, + res_costumegfx_swe, + res_costumegfx_fra, + res_costumegfx_ger, + res_costumegfx_esp, +}; + +static const ScummNESFile::Resource res_rooms_usa[55] = { + { 0x00000, 0x0000, NES_ROOM }, { 0x14001, 0x0D0C, NES_ROOM }, { 0x134A8, 0x04B3, NES_ROOM }, { 0x15397, 0x0849, NES_ROOM }, { 0x15C68, 0x0685, NES_ROOM }, + { 0x16381, 0x0715, NES_ROOM }, { 0x1395B, 0x04E7, NES_ROOM }, { 0x16CE8, 0x0AC0, NES_ROOM }, { 0x18001, 0x06BA, NES_ROOM }, { 0x17AED, 0x03CB, NES_ROOM }, + { 0x18BE7, 0x0663, NES_ROOM }, { 0x192A6, 0x0580, NES_ROOM }, { 0x19A44, 0x0443, NES_ROOM }, { 0x1A106, 0x0563, NES_ROOM }, { 0x1A669, 0x0446, NES_ROOM }, + { 0x1AAAF, 0x03A7, NES_ROOM }, { 0x1AE56, 0x07E3, NES_ROOM }, { 0x1B699, 0x0692, NES_ROOM }, { 0x1C001, 0x0B49, NES_ROOM }, { 0x1CD09, 0x04C6, NES_ROOM }, + { 0x1D4C2, 0x0568, NES_ROOM }, { 0x1DF6C, 0x0514, NES_ROOM }, { 0x1E8FA, 0x05CC, NES_ROOM }, { 0x1EF83, 0x0389, NES_ROOM }, { 0x1F5E4, 0x0723, NES_ROOM }, + { 0x20001, 0x049A, NES_ROOM }, { 0x20511, 0x04F8, NES_ROOM }, { 0x21666, 0x05CB, NES_ROOM }, { 0x21DD6, 0x046B, NES_ROOM }, { 0x222F0, 0x0460, NES_ROOM }, + { 0x227B6, 0x0909, NES_ROOM }, { 0x24001, 0x0366, NES_ROOM }, { 0x23BDF, 0x03CA, NES_ROOM }, { 0x247DB, 0x050D, NES_ROOM }, { 0x25ACF, 0x0346, NES_ROOM }, + { 0x1BDBD, 0x01CA, NES_ROOM }, { 0x25E15, 0x0457, NES_ROOM }, { 0x2626C, 0x0547, NES_ROOM }, { 0x267B3, 0x064A, NES_ROOM }, { 0x1FD72, 0x024B, NES_ROOM }, + { 0x2739A, 0x01FA, NES_ROOM }, { 0x2766D, 0x0219, NES_ROOM }, { 0x28001, 0x02F4, NES_ROOM }, { 0x284D6, 0x045C, NES_ROOM }, { 0x289A3, 0x09CF, NES_ROOM }, + { 0x293C6, 0x05A0, NES_ROOM }, { 0x27B65, 0x0201, NES_ROOM }, { 0x2ADD1, 0x0325, NES_ROOM }, { 0x2B339, 0x01FC, NES_ROOM }, { 0x2B535, 0x02A9, NES_ROOM }, + { 0x2B7DE, 0x02DE, NES_ROOM }, { 0x2C001, 0x03CE, NES_ROOM }, { 0x2BBC0, 0x0205, NES_ROOM }, { 0x2C53A, 0x0170, NES_ROOM }, { 0x13E42, 0x0169, NES_ROOM } +}; +static const ScummNESFile::Resource res_rooms_eur[55] = { + { 0x00000, 0x0000, NES_ROOM }, { 0x14001, 0x0D0C, NES_ROOM }, { 0x13641, 0x04B3, NES_ROOM }, { 0x15397, 0x0849, NES_ROOM }, { 0x15C68, 0x0685, NES_ROOM }, + { 0x16381, 0x0715, NES_ROOM }, { 0x16CE8, 0x04E7, NES_ROOM }, { 0x18001, 0x0ABF, NES_ROOM }, { 0x171CF, 0x06BA, NES_ROOM }, { 0x13AF4, 0x03D2, NES_ROOM }, + { 0x18E1A, 0x0663, NES_ROOM }, { 0x194D9, 0x04A9, NES_ROOM }, { 0x19BA0, 0x0443, NES_ROOM }, { 0x1A262, 0x047C, NES_ROOM }, { 0x1A6DE, 0x0446, NES_ROOM }, + { 0x1AB24, 0x03A7, NES_ROOM }, { 0x1AECB, 0x07E3, NES_ROOM }, { 0x1B70E, 0x0692, NES_ROOM }, { 0x1C001, 0x0ACA, NES_ROOM }, { 0x1CC8A, 0x04C6, NES_ROOM }, + { 0x1D443, 0x0568, NES_ROOM }, { 0x1DEED, 0x0514, NES_ROOM }, { 0x1E87B, 0x05CC, NES_ROOM }, { 0x1EF04, 0x0389, NES_ROOM }, { 0x1F565, 0x0723, NES_ROOM }, + { 0x20001, 0x049A, NES_ROOM }, { 0x20511, 0x04F8, NES_ROOM }, { 0x21666, 0x05D5, NES_ROOM }, { 0x21DE0, 0x046B, NES_ROOM }, { 0x222FA, 0x0460, NES_ROOM }, + { 0x227C0, 0x0909, NES_ROOM }, { 0x24001, 0x0366, NES_ROOM }, { 0x247DB, 0x03CA, NES_ROOM }, { 0x24BA5, 0x050D, NES_ROOM }, { 0x23BE9, 0x0346, NES_ROOM }, + { 0x17DB5, 0x01CA, NES_ROOM }, { 0x25E99, 0x0457, NES_ROOM }, { 0x262F0, 0x0547, NES_ROOM }, { 0x26837, 0x064A, NES_ROOM }, { 0x1FCF3, 0x024B, NES_ROOM }, + { 0x2741E, 0x01FA, NES_ROOM }, { 0x276F1, 0x0219, NES_ROOM }, { 0x28001, 0x02F4, NES_ROOM }, { 0x284D6, 0x045C, NES_ROOM }, { 0x289A3, 0x09CF, NES_ROOM }, + { 0x293C6, 0x05A0, NES_ROOM }, { 0x27BE9, 0x0201, NES_ROOM }, { 0x2ADE3, 0x0325, NES_ROOM }, { 0x2B34B, 0x01FC, NES_ROOM }, { 0x2B547, 0x02A9, NES_ROOM }, + { 0x2B7F0, 0x02DE, NES_ROOM }, { 0x2C001, 0x03CE, NES_ROOM }, { 0x2BBD2, 0x0205, NES_ROOM }, { 0x2C53A, 0x0170, NES_ROOM }, { 0x2BDD7, 0x0169, NES_ROOM } +}; +static const ScummNESFile::Resource res_rooms_swe[55] = { + { 0x00000, 0x0000, NES_ROOM }, { 0x14001, 0x0D12, NES_ROOM }, { 0x1328F, 0x04B3, NES_ROOM }, { 0x15367, 0x0859, NES_ROOM }, { 0x13742, 0x0694, NES_ROOM }, + { 0x15C45, 0x0707, NES_ROOM }, { 0x1658F, 0x04E0, NES_ROOM }, { 0x16A6F, 0x0AC8, NES_ROOM }, { 0x18001, 0x06C7, NES_ROOM }, { 0x1789C, 0x03EA, NES_ROOM }, + { 0x18C09, 0x0649, NES_ROOM }, { 0x192AE, 0x04AB, NES_ROOM }, { 0x19982, 0x0447, NES_ROOM }, { 0x1A04D, 0x047E, NES_ROOM }, { 0x1A4CB, 0x0444, NES_ROOM }, + { 0x1A90F, 0x03B9, NES_ROOM }, { 0x1ACC8, 0x07E9, NES_ROOM }, { 0x1B511, 0x06A4, NES_ROOM }, { 0x1C001, 0x0B1A, NES_ROOM }, { 0x1CCFD, 0x0486, NES_ROOM }, + { 0x1D482, 0x0579, NES_ROOM }, { 0x1DF61, 0x051E, NES_ROOM }, { 0x1E8EC, 0x05CF, NES_ROOM }, { 0x1EF73, 0x0398, NES_ROOM }, { 0x1F5F0, 0x071A, NES_ROOM }, + { 0x20001, 0x049C, NES_ROOM }, { 0x2051E, 0x051E, NES_ROOM }, { 0x21725, 0x05D5, NES_ROOM }, { 0x21EA5, 0x047F, NES_ROOM }, { 0x223D1, 0x0460, NES_ROOM }, + { 0x22897, 0x090D, NES_ROOM }, { 0x24001, 0x0378, NES_ROOM }, { 0x247C9, 0x03CA, NES_ROOM }, { 0x24B93, 0x050D, NES_ROOM }, { 0x25267, 0x0346, NES_ROOM }, + { 0x17CD0, 0x01CA, NES_ROOM }, { 0x255AD, 0x0453, NES_ROOM }, { 0x25A00, 0x053E, NES_ROOM }, { 0x25F3E, 0x0647, NES_ROOM }, { 0x1BC49, 0x024B, NES_ROOM }, + { 0x26B58, 0x01FA, NES_ROOM }, { 0x26E27, 0x0217, NES_ROOM }, { 0x27345, 0x02F4, NES_ROOM }, { 0x27829, 0x045C, NES_ROOM }, { 0x28001, 0x098A, NES_ROOM }, + { 0x289DF, 0x05A1, NES_ROOM }, { 0x2A442, 0x0201, NES_ROOM }, { 0x2A6E9, 0x0325, NES_ROOM }, { 0x1FD75, 0x01FC, NES_ROOM }, { 0x2AC64, 0x02A9, NES_ROOM }, + { 0x2AF0D, 0x02D1, NES_ROOM }, { 0x2B2E6, 0x03CC, NES_ROOM }, { 0x23D61, 0x0205, NES_ROOM }, { 0x2B818, 0x0168, NES_ROOM }, { 0x27CF6, 0x0169, NES_ROOM } +}; +static const ScummNESFile::Resource res_rooms_fra[55] = { + { 0x00000, 0x0000, NES_ROOM }, { 0x14001, 0x0D76, NES_ROOM }, { 0x1328A, 0x04C6, NES_ROOM }, { 0x15451, 0x0885, NES_ROOM }, { 0x13750, 0x0693, NES_ROOM }, + { 0x15D68, 0x0709, NES_ROOM }, { 0x166D4, 0x0528, NES_ROOM }, { 0x16BFC, 0x0ACC, NES_ROOM }, { 0x18001, 0x06E2, NES_ROOM }, { 0x17A63, 0x03E5, NES_ROOM }, + { 0x18C3B, 0x066A, NES_ROOM }, { 0x19301, 0x049E, NES_ROOM }, { 0x199C8, 0x044B, NES_ROOM }, { 0x1A0B1, 0x0478, NES_ROOM }, { 0x1A529, 0x043F, NES_ROOM }, + { 0x1A968, 0x03C8, NES_ROOM }, { 0x1AD30, 0x086F, NES_ROOM }, { 0x1B5FF, 0x069B, NES_ROOM }, { 0x1C001, 0x0AA9, NES_ROOM }, { 0x1CC97, 0x049E, NES_ROOM }, + { 0x1D42C, 0x05A8, NES_ROOM }, { 0x1DF71, 0x054E, NES_ROOM }, { 0x1E9D1, 0x0606, NES_ROOM }, { 0x1F0A2, 0x039A, NES_ROOM }, { 0x1F74E, 0x071C, NES_ROOM }, + { 0x20001, 0x04B5, NES_ROOM }, { 0x2052E, 0x04FF, NES_ROOM }, { 0x2172E, 0x05DB, NES_ROOM }, { 0x21EAD, 0x0489, NES_ROOM }, { 0x223E1, 0x0465, NES_ROOM }, + { 0x228AC, 0x0957, NES_ROOM }, { 0x24001, 0x037E, NES_ROOM }, { 0x2481A, 0x03CA, NES_ROOM }, { 0x24BE4, 0x050D, NES_ROOM }, { 0x252C0, 0x0346, NES_ROOM }, + { 0x1BD30, 0x01CA, NES_ROOM }, { 0x25606, 0x046D, NES_ROOM }, { 0x25A73, 0x055A, NES_ROOM }, { 0x25FCD, 0x0654, NES_ROOM }, { 0x26C98, 0x024B, NES_ROOM }, + { 0x26EE3, 0x01FA, NES_ROOM }, { 0x271DD, 0x0217, NES_ROOM }, { 0x27713, 0x02F4, NES_ROOM }, { 0x28001, 0x045C, NES_ROOM }, { 0x284CE, 0x0975, NES_ROOM }, + { 0x28E97, 0x05E6, NES_ROOM }, { 0x27C3A, 0x0201, NES_ROOM }, { 0x2A9D6, 0x0325, NES_ROOM }, { 0x2AF88, 0x01FC, NES_ROOM }, { 0x2B184, 0x02A9, NES_ROOM }, + { 0x2B42D, 0x02DF, NES_ROOM }, { 0x2B818, 0x03EC, NES_ROOM }, { 0x2BD67, 0x0209, NES_ROOM }, { 0x2C001, 0x0168, NES_ROOM }, { 0x2C4BF, 0x0169, NES_ROOM } +}; +static const ScummNESFile::Resource res_rooms_ger[55] = { + { 0x00000, 0x0000, NES_ROOM }, { 0x14001, 0x0D63, NES_ROOM }, { 0x131E0, 0x04A9, NES_ROOM }, { 0x13689, 0x086B, NES_ROOM }, { 0x15421, 0x06A8, NES_ROOM }, + { 0x15B5D, 0x0731, NES_ROOM }, { 0x16507, 0x0501, NES_ROOM }, { 0x16A08, 0x0AE9, NES_ROOM }, { 0x18001, 0x06DA, NES_ROOM }, { 0x17880, 0x03D0, NES_ROOM }, + { 0x18C7B, 0x0651, NES_ROOM }, { 0x19328, 0x04A7, NES_ROOM }, { 0x199FE, 0x0447, NES_ROOM }, { 0x1A0F1, 0x0486, NES_ROOM }, { 0x1A577, 0x045D, NES_ROOM }, + { 0x1A9D4, 0x03AE, NES_ROOM }, { 0x1AD82, 0x0840, NES_ROOM }, { 0x1B622, 0x06C3, NES_ROOM }, { 0x1C001, 0x0B07, NES_ROOM }, { 0x1CD05, 0x0494, NES_ROOM }, + { 0x1D4A5, 0x05AC, NES_ROOM }, { 0x1DFD6, 0x0524, NES_ROOM }, { 0x1E9C0, 0x05F7, NES_ROOM }, { 0x1F09A, 0x038E, NES_ROOM }, { 0x1F75F, 0x0733, NES_ROOM }, + { 0x20001, 0x04A9, NES_ROOM }, { 0x2052A, 0x052E, NES_ROOM }, { 0x2177C, 0x0621, NES_ROOM }, { 0x21F57, 0x0495, NES_ROOM }, { 0x2249A, 0x045E, NES_ROOM }, + { 0x2295E, 0x0951, NES_ROOM }, { 0x24001, 0x036E, NES_ROOM }, { 0x247F9, 0x03CA, NES_ROOM }, { 0x24BC3, 0x050D, NES_ROOM }, { 0x252A8, 0x0346, NES_ROOM }, + { 0x17CA2, 0x01CA, NES_ROOM }, { 0x255EE, 0x046F, NES_ROOM }, { 0x25A5D, 0x054D, NES_ROOM }, { 0x25FAA, 0x064B, NES_ROOM }, { 0x26BE2, 0x024B, NES_ROOM }, + { 0x26E2D, 0x01FA, NES_ROOM }, { 0x2710F, 0x0217, NES_ROOM }, { 0x27663, 0x02F4, NES_ROOM }, { 0x28001, 0x045C, NES_ROOM }, { 0x284CE, 0x0A8F, NES_ROOM }, + { 0x28FB1, 0x05FF, NES_ROOM }, { 0x27B69, 0x0201, NES_ROOM }, { 0x2AAA9, 0x0325, NES_ROOM }, { 0x1BD7C, 0x01FC, NES_ROOM }, { 0x2B031, 0x02A9, NES_ROOM }, + { 0x2B2DA, 0x02D8, NES_ROOM }, { 0x2B6D2, 0x03D2, NES_ROOM }, { 0x2BC0D, 0x020D, NES_ROOM }, { 0x2C001, 0x0168, NES_ROOM }, { 0x27E11, 0x0169, NES_ROOM } +}; +static const ScummNESFile::Resource res_rooms_esp[55] = { + { 0x00000, 0x0000, NES_ROOM }, { 0x14001, 0x0D05, NES_ROOM }, { 0x132AC, 0x04B0, NES_ROOM }, { 0x153AB, 0x087B, NES_ROOM }, { 0x1375C, 0x06B3, NES_ROOM }, + { 0x15CB1, 0x0729, NES_ROOM }, { 0x16625, 0x04F0, NES_ROOM }, { 0x16B15, 0x0AD4, NES_ROOM }, { 0x18001, 0x06ED, NES_ROOM }, { 0x17936, 0x03DE, NES_ROOM }, + { 0x18C3E, 0x0671, NES_ROOM }, { 0x1930B, 0x04C4, NES_ROOM }, { 0x199EC, 0x0452, NES_ROOM }, { 0x1A0DA, 0x048F, NES_ROOM }, { 0x1A569, 0x0449, NES_ROOM }, + { 0x1A9B2, 0x03A8, NES_ROOM }, { 0x1AD5A, 0x0846, NES_ROOM }, { 0x1B600, 0x0686, NES_ROOM }, { 0x1C001, 0x0B58, NES_ROOM }, { 0x1CD42, 0x049C, NES_ROOM }, + { 0x1D4ED, 0x0586, NES_ROOM }, { 0x1DFE9, 0x0526, NES_ROOM }, { 0x1E9C9, 0x05CE, NES_ROOM }, { 0x1F04B, 0x0390, NES_ROOM }, { 0x1F6CA, 0x073C, NES_ROOM }, + { 0x20001, 0x04CB, NES_ROOM }, { 0x20543, 0x0530, NES_ROOM }, { 0x2171B, 0x05FC, NES_ROOM }, { 0x21EBE, 0x0470, NES_ROOM }, { 0x223DC, 0x045C, NES_ROOM }, + { 0x2289E, 0x0928, NES_ROOM }, { 0x24001, 0x036C, NES_ROOM }, { 0x247EC, 0x03CA, NES_ROOM }, { 0x24BB6, 0x050D, NES_ROOM }, { 0x25283, 0x0346, NES_ROOM }, + { 0x17D60, 0x01CA, NES_ROOM }, { 0x255C9, 0x0462, NES_ROOM }, { 0x25A2B, 0x055C, NES_ROOM }, { 0x25F87, 0x0659, NES_ROOM }, { 0x1BD19, 0x024B, NES_ROOM }, + { 0x26B8A, 0x01F7, NES_ROOM }, { 0x26E5D, 0x0217, NES_ROOM }, { 0x2736A, 0x02F4, NES_ROOM }, { 0x27845, 0x045C, NES_ROOM }, { 0x28001, 0x0969, NES_ROOM }, + { 0x289BE, 0x058E, NES_ROOM }, { 0x2A418, 0x0201, NES_ROOM }, { 0x2A6BE, 0x0325, NES_ROOM }, { 0x23D84, 0x01FC, NES_ROOM }, { 0x2AC46, 0x02A9, NES_ROOM }, + { 0x2AEEF, 0x02C9, NES_ROOM }, { 0x2B2C0, 0x03D2, NES_ROOM }, { 0x27D12, 0x0207, NES_ROOM }, { 0x2B7FC, 0x0168, NES_ROOM }, { 0x2BD06, 0x0169, NES_ROOM } +}; + +static const ScummNESFile::Resource *res_rooms[ScummNESFile::kROMsetNum] = { + res_rooms_usa, + res_rooms_eur, + res_rooms_swe, + res_rooms_fra, + res_rooms_ger, + res_rooms_esp, +}; + +static const ScummNESFile::Resource res_scripts_usa[179] = { + { 0x00000, 0x0000, NES_SCRIPT }, { 0x29966, 0x044D, NES_SCRIPT }, { 0x29DB3, 0x0207, NES_SCRIPT }, { 0x29FBA, 0x009F, NES_SCRIPT }, { 0x2A059, 0x03F4, NES_SCRIPT }, + { 0x2A44D, 0x01A1, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, { 0x2A5EE, 0x004A, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, { 0x2A638, 0x0005, NES_SCRIPT }, + { 0x2C6AA, 0x000D, NES_SCRIPT }, { 0x2C6B7, 0x000D, NES_SCRIPT }, { 0x186BB, 0x0040, NES_SCRIPT }, { 0x186FB, 0x0016, NES_SCRIPT }, { 0x1B639, 0x0046, NES_SCRIPT }, + { 0x1EEC6, 0x00BD, NES_SCRIPT }, { 0x21C31, 0x0055, NES_SCRIPT }, { 0x177A8, 0x0027, NES_SCRIPT }, { 0x1FD07, 0x0027, NES_SCRIPT }, { 0x1FD2E, 0x0027, NES_SCRIPT }, + { 0x1BD2B, 0x0022, NES_SCRIPT }, { 0x15BE0, 0x0088, NES_SCRIPT }, { 0x22241, 0x0020, NES_SCRIPT }, { 0x22261, 0x008F, NES_SCRIPT }, { 0x1924A, 0x002B, NES_SCRIPT }, + { 0x1CB4A, 0x0061, NES_SCRIPT }, { 0x1CBAB, 0x003C, NES_SCRIPT }, { 0x1CBE7, 0x0042, NES_SCRIPT }, { 0x1CC29, 0x004F, NES_SCRIPT }, { 0x2049B, 0x0076, NES_SCRIPT }, + { 0x16A96, 0x0035, NES_SCRIPT }, { 0x16ACB, 0x001C, NES_SCRIPT }, { 0x16AE7, 0x0014, NES_SCRIPT }, { 0x16AFB, 0x001C, NES_SCRIPT }, { 0x16B17, 0x0027, NES_SCRIPT }, + { 0x16B3E, 0x01AA, NES_SCRIPT }, { 0x1D1CF, 0x0096, NES_SCRIPT }, { 0x1D265, 0x010E, NES_SCRIPT }, { 0x1D373, 0x001C, NES_SCRIPT }, { 0x1D38F, 0x0056, NES_SCRIPT }, + { 0x1D3E5, 0x0072, NES_SCRIPT }, { 0x1E480, 0x0028, NES_SCRIPT }, { 0x1E4A8, 0x017D, NES_SCRIPT }, { 0x1E625, 0x0229, NES_SCRIPT }, { 0x28932, 0x0071, NES_SCRIPT }, + { 0x17EB8, 0x004D, NES_SCRIPT }, { 0x162ED, 0x0039, NES_SCRIPT }, { 0x18711, 0x028B, NES_SCRIPT }, { 0x1899C, 0x00BB, NES_SCRIPT }, { 0x18A57, 0x018B, NES_SCRIPT }, + { 0x00000, 0x0000, NES_SCRIPT }, { 0x19E87, 0x00ED, NES_SCRIPT }, { 0x21C86, 0x00F6, NES_SCRIPT }, { 0x1E84E, 0x009B, NES_SCRIPT }, { 0x21D7C, 0x0047, NES_SCRIPT }, + { 0x2C6C4, 0x004D, NES_SCRIPT }, { 0x16326, 0x0024, NES_SCRIPT }, { 0x14D0D, 0x0014, NES_SCRIPT }, { 0x177CF, 0x0059, NES_SCRIPT }, { 0x17828, 0x0109, NES_SCRIPT }, + { 0x17931, 0x0009, NES_SCRIPT }, { 0x14D21, 0x01B6, NES_SCRIPT }, { 0x2B0F6, 0x0243, NES_SCRIPT }, { 0x230BF, 0x067F, NES_SCRIPT }, { 0x2C711, 0x001C, NES_SCRIPT }, + { 0x2C72D, 0x001A, NES_SCRIPT }, { 0x2C747, 0x0021, NES_SCRIPT }, { 0x2C768, 0x0024, NES_SCRIPT }, { 0x2C78C, 0x0017, NES_SCRIPT }, { 0x2C7A3, 0x0017, NES_SCRIPT }, + { 0x2C7BA, 0x0014, NES_SCRIPT }, { 0x2C7CE, 0x0024, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, { 0x2C7F2, 0x0011, NES_SCRIPT }, { 0x1793A, 0x009D, NES_SCRIPT }, + { 0x22750, 0x0066, NES_SCRIPT }, { 0x14ED7, 0x0075, NES_SCRIPT }, { 0x1F30C, 0x0120, NES_SCRIPT }, { 0x1FD55, 0x001D, NES_SCRIPT }, { 0x1F42C, 0x008F, NES_SCRIPT }, + { 0x1F4BB, 0x0097, NES_SCRIPT }, { 0x179D7, 0x006A, NES_SCRIPT }, { 0x17A41, 0x0030, NES_SCRIPT }, { 0x1F552, 0x0092, NES_SCRIPT }, { 0x2C803, 0x00CC, NES_SCRIPT }, + { 0x2C8CF, 0x00BA, NES_SCRIPT }, { 0x2C989, 0x0088, NES_SCRIPT }, { 0x20A09, 0x01B0, NES_SCRIPT }, { 0x20BB9, 0x0168, NES_SCRIPT }, { 0x20D21, 0x006C, NES_SCRIPT }, + { 0x20D8D, 0x0037, NES_SCRIPT }, { 0x20DC4, 0x00E4, NES_SCRIPT }, { 0x20EA8, 0x0045, NES_SCRIPT }, { 0x20EED, 0x00E1, NES_SCRIPT }, { 0x20FCE, 0x00F6, NES_SCRIPT }, + { 0x210C4, 0x0141, NES_SCRIPT }, { 0x21205, 0x0183, NES_SCRIPT }, { 0x21388, 0x0034, NES_SCRIPT }, { 0x213BC, 0x00A9, NES_SCRIPT }, { 0x24367, 0x011B, NES_SCRIPT }, + { 0x1BD4D, 0x0070, NES_SCRIPT }, { 0x1CC78, 0x0091, NES_SCRIPT }, { 0x29372, 0x0054, NES_SCRIPT }, { 0x19F74, 0x00CE, NES_SCRIPT }, { 0x1A042, 0x0077, NES_SCRIPT }, + { 0x14F4C, 0x0057, NES_SCRIPT }, { 0x27886, 0x02DF, NES_SCRIPT }, { 0x1DA2A, 0x0219, NES_SCRIPT }, { 0x1DC43, 0x00F9, NES_SCRIPT }, { 0x1DD3C, 0x0056, NES_SCRIPT }, + { 0x1DD92, 0x01C2, NES_SCRIPT }, { 0x14FA3, 0x004D, NES_SCRIPT }, { 0x27594, 0x00D9, NES_SCRIPT }, { 0x21DC3, 0x0013, NES_SCRIPT }, { 0x2A63D, 0x00F0, NES_SCRIPT }, + { 0x24482, 0x00E7, NES_SCRIPT }, { 0x21465, 0x00F2, NES_SCRIPT }, { 0x24569, 0x002B, NES_SCRIPT }, { 0x2C3CF, 0x010F, NES_SCRIPT }, { 0x24594, 0x00AA, NES_SCRIPT }, + { 0x24CE8, 0x0DAB, NES_SCRIPT }, { 0x1B67F, 0x000D, NES_SCRIPT }, { 0x1B68C, 0x000D, NES_SCRIPT }, { 0x2373E, 0x017C, NES_SCRIPT }, { 0x282F5, 0x01E1, NES_SCRIPT }, + { 0x238BA, 0x0153, NES_SCRIPT }, { 0x23A0D, 0x019C, NES_SCRIPT }, { 0x23BA9, 0x0016, NES_SCRIPT }, { 0x2C4DE, 0x005C, NES_SCRIPT }, { 0x23BBF, 0x0020, NES_SCRIPT }, + { 0x27D66, 0x00A5, NES_SCRIPT }, { 0x2A72D, 0x034D, NES_SCRIPT }, { 0x14FF0, 0x00E3, NES_SCRIPT }, { 0x2BABC, 0x005F, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, + { 0x25A93, 0x003C, NES_SCRIPT }, { 0x1E8E9, 0x0011, NES_SCRIPT }, { 0x1634A, 0x0018, NES_SCRIPT }, { 0x26DFD, 0x001F, NES_SCRIPT }, { 0x26E1C, 0x0054, NES_SCRIPT }, + { 0x26E70, 0x0149, NES_SCRIPT }, { 0x26FB9, 0x004B, NES_SCRIPT }, { 0x27004, 0x017D, NES_SCRIPT }, { 0x27181, 0x0027, NES_SCRIPT }, { 0x271A8, 0x0041, NES_SCRIPT }, + { 0x271E9, 0x01B1, NES_SCRIPT }, { 0x16362, 0x001F, NES_SCRIPT }, { 0x2463E, 0x002A, NES_SCRIPT }, { 0x150D3, 0x019E, NES_SCRIPT }, { 0x19275, 0x0031, NES_SCRIPT }, + { 0x17A71, 0x007C, NES_SCRIPT }, { 0x21557, 0x00DC, NES_SCRIPT }, { 0x1D457, 0x0018, NES_SCRIPT }, { 0x1D46F, 0x0053, NES_SCRIPT }, { 0x18BE2, 0x0005, NES_SCRIPT }, + { 0x15271, 0x011B, NES_SCRIPT }, { 0x1538C, 0x000B, NES_SCRIPT }, { 0x24668, 0x0138, NES_SCRIPT }, { 0x247A0, 0x0014, NES_SCRIPT }, { 0x1DF54, 0x0018, NES_SCRIPT }, + { 0x247B4, 0x0027, NES_SCRIPT }, { 0x1A0B9, 0x004D, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, { 0x2BB1B, 0x00A5, NES_SCRIPT }, { 0x2AA7A, 0x00C1, NES_SCRIPT }, + { 0x2AB3B, 0x0140, NES_SCRIPT }, { 0x19826, 0x00BF, NES_SCRIPT }, { 0x198E5, 0x014D, NES_SCRIPT }, { 0x19A32, 0x0012, NES_SCRIPT }, { 0x2AC7B, 0x0005, NES_SCRIPT }, + { 0x2AC80, 0x0005, NES_SCRIPT }, { 0x2AC85, 0x0005, NES_SCRIPT }, { 0x2AC8A, 0x0005, NES_SCRIPT }, { 0x2AC8F, 0x0005, NES_SCRIPT }, { 0x21633, 0x0033, NES_SCRIPT }, + { 0x2AC94, 0x0005, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, { 0x2AC99, 0x009C, NES_SCRIPT }, { 0x2AD35, 0x009C, NES_SCRIPT } +}; +static const ScummNESFile::Resource res_scripts_eur[179] = { + { 0x00000, 0x0000, NES_SCRIPT }, { 0x29966, 0x044D, NES_SCRIPT }, { 0x29DB3, 0x0207, NES_SCRIPT }, { 0x29FBA, 0x009F, NES_SCRIPT }, { 0x2A059, 0x03F4, NES_SCRIPT }, + { 0x2A44D, 0x01A1, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, { 0x2A5EE, 0x005C, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, { 0x2A64A, 0x0005, NES_SCRIPT }, + { 0x2C6AA, 0x000D, NES_SCRIPT }, { 0x2C6B7, 0x000D, NES_SCRIPT }, { 0x17889, 0x0040, NES_SCRIPT }, { 0x178C9, 0x0016, NES_SCRIPT }, { 0x1B6AE, 0x0046, NES_SCRIPT }, + { 0x1EE47, 0x00BD, NES_SCRIPT }, { 0x21C3B, 0x0055, NES_SCRIPT }, { 0x18AC0, 0x0027, NES_SCRIPT }, { 0x1FC88, 0x0027, NES_SCRIPT }, { 0x1FCAF, 0x0027, NES_SCRIPT }, + { 0x1BDA0, 0x0022, NES_SCRIPT }, { 0x15BE0, 0x0088, NES_SCRIPT }, { 0x2224B, 0x0020, NES_SCRIPT }, { 0x2226B, 0x008F, NES_SCRIPT }, { 0x1947D, 0x002B, NES_SCRIPT }, + { 0x1CACB, 0x0061, NES_SCRIPT }, { 0x1CB2C, 0x003C, NES_SCRIPT }, { 0x1CB68, 0x0042, NES_SCRIPT }, { 0x1CBAA, 0x004F, NES_SCRIPT }, { 0x2049B, 0x0076, NES_SCRIPT }, + { 0x16A96, 0x0035, NES_SCRIPT }, { 0x16ACB, 0x001C, NES_SCRIPT }, { 0x16AE7, 0x0014, NES_SCRIPT }, { 0x16AFB, 0x001C, NES_SCRIPT }, { 0x16B17, 0x0027, NES_SCRIPT }, + { 0x16B3E, 0x01AA, NES_SCRIPT }, { 0x1D150, 0x0096, NES_SCRIPT }, { 0x1D1E6, 0x010E, NES_SCRIPT }, { 0x1D2F4, 0x001C, NES_SCRIPT }, { 0x1D310, 0x0056, NES_SCRIPT }, + { 0x1D366, 0x0072, NES_SCRIPT }, { 0x1E401, 0x0028, NES_SCRIPT }, { 0x1E429, 0x017D, NES_SCRIPT }, { 0x1E5A6, 0x0229, NES_SCRIPT }, { 0x28932, 0x0071, NES_SCRIPT }, + { 0x13EC6, 0x004D, NES_SCRIPT }, { 0x162ED, 0x0039, NES_SCRIPT }, { 0x178DF, 0x028B, NES_SCRIPT }, { 0x17B6A, 0x00BB, NES_SCRIPT }, { 0x17C25, 0x018B, NES_SCRIPT }, + { 0x00000, 0x0000, NES_SCRIPT }, { 0x19FE3, 0x00ED, NES_SCRIPT }, { 0x21C90, 0x00F6, NES_SCRIPT }, { 0x1E7CF, 0x009B, NES_SCRIPT }, { 0x21D86, 0x0047, NES_SCRIPT }, + { 0x2C6C4, 0x004D, NES_SCRIPT }, { 0x16326, 0x0024, NES_SCRIPT }, { 0x14D0D, 0x0014, NES_SCRIPT }, { 0x18AE7, 0x0059, NES_SCRIPT }, { 0x18B40, 0x011E, NES_SCRIPT }, + { 0x18C5E, 0x0009, NES_SCRIPT }, { 0x14D21, 0x01B6, NES_SCRIPT }, { 0x2B108, 0x0243, NES_SCRIPT }, { 0x230C9, 0x067F, NES_SCRIPT }, { 0x2C711, 0x001C, NES_SCRIPT }, + { 0x2C72D, 0x001A, NES_SCRIPT }, { 0x2C747, 0x0021, NES_SCRIPT }, { 0x2C768, 0x0024, NES_SCRIPT }, { 0x2C78C, 0x0017, NES_SCRIPT }, { 0x2C7A3, 0x0017, NES_SCRIPT }, + { 0x2C7BA, 0x0014, NES_SCRIPT }, { 0x2C7CE, 0x0024, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, { 0x2C7F2, 0x0011, NES_SCRIPT }, { 0x18C67, 0x009D, NES_SCRIPT }, + { 0x2275A, 0x0066, NES_SCRIPT }, { 0x14ED7, 0x0075, NES_SCRIPT }, { 0x1F28D, 0x0120, NES_SCRIPT }, { 0x1FCD6, 0x001D, NES_SCRIPT }, { 0x1F3AD, 0x008F, NES_SCRIPT }, + { 0x1F43C, 0x0097, NES_SCRIPT }, { 0x18D04, 0x006A, NES_SCRIPT }, { 0x18D6E, 0x0030, NES_SCRIPT }, { 0x1F4D3, 0x0092, NES_SCRIPT }, { 0x2C803, 0x00CC, NES_SCRIPT }, + { 0x2C8CF, 0x00BA, NES_SCRIPT }, { 0x2C989, 0x0088, NES_SCRIPT }, { 0x20A09, 0x01B0, NES_SCRIPT }, { 0x20BB9, 0x0168, NES_SCRIPT }, { 0x20D21, 0x006C, NES_SCRIPT }, + { 0x20D8D, 0x0037, NES_SCRIPT }, { 0x20DC4, 0x00E4, NES_SCRIPT }, { 0x20EA8, 0x0045, NES_SCRIPT }, { 0x20EED, 0x00E1, NES_SCRIPT }, { 0x20FCE, 0x00F6, NES_SCRIPT }, + { 0x210C4, 0x0141, NES_SCRIPT }, { 0x21205, 0x0183, NES_SCRIPT }, { 0x21388, 0x0034, NES_SCRIPT }, { 0x213BC, 0x00A9, NES_SCRIPT }, { 0x24367, 0x011B, NES_SCRIPT }, + { 0x1BDC2, 0x0070, NES_SCRIPT }, { 0x1CBF9, 0x0091, NES_SCRIPT }, { 0x29372, 0x0054, NES_SCRIPT }, { 0x1A0D0, 0x00CE, NES_SCRIPT }, { 0x1A19E, 0x0077, NES_SCRIPT }, + { 0x14F4C, 0x0057, NES_SCRIPT }, { 0x2790A, 0x02DF, NES_SCRIPT }, { 0x1D9AB, 0x0219, NES_SCRIPT }, { 0x1DBC4, 0x00F9, NES_SCRIPT }, { 0x1DCBD, 0x0056, NES_SCRIPT }, + { 0x1DD13, 0x01C2, NES_SCRIPT }, { 0x14FA3, 0x004D, NES_SCRIPT }, { 0x27618, 0x00D9, NES_SCRIPT }, { 0x21DCD, 0x0013, NES_SCRIPT }, { 0x2A64F, 0x00F0, NES_SCRIPT }, + { 0x24482, 0x00E7, NES_SCRIPT }, { 0x21465, 0x00F2, NES_SCRIPT }, { 0x24569, 0x002B, NES_SCRIPT }, { 0x2C3CF, 0x010F, NES_SCRIPT }, { 0x24594, 0x00AA, NES_SCRIPT }, + { 0x250B2, 0x0DAB, NES_SCRIPT }, { 0x1B6F4, 0x000D, NES_SCRIPT }, { 0x1B701, 0x000D, NES_SCRIPT }, { 0x23748, 0x017C, NES_SCRIPT }, { 0x282F5, 0x01E1, NES_SCRIPT }, + { 0x238C4, 0x0153, NES_SCRIPT }, { 0x23A17, 0x019C, NES_SCRIPT }, { 0x23BB3, 0x0016, NES_SCRIPT }, { 0x2C4DE, 0x005C, NES_SCRIPT }, { 0x23BC9, 0x0020, NES_SCRIPT }, + { 0x27DEA, 0x00A5, NES_SCRIPT }, { 0x2A73F, 0x034D, NES_SCRIPT }, { 0x14FF0, 0x00E3, NES_SCRIPT }, { 0x2BACE, 0x005F, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, + { 0x25E5D, 0x003C, NES_SCRIPT }, { 0x1E86A, 0x0011, NES_SCRIPT }, { 0x1634A, 0x0018, NES_SCRIPT }, { 0x26E81, 0x001F, NES_SCRIPT }, { 0x26EA0, 0x0054, NES_SCRIPT }, + { 0x26EF4, 0x0149, NES_SCRIPT }, { 0x2703D, 0x004B, NES_SCRIPT }, { 0x27088, 0x017D, NES_SCRIPT }, { 0x27205, 0x0027, NES_SCRIPT }, { 0x2722C, 0x0041, NES_SCRIPT }, + { 0x2726D, 0x01B1, NES_SCRIPT }, { 0x16362, 0x001F, NES_SCRIPT }, { 0x2463E, 0x002A, NES_SCRIPT }, { 0x150D3, 0x019E, NES_SCRIPT }, { 0x194A8, 0x0031, NES_SCRIPT }, + { 0x18D9E, 0x007C, NES_SCRIPT }, { 0x21557, 0x00DC, NES_SCRIPT }, { 0x1D3D8, 0x0018, NES_SCRIPT }, { 0x1D3F0, 0x0053, NES_SCRIPT }, { 0x17DB0, 0x0005, NES_SCRIPT }, + { 0x15271, 0x011B, NES_SCRIPT }, { 0x1538C, 0x000B, NES_SCRIPT }, { 0x24668, 0x0138, NES_SCRIPT }, { 0x247A0, 0x0014, NES_SCRIPT }, { 0x1DED5, 0x0018, NES_SCRIPT }, + { 0x247B4, 0x0027, NES_SCRIPT }, { 0x1A215, 0x004D, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, { 0x2BB2D, 0x00A5, NES_SCRIPT }, { 0x2AA8C, 0x00C1, NES_SCRIPT }, + { 0x2AB4D, 0x0140, NES_SCRIPT }, { 0x19982, 0x00BF, NES_SCRIPT }, { 0x19A41, 0x014D, NES_SCRIPT }, { 0x19B8E, 0x0012, NES_SCRIPT }, { 0x2AC8D, 0x0005, NES_SCRIPT }, + { 0x2AC92, 0x0005, NES_SCRIPT }, { 0x2AC97, 0x0005, NES_SCRIPT }, { 0x2AC9C, 0x0005, NES_SCRIPT }, { 0x2ACA1, 0x0005, NES_SCRIPT }, { 0x21633, 0x0033, NES_SCRIPT }, + { 0x2ACA6, 0x0005, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, { 0x2ACAB, 0x009C, NES_SCRIPT }, { 0x2AD47, 0x009C, NES_SCRIPT } +}; +static const ScummNESFile::Resource res_scripts_swe[179] = { + { 0x00000, 0x0000, NES_SCRIPT }, { 0x28F80, 0x043B, NES_SCRIPT }, { 0x293BB, 0x0209, NES_SCRIPT }, { 0x295C4, 0x00AB, NES_SCRIPT }, { 0x2966F, 0x03FD, NES_SCRIPT }, + { 0x29A6C, 0x01A1, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, { 0x29C0D, 0x005C, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, { 0x29C69, 0x0005, NES_SCRIPT }, + { 0x2B980, 0x000D, NES_SCRIPT }, { 0x2B98D, 0x000D, NES_SCRIPT }, { 0x186C8, 0x0040, NES_SCRIPT }, { 0x18708, 0x0016, NES_SCRIPT }, { 0x1B4B1, 0x0046, NES_SCRIPT }, + { 0x1EEBB, 0x00B8, NES_SCRIPT }, { 0x21CFA, 0x005C, NES_SCRIPT }, { 0x17537, 0x0027, NES_SCRIPT }, { 0x1FD0A, 0x0027, NES_SCRIPT }, { 0x1FD31, 0x0027, NES_SCRIPT }, + { 0x1BBB5, 0x0022, NES_SCRIPT }, { 0x15BC0, 0x0085, NES_SCRIPT }, { 0x22324, 0x001E, NES_SCRIPT }, { 0x22342, 0x008F, NES_SCRIPT }, { 0x19252, 0x002B, NES_SCRIPT }, + { 0x1CB1B, 0x006D, NES_SCRIPT }, { 0x1CB88, 0x004C, NES_SCRIPT }, { 0x1CBD4, 0x0044, NES_SCRIPT }, { 0x1CC18, 0x0053, NES_SCRIPT }, { 0x2049D, 0x0081, NES_SCRIPT }, + { 0x1634C, 0x0035, NES_SCRIPT }, { 0x16381, 0x001C, NES_SCRIPT }, { 0x1639D, 0x0014, NES_SCRIPT }, { 0x163B1, 0x001C, NES_SCRIPT }, { 0x163CD, 0x0027, NES_SCRIPT }, + { 0x163F4, 0x019B, NES_SCRIPT }, { 0x1D183, 0x0094, NES_SCRIPT }, { 0x1D217, 0x0117, NES_SCRIPT }, { 0x1D32E, 0x001C, NES_SCRIPT }, { 0x1D34A, 0x0056, NES_SCRIPT }, + { 0x1D3A0, 0x0072, NES_SCRIPT }, { 0x1E47F, 0x0028, NES_SCRIPT }, { 0x1E4A7, 0x0175, NES_SCRIPT }, { 0x1E61C, 0x022B, NES_SCRIPT }, { 0x27C85, 0x0071, NES_SCRIPT }, + { 0x17C86, 0x004A, NES_SCRIPT }, { 0x13DD6, 0x0039, NES_SCRIPT }, { 0x1871E, 0x0270, NES_SCRIPT }, { 0x1898E, 0x00C0, NES_SCRIPT }, { 0x18A4E, 0x01B6, NES_SCRIPT }, + { 0x00000, 0x0000, NES_SCRIPT }, { 0x19DC9, 0x00EE, NES_SCRIPT }, { 0x21D56, 0x00F5, NES_SCRIPT }, { 0x1E847, 0x0094, NES_SCRIPT }, { 0x21E4B, 0x0047, NES_SCRIPT }, + { 0x2B99A, 0x004D, NES_SCRIPT }, { 0x13E0F, 0x0024, NES_SCRIPT }, { 0x14D13, 0x0014, NES_SCRIPT }, { 0x1755E, 0x0054, NES_SCRIPT }, { 0x175B2, 0x011A, NES_SCRIPT }, + { 0x176CC, 0x0009, NES_SCRIPT }, { 0x14D27, 0x01B9, NES_SCRIPT }, { 0x2AA0E, 0x0256, NES_SCRIPT }, { 0x231A4, 0x06D2, NES_SCRIPT }, { 0x2B9E7, 0x001D, NES_SCRIPT }, + { 0x2BA04, 0x0016, NES_SCRIPT }, { 0x2BA1A, 0x002D, NES_SCRIPT }, { 0x2BA47, 0x0027, NES_SCRIPT }, { 0x2BA6E, 0x0016, NES_SCRIPT }, { 0x2BA84, 0x0014, NES_SCRIPT }, + { 0x2BA98, 0x0015, NES_SCRIPT }, { 0x2BAAD, 0x0029, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, { 0x2BAD6, 0x0010, NES_SCRIPT }, { 0x176D5, 0x00A2, NES_SCRIPT }, + { 0x22831, 0x0066, NES_SCRIPT }, { 0x14EE0, 0x0077, NES_SCRIPT }, { 0x1F30B, 0x011A, NES_SCRIPT }, { 0x1FD58, 0x001D, NES_SCRIPT }, { 0x1F425, 0x0095, NES_SCRIPT }, + { 0x1F4BA, 0x009E, NES_SCRIPT }, { 0x17777, 0x006F, NES_SCRIPT }, { 0x177E6, 0x002F, NES_SCRIPT }, { 0x1F558, 0x0098, NES_SCRIPT }, { 0x2BAE6, 0x00C4, NES_SCRIPT }, + { 0x2BBAA, 0x00AE, NES_SCRIPT }, { 0x2BC58, 0x0088, NES_SCRIPT }, { 0x20A3C, 0x01BB, NES_SCRIPT }, { 0x20BF7, 0x0197, NES_SCRIPT }, { 0x20D8E, 0x006E, NES_SCRIPT }, + { 0x20DFC, 0x0028, NES_SCRIPT }, { 0x20E24, 0x00EA, NES_SCRIPT }, { 0x20F0E, 0x0049, NES_SCRIPT }, { 0x20F57, 0x00E7, NES_SCRIPT }, { 0x2103E, 0x010C, NES_SCRIPT }, + { 0x2114A, 0x0151, NES_SCRIPT }, { 0x2129B, 0x01B0, NES_SCRIPT }, { 0x2144B, 0x0034, NES_SCRIPT }, { 0x2147F, 0x00A9, NES_SCRIPT }, { 0x24379, 0x010E, NES_SCRIPT }, + { 0x1BBD7, 0x0072, NES_SCRIPT }, { 0x1CC6B, 0x0092, NES_SCRIPT }, { 0x2898B, 0x0054, NES_SCRIPT }, { 0x19EB7, 0x00D3, NES_SCRIPT }, { 0x19F8A, 0x0077, NES_SCRIPT }, + { 0x14F57, 0x0057, NES_SCRIPT }, { 0x2703E, 0x0307, NES_SCRIPT }, { 0x1D9FB, 0x024F, NES_SCRIPT }, { 0x1DC4A, 0x00E4, NES_SCRIPT }, { 0x1DD2E, 0x0059, NES_SCRIPT }, + { 0x1DD87, 0x01C2, NES_SCRIPT }, { 0x14FAE, 0x004D, NES_SCRIPT }, { 0x26D52, 0x00D5, NES_SCRIPT }, { 0x21E92, 0x0013, NES_SCRIPT }, { 0x29C6E, 0x00F0, NES_SCRIPT }, + { 0x24487, 0x00E0, NES_SCRIPT }, { 0x21528, 0x00F2, NES_SCRIPT }, { 0x24567, 0x0023, NES_SCRIPT }, { 0x2B6B2, 0x010B, NES_SCRIPT }, { 0x2458A, 0x00A1, NES_SCRIPT }, + { 0x250A0, 0x018B, NES_SCRIPT }, { 0x1B4F7, 0x000D, NES_SCRIPT }, { 0x1B504, 0x000D, NES_SCRIPT }, { 0x23876, 0x018E, NES_SCRIPT }, { 0x27639, 0x01F0, NES_SCRIPT }, + { 0x23A04, 0x017B, NES_SCRIPT }, { 0x23B7F, 0x01AC, NES_SCRIPT }, { 0x23D2B, 0x0016, NES_SCRIPT }, { 0x2B7BD, 0x005B, NES_SCRIPT }, { 0x23D41, 0x0020, NES_SCRIPT }, + { 0x2A643, 0x00A6, NES_SCRIPT }, { 0x29D5E, 0x0399, NES_SCRIPT }, { 0x14FFB, 0x00D2, NES_SCRIPT }, { 0x2B1DE, 0x0063, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, + { 0x2522B, 0x003C, NES_SCRIPT }, { 0x1E8DB, 0x0011, NES_SCRIPT }, { 0x13E33, 0x0018, NES_SCRIPT }, { 0x26585, 0x001F, NES_SCRIPT }, { 0x265A4, 0x0054, NES_SCRIPT }, + { 0x265F8, 0x017D, NES_SCRIPT }, { 0x26775, 0x004B, NES_SCRIPT }, { 0x267C0, 0x0165, NES_SCRIPT }, { 0x26925, 0x0027, NES_SCRIPT }, { 0x2694C, 0x0041, NES_SCRIPT }, + { 0x2698D, 0x01CB, NES_SCRIPT }, { 0x13E4B, 0x001F, NES_SCRIPT }, { 0x2462B, 0x002A, NES_SCRIPT }, { 0x150CD, 0x0187, NES_SCRIPT }, { 0x1927D, 0x0031, NES_SCRIPT }, + { 0x17815, 0x0087, NES_SCRIPT }, { 0x2161A, 0x00D8, NES_SCRIPT }, { 0x1D412, 0x0018, NES_SCRIPT }, { 0x1D42A, 0x0058, NES_SCRIPT }, { 0x18C04, 0x0005, NES_SCRIPT }, + { 0x15254, 0x0108, NES_SCRIPT }, { 0x1535C, 0x000B, NES_SCRIPT }, { 0x24655, 0x0139, NES_SCRIPT }, { 0x2478E, 0x0014, NES_SCRIPT }, { 0x1DF49, 0x0018, NES_SCRIPT }, + { 0x247A2, 0x0027, NES_SCRIPT }, { 0x1A001, 0x004C, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, { 0x2B241, 0x00A5, NES_SCRIPT }, { 0x2A0F7, 0x00B5, NES_SCRIPT }, + { 0x2A1AC, 0x0140, NES_SCRIPT }, { 0x19759, 0x00CA, NES_SCRIPT }, { 0x19823, 0x014D, NES_SCRIPT }, { 0x19970, 0x0012, NES_SCRIPT }, { 0x2A2EC, 0x0005, NES_SCRIPT }, + { 0x2A2F1, 0x0005, NES_SCRIPT }, { 0x2A2F6, 0x0005, NES_SCRIPT }, { 0x2A2FB, 0x0005, NES_SCRIPT }, { 0x2A300, 0x0005, NES_SCRIPT }, { 0x216F2, 0x0033, NES_SCRIPT }, + { 0x2A305, 0x0005, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, { 0x2A30A, 0x009C, NES_SCRIPT }, { 0x2A3A6, 0x009C, NES_SCRIPT } +}; +static const ScummNESFile::Resource res_scripts_fra[179] = { + { 0x00000, 0x0000, NES_SCRIPT }, { 0x2947D, 0x0480, NES_SCRIPT }, { 0x298FD, 0x0226, NES_SCRIPT }, { 0x29B23, 0x0092, NES_SCRIPT }, { 0x29BB5, 0x040C, NES_SCRIPT }, + { 0x29FC1, 0x01A1, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, { 0x2A162, 0x005C, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, { 0x2A1BE, 0x0005, NES_SCRIPT }, + { 0x2C169, 0x000D, NES_SCRIPT }, { 0x2C176, 0x000D, NES_SCRIPT }, { 0x186E3, 0x0040, NES_SCRIPT }, { 0x18723, 0x0016, NES_SCRIPT }, { 0x1B59F, 0x0046, NES_SCRIPT }, + { 0x1EFD7, 0x00CB, NES_SCRIPT }, { 0x21D09, 0x0054, NES_SCRIPT }, { 0x176C8, 0x0027, NES_SCRIPT }, { 0x1FE6A, 0x0027, NES_SCRIPT }, { 0x1FE91, 0x0027, NES_SCRIPT }, + { 0x1BC9A, 0x0022, NES_SCRIPT }, { 0x15CD6, 0x0092, NES_SCRIPT }, { 0x22336, 0x001C, NES_SCRIPT }, { 0x22352, 0x008F, NES_SCRIPT }, { 0x192A5, 0x002B, NES_SCRIPT }, + { 0x1CAAA, 0x0069, NES_SCRIPT }, { 0x1CB13, 0x0054, NES_SCRIPT }, { 0x1CB67, 0x0048, NES_SCRIPT }, { 0x1CBAF, 0x0058, NES_SCRIPT }, { 0x204B6, 0x0078, NES_SCRIPT }, + { 0x16471, 0x0035, NES_SCRIPT }, { 0x164A6, 0x001C, NES_SCRIPT }, { 0x164C2, 0x0014, NES_SCRIPT }, { 0x164D6, 0x001C, NES_SCRIPT }, { 0x164F2, 0x0027, NES_SCRIPT }, + { 0x16519, 0x01BB, NES_SCRIPT }, { 0x1D135, 0x008D, NES_SCRIPT }, { 0x1D1C2, 0x0119, NES_SCRIPT }, { 0x1D2DB, 0x001C, NES_SCRIPT }, { 0x1D2F7, 0x0056, NES_SCRIPT }, + { 0x1D34D, 0x0072, NES_SCRIPT }, { 0x1E4BF, 0x0028, NES_SCRIPT }, { 0x1E4E7, 0x01E0, NES_SCRIPT }, { 0x1E6C7, 0x0241, NES_SCRIPT }, { 0x2845D, 0x0071, NES_SCRIPT }, + { 0x17E48, 0x004C, NES_SCRIPT }, { 0x13DE3, 0x0039, NES_SCRIPT }, { 0x18739, 0x0296, NES_SCRIPT }, { 0x189CF, 0x00C2, NES_SCRIPT }, { 0x18A91, 0x01A5, NES_SCRIPT }, + { 0x00000, 0x0000, NES_SCRIPT }, { 0x19E13, 0x00F3, NES_SCRIPT }, { 0x21D5D, 0x00F6, NES_SCRIPT }, { 0x1E908, 0x00B8, NES_SCRIPT }, { 0x21E53, 0x0047, NES_SCRIPT }, + { 0x2C183, 0x004D, NES_SCRIPT }, { 0x13E1C, 0x0024, NES_SCRIPT }, { 0x14D77, 0x0014, NES_SCRIPT }, { 0x176EF, 0x0059, NES_SCRIPT }, { 0x17748, 0x013F, NES_SCRIPT }, + { 0x17887, 0x0009, NES_SCRIPT }, { 0x14D8B, 0x01D4, NES_SCRIPT }, { 0x2ACFB, 0x028D, NES_SCRIPT }, { 0x23203, 0x0779, NES_SCRIPT }, { 0x2C1D0, 0x001B, NES_SCRIPT }, + { 0x2C1EB, 0x001F, NES_SCRIPT }, { 0x2C20A, 0x0024, NES_SCRIPT }, { 0x2C22E, 0x0019, NES_SCRIPT }, { 0x2C247, 0x0018, NES_SCRIPT }, { 0x2C25F, 0x001D, NES_SCRIPT }, + { 0x2C27C, 0x0016, NES_SCRIPT }, { 0x2C292, 0x0027, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, { 0x2C2B9, 0x0011, NES_SCRIPT }, { 0x17890, 0x00AA, NES_SCRIPT }, + { 0x22846, 0x0066, NES_SCRIPT }, { 0x14F5F, 0x0083, NES_SCRIPT }, { 0x1F43C, 0x013A, NES_SCRIPT }, { 0x1FEB8, 0x001D, NES_SCRIPT }, { 0x1F576, 0x0098, NES_SCRIPT }, + { 0x1F60E, 0x009B, NES_SCRIPT }, { 0x1793A, 0x006E, NES_SCRIPT }, { 0x179A8, 0x0033, NES_SCRIPT }, { 0x1F6A9, 0x00A5, NES_SCRIPT }, { 0x2C2CA, 0x00BA, NES_SCRIPT }, + { 0x2C384, 0x00AC, NES_SCRIPT }, { 0x2C430, 0x008F, NES_SCRIPT }, { 0x20A2D, 0x01BE, NES_SCRIPT }, { 0x20BEB, 0x0158, NES_SCRIPT }, { 0x20D43, 0x0079, NES_SCRIPT }, + { 0x20DBC, 0x002B, NES_SCRIPT }, { 0x20DE7, 0x00E8, NES_SCRIPT }, { 0x20ECF, 0x004A, NES_SCRIPT }, { 0x20F19, 0x0110, NES_SCRIPT }, { 0x21029, 0x0136, NES_SCRIPT }, + { 0x2115F, 0x0152, NES_SCRIPT }, { 0x212B1, 0x01B3, NES_SCRIPT }, { 0x21464, 0x0032, NES_SCRIPT }, { 0x21496, 0x00A9, NES_SCRIPT }, { 0x2437F, 0x0133, NES_SCRIPT }, + { 0x1BCBC, 0x0074, NES_SCRIPT }, { 0x1CC07, 0x0090, NES_SCRIPT }, { 0x28E43, 0x0054, NES_SCRIPT }, { 0x19F06, 0x00DB, NES_SCRIPT }, { 0x19FE1, 0x0080, NES_SCRIPT }, + { 0x14FE2, 0x0057, NES_SCRIPT }, { 0x273F4, 0x031F, NES_SCRIPT }, { 0x1D9D4, 0x0238, NES_SCRIPT }, { 0x1DC0C, 0x00FE, NES_SCRIPT }, { 0x1DD0A, 0x005A, NES_SCRIPT }, + { 0x1DD64, 0x01F5, NES_SCRIPT }, { 0x15039, 0x004D, NES_SCRIPT }, { 0x270DD, 0x0100, NES_SCRIPT }, { 0x21E9A, 0x0013, NES_SCRIPT }, { 0x2A1C3, 0x00F0, NES_SCRIPT }, + { 0x244B2, 0x00E4, NES_SCRIPT }, { 0x2153F, 0x00EC, NES_SCRIPT }, { 0x24596, 0x0033, NES_SCRIPT }, { 0x2BC04, 0x0108, NES_SCRIPT }, { 0x245C9, 0x009F, NES_SCRIPT }, + { 0x250F1, 0x0193, NES_SCRIPT }, { 0x1B5E5, 0x000D, NES_SCRIPT }, { 0x1B5F2, 0x000D, NES_SCRIPT }, { 0x2397C, 0x0199, NES_SCRIPT }, { 0x27A07, 0x0233, NES_SCRIPT }, + { 0x23B15, 0x0171, NES_SCRIPT }, { 0x23C86, 0x01BC, NES_SCRIPT }, { 0x23E42, 0x0016, NES_SCRIPT }, { 0x2BD0C, 0x005B, NES_SCRIPT }, { 0x23E58, 0x0020, NES_SCRIPT }, + { 0x27E3B, 0x00B9, NES_SCRIPT }, { 0x2A2B3, 0x03D3, NES_SCRIPT }, { 0x15086, 0x00E4, NES_SCRIPT }, { 0x2B70C, 0x0067, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, + { 0x25284, 0x003C, NES_SCRIPT }, { 0x1E9C0, 0x0011, NES_SCRIPT }, { 0x13E40, 0x0018, NES_SCRIPT }, { 0x26621, 0x001F, NES_SCRIPT }, { 0x26640, 0x0054, NES_SCRIPT }, + { 0x26694, 0x0173, NES_SCRIPT }, { 0x26807, 0x004B, NES_SCRIPT }, { 0x26852, 0x0190, NES_SCRIPT }, { 0x269E2, 0x0027, NES_SCRIPT }, { 0x26A09, 0x0041, NES_SCRIPT }, + { 0x26A4A, 0x024E, NES_SCRIPT }, { 0x13E58, 0x001F, NES_SCRIPT }, { 0x24668, 0x002A, NES_SCRIPT }, { 0x1516A, 0x01C9, NES_SCRIPT }, { 0x192D0, 0x0031, NES_SCRIPT }, + { 0x179DB, 0x0088, NES_SCRIPT }, { 0x2162B, 0x00D0, NES_SCRIPT }, { 0x1D3BF, 0x0018, NES_SCRIPT }, { 0x1D3D7, 0x0055, NES_SCRIPT }, { 0x18C36, 0x0005, NES_SCRIPT }, + { 0x15333, 0x0113, NES_SCRIPT }, { 0x15446, 0x000B, NES_SCRIPT }, { 0x24692, 0x014D, NES_SCRIPT }, { 0x247DF, 0x0014, NES_SCRIPT }, { 0x1DF59, 0x0018, NES_SCRIPT }, + { 0x247F3, 0x0027, NES_SCRIPT }, { 0x1A061, 0x0050, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, { 0x2B773, 0x00A5, NES_SCRIPT }, { 0x2A686, 0x00BA, NES_SCRIPT }, + { 0x2A740, 0x0140, NES_SCRIPT }, { 0x1979F, 0x00CA, NES_SCRIPT }, { 0x19869, 0x014D, NES_SCRIPT }, { 0x199B6, 0x0012, NES_SCRIPT }, { 0x2A880, 0x0005, NES_SCRIPT }, + { 0x2A885, 0x0005, NES_SCRIPT }, { 0x2A88A, 0x0005, NES_SCRIPT }, { 0x2A88F, 0x0005, NES_SCRIPT }, { 0x2A894, 0x0005, NES_SCRIPT }, { 0x216FB, 0x0033, NES_SCRIPT }, + { 0x2A899, 0x0005, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, { 0x2A89E, 0x009C, NES_SCRIPT }, { 0x2A93A, 0x009C, NES_SCRIPT } +}; +static const ScummNESFile::Resource res_scripts_ger[179] = { + { 0x00000, 0x0000, NES_SCRIPT }, { 0x295B0, 0x045A, NES_SCRIPT }, { 0x29A0A, 0x0218, NES_SCRIPT }, { 0x29C22, 0x00B1, NES_SCRIPT }, { 0x29CD3, 0x0408, NES_SCRIPT }, + { 0x2A0DB, 0x01A1, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, { 0x2A27C, 0x005C, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, { 0x2A2D8, 0x0005, NES_SCRIPT }, + { 0x2C169, 0x000D, NES_SCRIPT }, { 0x2C176, 0x000D, NES_SCRIPT }, { 0x186DB, 0x0040, NES_SCRIPT }, { 0x1871B, 0x0016, NES_SCRIPT }, { 0x1B5C2, 0x0046, NES_SCRIPT }, + { 0x1EFB7, 0x00E3, NES_SCRIPT }, { 0x21D9D, 0x0069, NES_SCRIPT }, { 0x174F1, 0x0027, NES_SCRIPT }, { 0x1FE92, 0x0027, NES_SCRIPT }, { 0x1FEB9, 0x0027, NES_SCRIPT }, + { 0x1BCE5, 0x0022, NES_SCRIPT }, { 0x13EF4, 0x0087, NES_SCRIPT }, { 0x223EC, 0x001F, NES_SCRIPT }, { 0x2240B, 0x008F, NES_SCRIPT }, { 0x192CC, 0x002B, NES_SCRIPT }, + { 0x1CB08, 0x006E, NES_SCRIPT }, { 0x1CB76, 0x004E, NES_SCRIPT }, { 0x1CBC4, 0x004D, NES_SCRIPT }, { 0x1CC11, 0x0059, NES_SCRIPT }, { 0x204AA, 0x0080, NES_SCRIPT }, + { 0x1628E, 0x0035, NES_SCRIPT }, { 0x162C3, 0x001C, NES_SCRIPT }, { 0x162DF, 0x0014, NES_SCRIPT }, { 0x162F3, 0x001C, NES_SCRIPT }, { 0x1630F, 0x0027, NES_SCRIPT }, + { 0x16336, 0x01D1, NES_SCRIPT }, { 0x1D199, 0x00A0, NES_SCRIPT }, { 0x1D239, 0x011C, NES_SCRIPT }, { 0x1D355, 0x001C, NES_SCRIPT }, { 0x1D371, 0x0056, NES_SCRIPT }, + { 0x1D3C7, 0x0072, NES_SCRIPT }, { 0x1E4FA, 0x0028, NES_SCRIPT }, { 0x1E522, 0x019D, NES_SCRIPT }, { 0x1E6BF, 0x023B, NES_SCRIPT }, { 0x2845D, 0x0071, NES_SCRIPT }, + { 0x17C50, 0x0052, NES_SCRIPT }, { 0x15AC9, 0x0039, NES_SCRIPT }, { 0x18731, 0x02E7, NES_SCRIPT }, { 0x18A18, 0x00BC, NES_SCRIPT }, { 0x18AD4, 0x01A2, NES_SCRIPT }, + { 0x00000, 0x0000, NES_SCRIPT }, { 0x19E45, 0x00F8, NES_SCRIPT }, { 0x21E06, 0x00F7, NES_SCRIPT }, { 0x1E8FA, 0x00B5, NES_SCRIPT }, { 0x21EFD, 0x0047, NES_SCRIPT }, + { 0x2C183, 0x004D, NES_SCRIPT }, { 0x15B02, 0x0024, NES_SCRIPT }, { 0x14D64, 0x0014, NES_SCRIPT }, { 0x17518, 0x005E, NES_SCRIPT }, { 0x17576, 0x0125, NES_SCRIPT }, + { 0x1769B, 0x0009, NES_SCRIPT }, { 0x14D78, 0x01C7, NES_SCRIPT }, { 0x2ADCE, 0x0263, NES_SCRIPT }, { 0x232AF, 0x077F, NES_SCRIPT }, { 0x2C1D0, 0x001E, NES_SCRIPT }, + { 0x2C1EE, 0x0024, NES_SCRIPT }, { 0x2C212, 0x002E, NES_SCRIPT }, { 0x2C240, 0x0022, NES_SCRIPT }, { 0x2C262, 0x0013, NES_SCRIPT }, { 0x2C275, 0x001E, NES_SCRIPT }, + { 0x2C293, 0x0016, NES_SCRIPT }, { 0x2C2A9, 0x0027, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, { 0x2C2D0, 0x0012, NES_SCRIPT }, { 0x176A4, 0x00A4, NES_SCRIPT }, + { 0x228F8, 0x0066, NES_SCRIPT }, { 0x14F3F, 0x007F, NES_SCRIPT }, { 0x1F428, 0x013A, NES_SCRIPT }, { 0x1FEE0, 0x001D, NES_SCRIPT }, { 0x1F562, 0x00A0, NES_SCRIPT }, + { 0x1F602, 0x00A4, NES_SCRIPT }, { 0x17748, 0x0076, NES_SCRIPT }, { 0x177BE, 0x0036, NES_SCRIPT }, { 0x1F6A6, 0x00B9, NES_SCRIPT }, { 0x2C2E2, 0x00CB, NES_SCRIPT }, + { 0x2C3AD, 0x00B7, NES_SCRIPT }, { 0x2C464, 0x008A, NES_SCRIPT }, { 0x20A58, 0x01BD, NES_SCRIPT }, { 0x20C15, 0x0181, NES_SCRIPT }, { 0x20D96, 0x0078, NES_SCRIPT }, + { 0x20E0E, 0x003C, NES_SCRIPT }, { 0x20E4A, 0x00E9, NES_SCRIPT }, { 0x20F33, 0x0046, NES_SCRIPT }, { 0x20F79, 0x00F6, NES_SCRIPT }, { 0x2106F, 0x0118, NES_SCRIPT }, + { 0x21187, 0x015B, NES_SCRIPT }, { 0x212E2, 0x01AC, NES_SCRIPT }, { 0x2148E, 0x003F, NES_SCRIPT }, { 0x214CD, 0x00A9, NES_SCRIPT }, { 0x2436F, 0x0126, NES_SCRIPT }, + { 0x1BD07, 0x0075, NES_SCRIPT }, { 0x1CC6A, 0x009B, NES_SCRIPT }, { 0x28F5D, 0x0054, NES_SCRIPT }, { 0x19F3D, 0x00E1, NES_SCRIPT }, { 0x1A01E, 0x0086, NES_SCRIPT }, + { 0x14FBE, 0x0057, NES_SCRIPT }, { 0x27326, 0x033D, NES_SCRIPT }, { 0x1DA51, 0x023B, NES_SCRIPT }, { 0x1DC8C, 0x00FB, NES_SCRIPT }, { 0x1DD87, 0x0056, NES_SCRIPT }, + { 0x1DDDD, 0x01E1, NES_SCRIPT }, { 0x15015, 0x004D, NES_SCRIPT }, { 0x27027, 0x00E8, NES_SCRIPT }, { 0x21F44, 0x0013, NES_SCRIPT }, { 0x2A2DD, 0x00F0, NES_SCRIPT }, + { 0x24495, 0x00F8, NES_SCRIPT }, { 0x21576, 0x00F9, NES_SCRIPT }, { 0x2458D, 0x002B, NES_SCRIPT }, { 0x2BAA4, 0x010F, NES_SCRIPT }, { 0x245B8, 0x00A5, NES_SCRIPT }, + { 0x250D0, 0x019C, NES_SCRIPT }, { 0x1B608, 0x000D, NES_SCRIPT }, { 0x1B615, 0x000D, NES_SCRIPT }, { 0x23A2E, 0x0185, NES_SCRIPT }, { 0x27957, 0x0212, NES_SCRIPT }, + { 0x23BB3, 0x0158, NES_SCRIPT }, { 0x23D0B, 0x01C4, NES_SCRIPT }, { 0x23ECF, 0x0016, NES_SCRIPT }, { 0x2BBB3, 0x005A, NES_SCRIPT }, { 0x23EE5, 0x0020, NES_SCRIPT }, + { 0x27D6A, 0x00A7, NES_SCRIPT }, { 0x2A3CD, 0x038C, NES_SCRIPT }, { 0x15062, 0x00F6, NES_SCRIPT }, { 0x2B5B2, 0x007B, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, + { 0x2526C, 0x003C, NES_SCRIPT }, { 0x1E9AF, 0x0011, NES_SCRIPT }, { 0x15B26, 0x0018, NES_SCRIPT }, { 0x265F5, 0x001F, NES_SCRIPT }, { 0x26614, 0x0054, NES_SCRIPT }, + { 0x26668, 0x018E, NES_SCRIPT }, { 0x267F6, 0x004B, NES_SCRIPT }, { 0x26841, 0x0196, NES_SCRIPT }, { 0x269D7, 0x0027, NES_SCRIPT }, { 0x269FE, 0x0041, NES_SCRIPT }, + { 0x26A3F, 0x01A3, NES_SCRIPT }, { 0x15B3E, 0x001F, NES_SCRIPT }, { 0x2465D, 0x002A, NES_SCRIPT }, { 0x15158, 0x0198, NES_SCRIPT }, { 0x192F7, 0x0031, NES_SCRIPT }, + { 0x177F4, 0x008C, NES_SCRIPT }, { 0x2166F, 0x00DA, NES_SCRIPT }, { 0x1D439, 0x0018, NES_SCRIPT }, { 0x1D451, 0x0054, NES_SCRIPT }, { 0x18C76, 0x0005, NES_SCRIPT }, + { 0x152F0, 0x0126, NES_SCRIPT }, { 0x15416, 0x000B, NES_SCRIPT }, { 0x24687, 0x0137, NES_SCRIPT }, { 0x247BE, 0x0014, NES_SCRIPT }, { 0x1DFBE, 0x0018, NES_SCRIPT }, + { 0x247D2, 0x0027, NES_SCRIPT }, { 0x1A0A4, 0x004D, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, { 0x2B62D, 0x00A5, NES_SCRIPT }, { 0x2A759, 0x00BA, NES_SCRIPT }, + { 0x2A813, 0x0140, NES_SCRIPT }, { 0x197CF, 0x00D0, NES_SCRIPT }, { 0x1989F, 0x014D, NES_SCRIPT }, { 0x199EC, 0x0012, NES_SCRIPT }, { 0x2A953, 0x0005, NES_SCRIPT }, + { 0x2A958, 0x0005, NES_SCRIPT }, { 0x2A95D, 0x0005, NES_SCRIPT }, { 0x2A962, 0x0005, NES_SCRIPT }, { 0x2A967, 0x0005, NES_SCRIPT }, { 0x21749, 0x0033, NES_SCRIPT }, + { 0x2A96C, 0x0005, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, { 0x2A971, 0x009C, NES_SCRIPT }, { 0x2AA0D, 0x009C, NES_SCRIPT } +}; +static const ScummNESFile::Resource res_scripts_esp[179] = { + { 0x00000, 0x0000, NES_SCRIPT }, { 0x28F4C, 0x0457, NES_SCRIPT }, { 0x293A3, 0x0213, NES_SCRIPT }, { 0x295B6, 0x009C, NES_SCRIPT }, { 0x29652, 0x03FE, NES_SCRIPT }, + { 0x29A50, 0x01A1, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, { 0x29BF1, 0x005C, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, { 0x29C4D, 0x0005, NES_SCRIPT }, + { 0x2B964, 0x000D, NES_SCRIPT }, { 0x2B971, 0x000D, NES_SCRIPT }, { 0x186EE, 0x0040, NES_SCRIPT }, { 0x1872E, 0x0016, NES_SCRIPT }, { 0x1B5A0, 0x0046, NES_SCRIPT }, + { 0x1EF97, 0x00B4, NES_SCRIPT }, { 0x21D17, 0x0056, NES_SCRIPT }, { 0x175E9, 0x0027, NES_SCRIPT }, { 0x1FE06, 0x0027, NES_SCRIPT }, { 0x1FE2D, 0x0027, NES_SCRIPT }, + { 0x1BC86, 0x0022, NES_SCRIPT }, { 0x15C26, 0x008B, NES_SCRIPT }, { 0x2232E, 0x001F, NES_SCRIPT }, { 0x2234D, 0x008F, NES_SCRIPT }, { 0x192AF, 0x002B, NES_SCRIPT }, + { 0x1CB59, 0x006B, NES_SCRIPT }, { 0x1CBC4, 0x0045, NES_SCRIPT }, { 0x1CC09, 0x0046, NES_SCRIPT }, { 0x1CC4F, 0x005D, NES_SCRIPT }, { 0x204CC, 0x0077, NES_SCRIPT }, + { 0x163DA, 0x0035, NES_SCRIPT }, { 0x1640F, 0x001C, NES_SCRIPT }, { 0x1642B, 0x0014, NES_SCRIPT }, { 0x1643F, 0x001C, NES_SCRIPT }, { 0x1645B, 0x0027, NES_SCRIPT }, + { 0x16482, 0x01A3, NES_SCRIPT }, { 0x1D1DE, 0x009E, NES_SCRIPT }, { 0x1D27C, 0x011A, NES_SCRIPT }, { 0x1D396, 0x001C, NES_SCRIPT }, { 0x1D3B2, 0x0056, NES_SCRIPT }, + { 0x1D408, 0x0072, NES_SCRIPT }, { 0x1E50F, 0x0028, NES_SCRIPT }, { 0x1E537, 0x0199, NES_SCRIPT }, { 0x1E6D0, 0x0240, NES_SCRIPT }, { 0x27CA1, 0x0071, NES_SCRIPT }, + { 0x17D14, 0x004C, NES_SCRIPT }, { 0x13E0F, 0x0039, NES_SCRIPT }, { 0x18744, 0x02B9, NES_SCRIPT }, { 0x189FD, 0x00B9, NES_SCRIPT }, { 0x18AB6, 0x0183, NES_SCRIPT }, + { 0x00000, 0x0000, NES_SCRIPT }, { 0x19E3E, 0x00F0, NES_SCRIPT }, { 0x21D6D, 0x00F7, NES_SCRIPT }, { 0x1E910, 0x00A8, NES_SCRIPT }, { 0x21E64, 0x0047, NES_SCRIPT }, + { 0x2B97E, 0x004D, NES_SCRIPT }, { 0x13E48, 0x0024, NES_SCRIPT }, { 0x14D06, 0x0014, NES_SCRIPT }, { 0x17610, 0x005B, NES_SCRIPT }, { 0x1766B, 0x0111, NES_SCRIPT }, + { 0x1777C, 0x0009, NES_SCRIPT }, { 0x14D1A, 0x01C9, NES_SCRIPT }, { 0x2A9E3, 0x0263, NES_SCRIPT }, { 0x231C6, 0x06D6, NES_SCRIPT }, { 0x2B9CB, 0x001C, NES_SCRIPT }, + { 0x2B9E7, 0x001C, NES_SCRIPT }, { 0x2BA03, 0x0025, NES_SCRIPT }, { 0x2BA28, 0x0023, NES_SCRIPT }, { 0x2BA4B, 0x002A, NES_SCRIPT }, { 0x2BA75, 0x0033, NES_SCRIPT }, + { 0x2BAA8, 0x0016, NES_SCRIPT }, { 0x2BABE, 0x0024, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, { 0x2BAE2, 0x0011, NES_SCRIPT }, { 0x17785, 0x00A2, NES_SCRIPT }, + { 0x22838, 0x0066, NES_SCRIPT }, { 0x14EE3, 0x0079, NES_SCRIPT }, { 0x1F3DB, 0x010F, NES_SCRIPT }, { 0x1FE54, 0x001D, NES_SCRIPT }, { 0x1F4EA, 0x00A2, NES_SCRIPT }, + { 0x1F58C, 0x0097, NES_SCRIPT }, { 0x17827, 0x0061, NES_SCRIPT }, { 0x17888, 0x0032, NES_SCRIPT }, { 0x1F623, 0x00A7, NES_SCRIPT }, { 0x2BAF3, 0x00CD, NES_SCRIPT }, + { 0x2BBC0, 0x00BD, NES_SCRIPT }, { 0x2BC7D, 0x0089, NES_SCRIPT }, { 0x20A73, 0x01C2, NES_SCRIPT }, { 0x20C35, 0x016E, NES_SCRIPT }, { 0x20DA3, 0x006F, NES_SCRIPT }, + { 0x20E12, 0x0037, NES_SCRIPT }, { 0x20E49, 0x00EC, NES_SCRIPT }, { 0x20F35, 0x0047, NES_SCRIPT }, { 0x20F7C, 0x00F8, NES_SCRIPT }, { 0x21074, 0x0102, NES_SCRIPT }, + { 0x21176, 0x0133, NES_SCRIPT }, { 0x212A9, 0x0197, NES_SCRIPT }, { 0x21440, 0x002D, NES_SCRIPT }, { 0x2146D, 0x00A9, NES_SCRIPT }, { 0x2436D, 0x0125, NES_SCRIPT }, + { 0x1BCA8, 0x0071, NES_SCRIPT }, { 0x1CCAC, 0x0096, NES_SCRIPT }, { 0x2896A, 0x0054, NES_SCRIPT }, { 0x19F2E, 0x00DF, NES_SCRIPT }, { 0x1A00D, 0x007F, NES_SCRIPT }, + { 0x14F5C, 0x0057, NES_SCRIPT }, { 0x27074, 0x02F6, NES_SCRIPT }, { 0x1DA73, 0x023A, NES_SCRIPT }, { 0x1DCAD, 0x00E8, NES_SCRIPT }, { 0x1DD95, 0x0059, NES_SCRIPT }, + { 0x1DDEE, 0x01E3, NES_SCRIPT }, { 0x14FB3, 0x004D, NES_SCRIPT }, { 0x26D81, 0x00DC, NES_SCRIPT }, { 0x21EAB, 0x0013, NES_SCRIPT }, { 0x29C52, 0x00F0, NES_SCRIPT }, + { 0x24492, 0x00E4, NES_SCRIPT }, { 0x21516, 0x00EE, NES_SCRIPT }, { 0x24576, 0x002D, NES_SCRIPT }, { 0x2B692, 0x010D, NES_SCRIPT }, { 0x245A3, 0x00AC, NES_SCRIPT }, + { 0x250C3, 0x0184, NES_SCRIPT }, { 0x1B5E6, 0x000D, NES_SCRIPT }, { 0x1B5F3, 0x000D, NES_SCRIPT }, { 0x2389C, 0x0182, NES_SCRIPT }, { 0x2765E, 0x01E7, NES_SCRIPT }, + { 0x23A1E, 0x017A, NES_SCRIPT }, { 0x23B98, 0x01B6, NES_SCRIPT }, { 0x23D4E, 0x0016, NES_SCRIPT }, { 0x2B79F, 0x005D, NES_SCRIPT }, { 0x23D64, 0x0020, NES_SCRIPT }, + { 0x2A619, 0x00A5, NES_SCRIPT }, { 0x29D42, 0x038F, NES_SCRIPT }, { 0x15000, 0x00ED, NES_SCRIPT }, { 0x2B1B8, 0x0063, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, + { 0x25247, 0x003C, NES_SCRIPT }, { 0x1E9B8, 0x0011, NES_SCRIPT }, { 0x13E6C, 0x0018, NES_SCRIPT }, { 0x265E0, 0x001F, NES_SCRIPT }, { 0x265FF, 0x0054, NES_SCRIPT }, + { 0x26653, 0x0147, NES_SCRIPT }, { 0x2679A, 0x004B, NES_SCRIPT }, { 0x267E5, 0x0184, NES_SCRIPT }, { 0x26969, 0x0027, NES_SCRIPT }, { 0x26990, 0x0041, NES_SCRIPT }, + { 0x269D1, 0x01B9, NES_SCRIPT }, { 0x13E84, 0x001F, NES_SCRIPT }, { 0x2464F, 0x002A, NES_SCRIPT }, { 0x150ED, 0x01A4, NES_SCRIPT }, { 0x192DA, 0x0031, NES_SCRIPT }, + { 0x178BA, 0x007C, NES_SCRIPT }, { 0x21604, 0x00E4, NES_SCRIPT }, { 0x1D47A, 0x0018, NES_SCRIPT }, { 0x1D492, 0x005B, NES_SCRIPT }, { 0x18C39, 0x0005, NES_SCRIPT }, + { 0x15291, 0x010F, NES_SCRIPT }, { 0x153A0, 0x000B, NES_SCRIPT }, { 0x24679, 0x0138, NES_SCRIPT }, { 0x247B1, 0x0014, NES_SCRIPT }, { 0x1DFD1, 0x0018, NES_SCRIPT }, + { 0x247C5, 0x0027, NES_SCRIPT }, { 0x1A08C, 0x004E, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, { 0x2B21B, 0x00A5, NES_SCRIPT }, { 0x2A0D1, 0x00B1, NES_SCRIPT }, + { 0x2A182, 0x0140, NES_SCRIPT }, { 0x197CF, 0x00BE, NES_SCRIPT }, { 0x1988D, 0x014D, NES_SCRIPT }, { 0x199DA, 0x0012, NES_SCRIPT }, { 0x2A2C2, 0x0005, NES_SCRIPT }, + { 0x2A2C7, 0x0005, NES_SCRIPT }, { 0x2A2CC, 0x0005, NES_SCRIPT }, { 0x2A2D1, 0x0005, NES_SCRIPT }, { 0x2A2D6, 0x0005, NES_SCRIPT }, { 0x216E8, 0x0033, NES_SCRIPT }, + { 0x2A2DB, 0x0005, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, { 0x2A2E0, 0x009C, NES_SCRIPT }, { 0x2A37C, 0x009C, NES_SCRIPT } +}; + +static const ScummNESFile::Resource *res_scripts[ScummNESFile::kROMsetNum] = { + res_scripts_usa, + res_scripts_eur, + res_scripts_swe, + res_scripts_fra, + res_scripts_ger, + res_scripts_esp, +}; + +static const ScummNESFile::Resource res_sounds_usa[82] = { + { 0x0FFE8, 0x000A, NES_SOUND }, { 0x30ECA, 0x0832, NES_SOUND }, { 0x30ECA, 0x0832, NES_SOUND }, { 0x30ECA, 0x0832, NES_SOUND }, { 0x30ECA, 0x0832, NES_SOUND }, + { 0x30ECA, 0x0832, NES_SOUND }, { 0x17FCA, 0x0011, NES_SOUND }, { 0x27E0B, 0x0073, NES_SOUND }, { 0x17FDB, 0x0011, NES_SOUND }, { 0x17FEC, 0x0011, NES_SOUND }, + { 0x27E7E, 0x0056, NES_SOUND }, { 0x27ED4, 0x001F, NES_SOUND }, { 0x23FEE, 0x0011, NES_SOUND }, { 0x0FFF2, 0x000A, NES_SOUND }, { 0x27EF3, 0x000A, NES_SOUND }, + { 0x27EFD, 0x0019, NES_SOUND }, { 0x27F16, 0x004B, NES_SOUND }, { 0x27F61, 0x000A, NES_SOUND }, { 0x27F6B, 0x000F, NES_SOUND }, { 0x27F7A, 0x001D, NES_SOUND }, + { 0x27F97, 0x0045, NES_SOUND }, { 0x27FDC, 0x000F, NES_SOUND }, { 0x2FD42, 0x001B, NES_SOUND }, { 0x2FD5D, 0x0033, NES_SOUND }, { 0x27FEB, 0x0011, NES_SOUND }, + { 0x2BFEF, 0x000F, NES_SOUND }, { 0x2FD90, 0x0075, NES_SOUND }, { 0x2FE05, 0x0014, NES_SOUND }, { 0x0FFE8, 0x000A, NES_SOUND }, { 0x2FE19, 0x00FF, NES_SOUND }, + { 0x2FF18, 0x000F, NES_SOUND }, { 0x2FF27, 0x000F, NES_SOUND }, { 0x2FF36, 0x0092, NES_SOUND }, { 0x2FF36, 0x0092, NES_SOUND }, { 0x2FFC8, 0x002D, NES_SOUND }, + { 0x316FC, 0x00F8, NES_SOUND }, { 0x317F4, 0x0016, NES_SOUND }, { 0x3180A, 0x0011, NES_SOUND }, { 0x3181B, 0x004B, NES_SOUND }, { 0x31866, 0x0011, NES_SOUND }, + { 0x31877, 0x003B, NES_SOUND }, { 0x318B2, 0x008A, NES_SOUND }, { 0x3193C, 0x0011, NES_SOUND }, { 0x3194D, 0x000F, NES_SOUND }, { 0x3195C, 0x00A2, NES_SOUND }, + { 0x319FE, 0x00D3, NES_SOUND }, { 0x31AD1, 0x0097, NES_SOUND }, { 0x2BFEF, 0x000F, NES_SOUND }, { 0x3195C, 0x00A2, NES_SOUND }, { 0x31B68, 0x05D1, NES_SOUND }, + { 0x31B68, 0x05D1, NES_SOUND }, { 0x32139, 0x0011, NES_SOUND }, { 0x0FFE8, 0x000A, NES_SOUND }, { 0x2FD90, 0x0075, NES_SOUND }, { 0x27ED4, 0x001F, NES_SOUND }, + { 0x3214A, 0x098E, NES_SOUND }, { 0x3181B, 0x004B, NES_SOUND }, { 0x32AD8, 0x0011, NES_SOUND }, { 0x30ECA, 0x0832, NES_SOUND }, { 0x32AE9, 0x000F, NES_SOUND }, + { 0x32AF8, 0x002F, NES_SOUND }, { 0x32B27, 0x001D, NES_SOUND }, { 0x32B44, 0x0018, NES_SOUND }, { 0x32B5C, 0x0016, NES_SOUND }, { 0x32B72, 0x001B, NES_SOUND }, + { 0x32B8D, 0x0088, NES_SOUND }, { 0x32C15, 0x0065, NES_SOUND }, { 0x32C7A, 0x0065, NES_SOUND }, { 0x32CDF, 0x0073, NES_SOUND }, { 0x32D52, 0x00F9, NES_SOUND }, + { 0x32E4B, 0x049E, NES_SOUND }, { 0x34001, 0x0EA8, NES_SOUND }, { 0x332E9, 0x0B18, NES_SOUND }, { 0x34EA9, 0x0B9C, NES_SOUND }, { 0x35A45, 0x0C6B, NES_SOUND }, + { 0x366B0, 0x0E56, NES_SOUND }, { 0x38001, 0x0C70, NES_SOUND }, { 0x38C71, 0x0DEC, NES_SOUND }, { 0x39A5D, 0x0B77, NES_SOUND }, { 0x37506, 0x042F, NES_SOUND }, + { 0x3A5D4, 0x0AC5, NES_SOUND }, { 0x3B099, 0x0BE4, NES_SOUND } +}; +static const ScummNESFile::Resource res_sounds_eur[82] = { + { 0x0BF54, 0x000A, NES_SOUND }, { 0x30ECA, 0x0832, NES_SOUND }, { 0x30ECA, 0x0832, NES_SOUND }, { 0x30ECA, 0x0832, NES_SOUND }, { 0x30ECA, 0x0832, NES_SOUND }, + { 0x30ECA, 0x0832, NES_SOUND }, { 0x0BF5E, 0x0011, NES_SOUND }, { 0x27ECB, 0x0073, NES_SOUND }, { 0x0BF6F, 0x0011, NES_SOUND }, { 0x0FF5D, 0x0011, NES_SOUND }, + { 0x316FC, 0x0056, NES_SOUND }, { 0x13F4E, 0x001F, NES_SOUND }, { 0x0FF6E, 0x0011, NES_SOUND }, { 0x13F6D, 0x000A, NES_SOUND }, { 0x1BF47, 0x000A, NES_SOUND }, + { 0x1BF51, 0x0019, NES_SOUND }, { 0x31752, 0x004B, NES_SOUND }, { 0x1BF6A, 0x000A, NES_SOUND }, { 0x27F3E, 0x000F, NES_SOUND }, { 0x27F4D, 0x001D, NES_SOUND }, + { 0x3179D, 0x0045, NES_SOUND }, { 0x27F6A, 0x000F, NES_SOUND }, { 0x2BF40, 0x001B, NES_SOUND }, { 0x317E2, 0x0033, NES_SOUND }, { 0x2BF5B, 0x0011, NES_SOUND }, + { 0x2BF6C, 0x000F, NES_SOUND }, { 0x31815, 0x0075, NES_SOUND }, { 0x2FF6C, 0x0014, NES_SOUND }, { 0x0BF54, 0x000A, NES_SOUND }, { 0x3188A, 0x00FF, NES_SOUND }, + { 0x31989, 0x000F, NES_SOUND }, { 0x31998, 0x000F, NES_SOUND }, { 0x319A7, 0x0092, NES_SOUND }, { 0x319A7, 0x0092, NES_SOUND }, { 0x31A39, 0x002D, NES_SOUND }, + { 0x31A66, 0x00F8, NES_SOUND }, { 0x31B5E, 0x0016, NES_SOUND }, { 0x31B74, 0x0011, NES_SOUND }, { 0x31B85, 0x004B, NES_SOUND }, { 0x31BD0, 0x0011, NES_SOUND }, + { 0x31BE1, 0x003B, NES_SOUND }, { 0x31C1C, 0x008A, NES_SOUND }, { 0x31CA6, 0x0011, NES_SOUND }, { 0x31CB7, 0x000F, NES_SOUND }, { 0x31CC6, 0x00A2, NES_SOUND }, + { 0x31D68, 0x00D3, NES_SOUND }, { 0x31E3B, 0x0097, NES_SOUND }, { 0x2BF6C, 0x000F, NES_SOUND }, { 0x31CC6, 0x00A2, NES_SOUND }, { 0x31ED2, 0x05D1, NES_SOUND }, + { 0x31ED2, 0x05D1, NES_SOUND }, { 0x324A3, 0x0011, NES_SOUND }, { 0x0BF54, 0x000A, NES_SOUND }, { 0x31815, 0x0075, NES_SOUND }, { 0x13F4E, 0x001F, NES_SOUND }, + { 0x324B4, 0x098E, NES_SOUND }, { 0x31B85, 0x004B, NES_SOUND }, { 0x32E42, 0x0011, NES_SOUND }, { 0x30ECA, 0x0832, NES_SOUND }, { 0x32E53, 0x000F, NES_SOUND }, + { 0x32E62, 0x002F, NES_SOUND }, { 0x32E91, 0x001D, NES_SOUND }, { 0x32EAE, 0x0018, NES_SOUND }, { 0x32EC6, 0x0016, NES_SOUND }, { 0x32EDC, 0x001B, NES_SOUND }, + { 0x32EF7, 0x0088, NES_SOUND }, { 0x32F7F, 0x0065, NES_SOUND }, { 0x32FE4, 0x0065, NES_SOUND }, { 0x33049, 0x0073, NES_SOUND }, { 0x330BC, 0x00F9, NES_SOUND }, + { 0x331B5, 0x049E, NES_SOUND }, { 0x34001, 0x0EA8, NES_SOUND }, { 0x34EA9, 0x0B18, NES_SOUND }, { 0x359C1, 0x0B9C, NES_SOUND }, { 0x3655D, 0x0C6B, NES_SOUND }, + { 0x38001, 0x0E56, NES_SOUND }, { 0x371C8, 0x0C70, NES_SOUND }, { 0x38E57, 0x0DEC, NES_SOUND }, { 0x39C43, 0x0B77, NES_SOUND }, { 0x33653, 0x042F, NES_SOUND }, + { 0x3A7BA, 0x0AC5, NES_SOUND }, { 0x3B27F, 0x0BE4, NES_SOUND } +}; +static const ScummNESFile::Resource res_sounds_swe[82] = { + { 0x0BF58, 0x000A, NES_SOUND }, { 0x30352, 0x0832, NES_SOUND }, { 0x30352, 0x0832, NES_SOUND }, { 0x30352, 0x0832, NES_SOUND }, { 0x30352, 0x0832, NES_SOUND }, + { 0x30352, 0x0832, NES_SOUND }, { 0x0BF62, 0x0011, NES_SOUND }, { 0x27E5F, 0x0073, NES_SOUND }, { 0x17F5A, 0x0011, NES_SOUND }, { 0x17F6B, 0x0011, NES_SOUND }, + { 0x27ED2, 0x0056, NES_SOUND }, { 0x1BF55, 0x001F, NES_SOUND }, { 0x23F66, 0x0011, NES_SOUND }, { 0x0BF73, 0x000A, NES_SOUND }, { 0x1BF74, 0x000A, NES_SOUND }, + { 0x27F28, 0x0019, NES_SOUND }, { 0x2BF0A, 0x004B, NES_SOUND }, { 0x1FF71, 0x000A, NES_SOUND }, { 0x27F41, 0x000F, NES_SOUND }, { 0x27F50, 0x001D, NES_SOUND }, + { 0x2FEAA, 0x0045, NES_SOUND }, { 0x27F6D, 0x000F, NES_SOUND }, { 0x2BF55, 0x001B, NES_SOUND }, { 0x2FEEF, 0x0033, NES_SOUND }, { 0x2FF22, 0x0011, NES_SOUND }, + { 0x2BF70, 0x000F, NES_SOUND }, { 0x30B84, 0x0075, NES_SOUND }, { 0x2FF33, 0x0014, NES_SOUND }, { 0x0BF58, 0x000A, NES_SOUND }, { 0x30BF9, 0x00FF, NES_SOUND }, + { 0x2FF47, 0x000F, NES_SOUND }, { 0x2FF56, 0x000F, NES_SOUND }, { 0x30CF8, 0x0092, NES_SOUND }, { 0x30CF8, 0x0092, NES_SOUND }, { 0x30D8A, 0x002D, NES_SOUND }, + { 0x30DB7, 0x00F8, NES_SOUND }, { 0x2FF65, 0x0016, NES_SOUND }, { 0x30EAF, 0x0011, NES_SOUND }, { 0x30EC0, 0x004B, NES_SOUND }, { 0x30F0B, 0x0011, NES_SOUND }, + { 0x30F1C, 0x003B, NES_SOUND }, { 0x30F57, 0x008A, NES_SOUND }, { 0x30FE1, 0x0011, NES_SOUND }, { 0x30FF2, 0x000F, NES_SOUND }, { 0x31001, 0x00A2, NES_SOUND }, + { 0x310A3, 0x00D3, NES_SOUND }, { 0x31176, 0x0097, NES_SOUND }, { 0x2BF70, 0x000F, NES_SOUND }, { 0x31001, 0x00A2, NES_SOUND }, { 0x3120D, 0x05D1, NES_SOUND }, + { 0x3120D, 0x05D1, NES_SOUND }, { 0x317DE, 0x0011, NES_SOUND }, { 0x0BF58, 0x000A, NES_SOUND }, { 0x30B84, 0x0075, NES_SOUND }, { 0x1BF55, 0x001F, NES_SOUND }, + { 0x317EF, 0x098E, NES_SOUND }, { 0x30EC0, 0x004B, NES_SOUND }, { 0x3217D, 0x0011, NES_SOUND }, { 0x30352, 0x0832, NES_SOUND }, { 0x3218E, 0x000F, NES_SOUND }, + { 0x3219D, 0x002F, NES_SOUND }, { 0x321CC, 0x001D, NES_SOUND }, { 0x321E9, 0x0018, NES_SOUND }, { 0x32201, 0x0016, NES_SOUND }, { 0x32217, 0x001B, NES_SOUND }, + { 0x32232, 0x0088, NES_SOUND }, { 0x322BA, 0x0065, NES_SOUND }, { 0x3231F, 0x0065, NES_SOUND }, { 0x32384, 0x0073, NES_SOUND }, { 0x323F7, 0x00F9, NES_SOUND }, + { 0x324F0, 0x049E, NES_SOUND }, { 0x3298E, 0x0EA8, NES_SOUND }, { 0x34001, 0x0B18, NES_SOUND }, { 0x34B19, 0x0B9C, NES_SOUND }, { 0x356B5, 0x0C6B, NES_SOUND }, + { 0x36320, 0x0E56, NES_SOUND }, { 0x37176, 0x0C70, NES_SOUND }, { 0x38001, 0x0DEC, NES_SOUND }, { 0x38DED, 0x0B77, NES_SOUND }, { 0x33836, 0x042F, NES_SOUND }, + { 0x39964, 0x0AC5, NES_SOUND }, { 0x3A429, 0x0BE4, NES_SOUND } +}; +static const ScummNESFile::Resource res_sounds_fra[82] = { + { 0x07F74, 0x000A, NES_SOUND }, { 0x30ECA, 0x0832, NES_SOUND }, { 0x30ECA, 0x0832, NES_SOUND }, { 0x30ECA, 0x0832, NES_SOUND }, { 0x30ECA, 0x0832, NES_SOUND }, + { 0x30ECA, 0x0832, NES_SOUND }, { 0x0BF6C, 0x0011, NES_SOUND }, { 0x1BEFA, 0x0073, NES_SOUND }, { 0x17F10, 0x0011, NES_SOUND }, { 0x17F21, 0x0011, NES_SOUND }, + { 0x1FED5, 0x0056, NES_SOUND }, { 0x17F32, 0x001F, NES_SOUND }, { 0x17F51, 0x0011, NES_SOUND }, { 0x0FF76, 0x000A, NES_SOUND }, { 0x17F62, 0x000A, NES_SOUND }, + { 0x1FF2B, 0x0019, NES_SOUND }, { 0x23E78, 0x004B, NES_SOUND }, { 0x17F6C, 0x000A, NES_SOUND }, { 0x1BF6D, 0x000F, NES_SOUND }, { 0x1FF44, 0x001D, NES_SOUND }, + { 0x23EC3, 0x0045, NES_SOUND }, { 0x1FF61, 0x000F, NES_SOUND }, { 0x23F08, 0x001B, NES_SOUND }, { 0x23F23, 0x0033, NES_SOUND }, { 0x23F56, 0x0011, NES_SOUND }, + { 0x1FF70, 0x000F, NES_SOUND }, { 0x27EF4, 0x0075, NES_SOUND }, { 0x23F67, 0x0014, NES_SOUND }, { 0x07F74, 0x000A, NES_SOUND }, { 0x2FB83, 0x00FF, NES_SOUND }, + { 0x27F69, 0x000F, NES_SOUND }, { 0x2BF70, 0x000F, NES_SOUND }, { 0x2FC82, 0x0092, NES_SOUND }, { 0x2FC82, 0x0092, NES_SOUND }, { 0x2FD14, 0x002D, NES_SOUND }, + { 0x2FD41, 0x00F8, NES_SOUND }, { 0x2FE39, 0x0016, NES_SOUND }, { 0x2FE4F, 0x0011, NES_SOUND }, { 0x2FE60, 0x004B, NES_SOUND }, { 0x2FEAB, 0x0011, NES_SOUND }, + { 0x2FEBC, 0x003B, NES_SOUND }, { 0x316FC, 0x008A, NES_SOUND }, { 0x2FEF7, 0x0011, NES_SOUND }, { 0x2FF08, 0x000F, NES_SOUND }, { 0x31786, 0x00A2, NES_SOUND }, + { 0x31828, 0x00D3, NES_SOUND }, { 0x318FB, 0x0097, NES_SOUND }, { 0x1FF70, 0x000F, NES_SOUND }, { 0x31786, 0x00A2, NES_SOUND }, { 0x31992, 0x05D1, NES_SOUND }, + { 0x31992, 0x05D1, NES_SOUND }, { 0x2FF17, 0x0011, NES_SOUND }, { 0x07F74, 0x000A, NES_SOUND }, { 0x27EF4, 0x0075, NES_SOUND }, { 0x17F32, 0x001F, NES_SOUND }, + { 0x31F63, 0x098E, NES_SOUND }, { 0x2FE60, 0x004B, NES_SOUND }, { 0x2FF28, 0x0011, NES_SOUND }, { 0x30ECA, 0x0832, NES_SOUND }, { 0x2FF39, 0x000F, NES_SOUND }, + { 0x2FF48, 0x002F, NES_SOUND }, { 0x328F1, 0x001D, NES_SOUND }, { 0x3290E, 0x0018, NES_SOUND }, { 0x32926, 0x0016, NES_SOUND }, { 0x3293C, 0x001B, NES_SOUND }, + { 0x32957, 0x0088, NES_SOUND }, { 0x329DF, 0x0065, NES_SOUND }, { 0x32A44, 0x0065, NES_SOUND }, { 0x32AA9, 0x0073, NES_SOUND }, { 0x32B1C, 0x00F9, NES_SOUND }, + { 0x32C15, 0x049E, NES_SOUND }, { 0x330B3, 0x0EA8, NES_SOUND }, { 0x34001, 0x0B18, NES_SOUND }, { 0x34B19, 0x0B9C, NES_SOUND }, { 0x356B5, 0x0C6B, NES_SOUND }, + { 0x36320, 0x0E56, NES_SOUND }, { 0x37176, 0x0C70, NES_SOUND }, { 0x38001, 0x0DEC, NES_SOUND }, { 0x38DED, 0x0B77, NES_SOUND }, { 0x39964, 0x042F, NES_SOUND }, + { 0x39D93, 0x0AC5, NES_SOUND }, { 0x3A858, 0x0BE4, NES_SOUND } +}; +static const ScummNESFile::Resource res_sounds_ger[82] = { + { 0x0BF6D, 0x000A, NES_SOUND }, { 0x30ECA, 0x0832, NES_SOUND }, { 0x30ECA, 0x0832, NES_SOUND }, { 0x30ECA, 0x0832, NES_SOUND }, { 0x30ECA, 0x0832, NES_SOUND }, + { 0x30ECA, 0x0832, NES_SOUND }, { 0x23F05, 0x0011, NES_SOUND }, { 0x2FA49, 0x0073, NES_SOUND }, { 0x23F16, 0x0011, NES_SOUND }, { 0x23F27, 0x0011, NES_SOUND }, + { 0x2FABC, 0x0056, NES_SOUND }, { 0x23F38, 0x001F, NES_SOUND }, { 0x23F57, 0x0011, NES_SOUND }, { 0x0FF76, 0x000A, NES_SOUND }, { 0x17F71, 0x000A, NES_SOUND }, + { 0x2BF2F, 0x0019, NES_SOUND }, { 0x2FB12, 0x004B, NES_SOUND }, { 0x23F68, 0x000A, NES_SOUND }, { 0x2BF48, 0x000F, NES_SOUND }, { 0x2BF57, 0x001D, NES_SOUND }, + { 0x2FB5D, 0x0045, NES_SOUND }, { 0x2FBA2, 0x000F, NES_SOUND }, { 0x2FBB1, 0x001B, NES_SOUND }, { 0x2FBCC, 0x0033, NES_SOUND }, { 0x2FBFF, 0x0011, NES_SOUND }, + { 0x2FC10, 0x000F, NES_SOUND }, { 0x2FC1F, 0x0075, NES_SOUND }, { 0x2FC94, 0x0014, NES_SOUND }, { 0x0BF6D, 0x000A, NES_SOUND }, { 0x2FCA8, 0x00FF, NES_SOUND }, + { 0x2FDA7, 0x000F, NES_SOUND }, { 0x2FDB6, 0x000F, NES_SOUND }, { 0x2FDC5, 0x0092, NES_SOUND }, { 0x2FDC5, 0x0092, NES_SOUND }, { 0x2FE57, 0x002D, NES_SOUND }, + { 0x2FE84, 0x00F8, NES_SOUND }, { 0x316FC, 0x0016, NES_SOUND }, { 0x31712, 0x0011, NES_SOUND }, { 0x31723, 0x004B, NES_SOUND }, { 0x3176E, 0x0011, NES_SOUND }, + { 0x3177F, 0x003B, NES_SOUND }, { 0x317BA, 0x008A, NES_SOUND }, { 0x31844, 0x0011, NES_SOUND }, { 0x31855, 0x000F, NES_SOUND }, { 0x31864, 0x00A2, NES_SOUND }, + { 0x31906, 0x00D3, NES_SOUND }, { 0x319D9, 0x0097, NES_SOUND }, { 0x2FC10, 0x000F, NES_SOUND }, { 0x31864, 0x00A2, NES_SOUND }, { 0x31A70, 0x05D1, NES_SOUND }, + { 0x31A70, 0x05D1, NES_SOUND }, { 0x32041, 0x0011, NES_SOUND }, { 0x0BF6D, 0x000A, NES_SOUND }, { 0x2FC1F, 0x0075, NES_SOUND }, { 0x23F38, 0x001F, NES_SOUND }, + { 0x32052, 0x098E, NES_SOUND }, { 0x31723, 0x004B, NES_SOUND }, { 0x329E0, 0x0011, NES_SOUND }, { 0x30ECA, 0x0832, NES_SOUND }, { 0x329F1, 0x000F, NES_SOUND }, + { 0x32A00, 0x002F, NES_SOUND }, { 0x32A2F, 0x001D, NES_SOUND }, { 0x32A4C, 0x0018, NES_SOUND }, { 0x32A64, 0x0016, NES_SOUND }, { 0x32A7A, 0x001B, NES_SOUND }, + { 0x32A95, 0x0088, NES_SOUND }, { 0x32B1D, 0x0065, NES_SOUND }, { 0x32B82, 0x0065, NES_SOUND }, { 0x32BE7, 0x0073, NES_SOUND }, { 0x32C5A, 0x00F9, NES_SOUND }, + { 0x32D53, 0x049E, NES_SOUND }, { 0x34001, 0x0EA8, NES_SOUND }, { 0x331F1, 0x0B18, NES_SOUND }, { 0x34EA9, 0x0B9C, NES_SOUND }, { 0x35A45, 0x0C6B, NES_SOUND }, + { 0x366B0, 0x0E56, NES_SOUND }, { 0x38001, 0x0C70, NES_SOUND }, { 0x38C71, 0x0DEC, NES_SOUND }, { 0x39A5D, 0x0B77, NES_SOUND }, { 0x37506, 0x042F, NES_SOUND }, + { 0x3A5D4, 0x0AC5, NES_SOUND }, { 0x3B099, 0x0BE4, NES_SOUND } +}; +static const ScummNESFile::Resource res_sounds_esp[82] = { + { 0x13F63, 0x000A, NES_SOUND }, { 0x2F671, 0x0832, NES_SOUND }, { 0x2F671, 0x0832, NES_SOUND }, { 0x2F671, 0x0832, NES_SOUND }, { 0x2F671, 0x0832, NES_SOUND }, + { 0x2F671, 0x0832, NES_SOUND }, { 0x13F6D, 0x0011, NES_SOUND }, { 0x1FEED, 0x0073, NES_SOUND }, { 0x17F6F, 0x0011, NES_SOUND }, { 0x1BF64, 0x0011, NES_SOUND }, + { 0x27F19, 0x0056, NES_SOUND }, { 0x1FF60, 0x001F, NES_SOUND }, { 0x27F6F, 0x0011, NES_SOUND }, { 0x1BF75, 0x000A, NES_SOUND }, { 0x2BE6F, 0x000A, NES_SOUND }, + { 0x2BE79, 0x0019, NES_SOUND }, { 0x2BE92, 0x004B, NES_SOUND }, { 0x2BEDD, 0x000A, NES_SOUND }, { 0x2BEE7, 0x000F, NES_SOUND }, { 0x2BEF6, 0x001D, NES_SOUND }, + { 0x2BF13, 0x0045, NES_SOUND }, { 0x2BF58, 0x000F, NES_SOUND }, { 0x2FEA3, 0x001B, NES_SOUND }, { 0x2FEBE, 0x0033, NES_SOUND }, { 0x2BF67, 0x0011, NES_SOUND }, + { 0x2FEF1, 0x000F, NES_SOUND }, { 0x2FF00, 0x0075, NES_SOUND }, { 0x30ECA, 0x0014, NES_SOUND }, { 0x13F63, 0x000A, NES_SOUND }, { 0x30EDE, 0x00FF, NES_SOUND }, + { 0x30FDD, 0x000F, NES_SOUND }, { 0x30FEC, 0x000F, NES_SOUND }, { 0x30FFB, 0x0092, NES_SOUND }, { 0x30FFB, 0x0092, NES_SOUND }, { 0x3108D, 0x002D, NES_SOUND }, + { 0x310BA, 0x00F8, NES_SOUND }, { 0x311B2, 0x0016, NES_SOUND }, { 0x311C8, 0x0011, NES_SOUND }, { 0x311D9, 0x004B, NES_SOUND }, { 0x31224, 0x0011, NES_SOUND }, + { 0x31235, 0x003B, NES_SOUND }, { 0x31270, 0x008A, NES_SOUND }, { 0x312FA, 0x0011, NES_SOUND }, { 0x3130B, 0x000F, NES_SOUND }, { 0x3131A, 0x00A2, NES_SOUND }, + { 0x313BC, 0x00D3, NES_SOUND }, { 0x3148F, 0x0097, NES_SOUND }, { 0x2FEF1, 0x000F, NES_SOUND }, { 0x3131A, 0x00A2, NES_SOUND }, { 0x31526, 0x05D1, NES_SOUND }, + { 0x31526, 0x05D1, NES_SOUND }, { 0x31AF7, 0x0011, NES_SOUND }, { 0x13F63, 0x000A, NES_SOUND }, { 0x2FF00, 0x0075, NES_SOUND }, { 0x1FF60, 0x001F, NES_SOUND }, + { 0x31B08, 0x098E, NES_SOUND }, { 0x311D9, 0x004B, NES_SOUND }, { 0x32496, 0x0011, NES_SOUND }, { 0x2F671, 0x0832, NES_SOUND }, { 0x324A7, 0x000F, NES_SOUND }, + { 0x324B6, 0x002F, NES_SOUND }, { 0x324E5, 0x001D, NES_SOUND }, { 0x32502, 0x0018, NES_SOUND }, { 0x3251A, 0x0016, NES_SOUND }, { 0x32530, 0x001B, NES_SOUND }, + { 0x3254B, 0x0088, NES_SOUND }, { 0x325D3, 0x0065, NES_SOUND }, { 0x32638, 0x0065, NES_SOUND }, { 0x3269D, 0x0073, NES_SOUND }, { 0x32710, 0x00F9, NES_SOUND }, + { 0x32809, 0x049E, NES_SOUND }, { 0x32CA7, 0x0EA8, NES_SOUND }, { 0x34001, 0x0B18, NES_SOUND }, { 0x34B19, 0x0B9C, NES_SOUND }, { 0x356B5, 0x0C6B, NES_SOUND }, + { 0x36320, 0x0E56, NES_SOUND }, { 0x37176, 0x0C70, NES_SOUND }, { 0x38001, 0x0DEC, NES_SOUND }, { 0x38DED, 0x0B77, NES_SOUND }, { 0x33B4F, 0x042F, NES_SOUND }, + { 0x39964, 0x0AC5, NES_SOUND }, { 0x3A429, 0x0BE4, NES_SOUND } +}; + +static const ScummNESFile::Resource *res_sounds[ScummNESFile::kROMsetNum] = { + res_sounds_usa, + res_sounds_eur, + res_sounds_swe, + res_sounds_fra, + res_sounds_ger, + res_sounds_esp, +}; + +static const ScummNESFile::Resource res_costumes_usa[25] = { + { 0x17F05, 0x0055, NES_COSTUME }, { 0x17F05, 0x0055, NES_COSTUME }, { 0x17F05, 0x0055, NES_COSTUME }, { 0x17F05, 0x0055, NES_COSTUME }, { 0x17F05, 0x0055, NES_COSTUME }, + { 0x17F05, 0x0055, NES_COSTUME }, { 0x17F05, 0x0055, NES_COSTUME }, { 0x17F05, 0x0055, NES_COSTUME }, { 0x13FAB, 0x004B, NES_COSTUME }, { 0x17F05, 0x0055, NES_COSTUME }, + { 0x17F05, 0x0055, NES_COSTUME }, { 0x17F05, 0x0055, NES_COSTUME }, { 0x17F5A, 0x0036, NES_COSTUME }, { 0x17F90, 0x003A, NES_COSTUME }, { 0x17F90, 0x003A, NES_COSTUME }, + { 0x17F05, 0x0055, NES_COSTUME }, { 0x1BF87, 0x003B, NES_COSTUME }, { 0x17F05, 0x0055, NES_COSTUME }, { 0x23FA9, 0x0045, NES_COSTUME }, { 0x1FFBD, 0x0040, NES_COSTUME }, + { 0x1BFC2, 0x003C, NES_COSTUME }, { 0x17F90, 0x003A, NES_COSTUME }, { 0x17F90, 0x003A, NES_COSTUME }, { 0x17F05, 0x0055, NES_COSTUME }, { 0x13FAB, 0x004B, NES_COSTUME } +}; +static const ScummNESFile::Resource res_costumes_eur[25] = { + { 0x0BEFF, 0x0055, NES_COSTUME }, { 0x0BEFF, 0x0055, NES_COSTUME }, { 0x0BEFF, 0x0055, NES_COSTUME }, { 0x0BEFF, 0x0055, NES_COSTUME }, { 0x0BEFF, 0x0055, NES_COSTUME }, + { 0x0BEFF, 0x0055, NES_COSTUME }, { 0x0BEFF, 0x0055, NES_COSTUME }, { 0x0BEFF, 0x0055, NES_COSTUME }, { 0x0FEA2, 0x004B, NES_COSTUME }, { 0x0BEFF, 0x0055, NES_COSTUME }, + { 0x0BEFF, 0x0055, NES_COSTUME }, { 0x0BEFF, 0x0055, NES_COSTUME }, { 0x0FEED, 0x0036, NES_COSTUME }, { 0x0FF23, 0x003A, NES_COSTUME }, { 0x0FF23, 0x003A, NES_COSTUME }, + { 0x0BEFF, 0x0055, NES_COSTUME }, { 0x13F13, 0x003B, NES_COSTUME }, { 0x0BEFF, 0x0055, NES_COSTUME }, { 0x23F2F, 0x0045, NES_COSTUME }, { 0x1FF3E, 0x0040, NES_COSTUME }, + { 0x27E8F, 0x003C, NES_COSTUME }, { 0x0FF23, 0x003A, NES_COSTUME }, { 0x0FF23, 0x003A, NES_COSTUME }, { 0x0BEFF, 0x0055, NES_COSTUME }, { 0x0FEA2, 0x004B, NES_COSTUME } +}; +static const ScummNESFile::Resource res_costumes_swe[25] = { + { 0x0FEF5, 0x0055, NES_COSTUME }, { 0x0FEF5, 0x0055, NES_COSTUME }, { 0x0FEF5, 0x0055, NES_COSTUME }, { 0x0FEF5, 0x0055, NES_COSTUME }, { 0x0FEF5, 0x0055, NES_COSTUME }, + { 0x0FEF5, 0x0055, NES_COSTUME }, { 0x0FEF5, 0x0055, NES_COSTUME }, { 0x0FEF5, 0x0055, NES_COSTUME }, { 0x17E9A, 0x004B, NES_COSTUME }, { 0x0FEF5, 0x0055, NES_COSTUME }, + { 0x0FEF5, 0x0055, NES_COSTUME }, { 0x0FEF5, 0x0055, NES_COSTUME }, { 0x0FF4A, 0x0036, NES_COSTUME }, { 0x17EE5, 0x003A, NES_COSTUME }, { 0x17EE5, 0x003A, NES_COSTUME }, + { 0x0FEF5, 0x0055, NES_COSTUME }, { 0x17F1F, 0x003B, NES_COSTUME }, { 0x0FEF5, 0x0055, NES_COSTUME }, { 0x1BE94, 0x0045, NES_COSTUME }, { 0x1BED9, 0x0040, NES_COSTUME }, + { 0x1BF19, 0x003C, NES_COSTUME }, { 0x17EE5, 0x003A, NES_COSTUME }, { 0x17EE5, 0x003A, NES_COSTUME }, { 0x0FEF5, 0x0055, NES_COSTUME }, { 0x17E9A, 0x004B, NES_COSTUME } +}; +static const ScummNESFile::Resource res_costumes_fra[25] = { + { 0x0BF17, 0x0055, NES_COSTUME }, { 0x0BF17, 0x0055, NES_COSTUME }, { 0x0BF17, 0x0055, NES_COSTUME }, { 0x0BF17, 0x0055, NES_COSTUME }, { 0x0BF17, 0x0055, NES_COSTUME }, + { 0x0BF17, 0x0055, NES_COSTUME }, { 0x0BF17, 0x0055, NES_COSTUME }, { 0x0BF17, 0x0055, NES_COSTUME }, { 0x13E77, 0x004B, NES_COSTUME }, { 0x0BF17, 0x0055, NES_COSTUME }, + { 0x0BF17, 0x0055, NES_COSTUME }, { 0x0BF17, 0x0055, NES_COSTUME }, { 0x07F3E, 0x0036, NES_COSTUME }, { 0x13EC2, 0x003A, NES_COSTUME }, { 0x13EC2, 0x003A, NES_COSTUME }, + { 0x0BF17, 0x0055, NES_COSTUME }, { 0x13EFC, 0x003B, NES_COSTUME }, { 0x0BF17, 0x0055, NES_COSTUME }, { 0x13F37, 0x0045, NES_COSTUME }, { 0x17E94, 0x0040, NES_COSTUME }, + { 0x17ED4, 0x003C, NES_COSTUME }, { 0x13EC2, 0x003A, NES_COSTUME }, { 0x13EC2, 0x003A, NES_COSTUME }, { 0x0BF17, 0x0055, NES_COSTUME }, { 0x13E77, 0x004B, NES_COSTUME } +}; +static const ScummNESFile::Resource res_costumes_ger[25] = { + { 0x0FEEB, 0x0055, NES_COSTUME }, { 0x0FEEB, 0x0055, NES_COSTUME }, { 0x0FEEB, 0x0055, NES_COSTUME }, { 0x0FEEB, 0x0055, NES_COSTUME }, { 0x0FEEB, 0x0055, NES_COSTUME }, + { 0x0FEEB, 0x0055, NES_COSTUME }, { 0x0FEEB, 0x0055, NES_COSTUME }, { 0x0FEEB, 0x0055, NES_COSTUME }, { 0x17E6C, 0x004B, NES_COSTUME }, { 0x0FEEB, 0x0055, NES_COSTUME }, + { 0x0FEEB, 0x0055, NES_COSTUME }, { 0x0FEEB, 0x0055, NES_COSTUME }, { 0x0FF40, 0x0036, NES_COSTUME }, { 0x17EB7, 0x003A, NES_COSTUME }, { 0x17EB7, 0x003A, NES_COSTUME }, + { 0x0FEEB, 0x0055, NES_COSTUME }, { 0x17EF1, 0x003B, NES_COSTUME }, { 0x0FEEB, 0x0055, NES_COSTUME }, { 0x17F2C, 0x0045, NES_COSTUME }, { 0x1FEFD, 0x0040, NES_COSTUME }, + { 0x1FF3D, 0x003C, NES_COSTUME }, { 0x17EB7, 0x003A, NES_COSTUME }, { 0x17EB7, 0x003A, NES_COSTUME }, { 0x0FEEB, 0x0055, NES_COSTUME }, { 0x17E6C, 0x004B, NES_COSTUME } +}; +static const ScummNESFile::Resource res_costumes_esp[25] = { + { 0x0FEF1, 0x0055, NES_COSTUME }, { 0x0FEF1, 0x0055, NES_COSTUME }, { 0x0FEF1, 0x0055, NES_COSTUME }, { 0x0FEF1, 0x0055, NES_COSTUME }, { 0x0FEF1, 0x0055, NES_COSTUME }, + { 0x0FEF1, 0x0055, NES_COSTUME }, { 0x0FEF1, 0x0055, NES_COSTUME }, { 0x0FEF1, 0x0055, NES_COSTUME }, { 0x13EA3, 0x004B, NES_COSTUME }, { 0x0FEF1, 0x0055, NES_COSTUME }, + { 0x0FEF1, 0x0055, NES_COSTUME }, { 0x0FEF1, 0x0055, NES_COSTUME }, { 0x0FF46, 0x0036, NES_COSTUME }, { 0x13EEE, 0x003A, NES_COSTUME }, { 0x13EEE, 0x003A, NES_COSTUME }, + { 0x0FEF1, 0x0055, NES_COSTUME }, { 0x13F28, 0x003B, NES_COSTUME }, { 0x0FEF1, 0x0055, NES_COSTUME }, { 0x17F2A, 0x0045, NES_COSTUME }, { 0x1FE71, 0x0040, NES_COSTUME }, + { 0x1FEB1, 0x003C, NES_COSTUME }, { 0x13EEE, 0x003A, NES_COSTUME }, { 0x13EEE, 0x003A, NES_COSTUME }, { 0x0FEF1, 0x0055, NES_COSTUME }, { 0x13EA3, 0x004B, NES_COSTUME } +}; + +static const ScummNESFile::Resource *res_costumes[ScummNESFile::kROMsetNum] = { + res_costumes_usa, + res_costumes_eur, + res_costumes_swe, + res_costumes_fra, + res_costumes_ger, + res_costumes_esp, +}; + +static const ScummNESFile::Resource res_globdata_usa[1] = { { 0x2CA11, 0x0307, NES_GLOBDATA } }; +static const ScummNESFile::Resource res_globdata_eur[1] = { { 0x2CA11, 0x0307, NES_GLOBDATA } }; +static const ScummNESFile::Resource res_globdata_swe[1] = { { 0x2C001, 0x0307, NES_GLOBDATA } }; +static const ScummNESFile::Resource res_globdata_fra[1] = { { 0x2C628, 0x0307, NES_GLOBDATA } }; +static const ScummNESFile::Resource res_globdata_ger[1] = { { 0x2C4EE, 0x0307, NES_GLOBDATA } }; +static const ScummNESFile::Resource res_globdata_esp[1] = { { 0x2C001, 0x0307, NES_GLOBDATA } }; + +static const ScummNESFile::Resource *res_globdata[ScummNESFile::kROMsetNum] = { + res_globdata_usa, + res_globdata_eur, + res_globdata_swe, + res_globdata_fra, + res_globdata_ger, + res_globdata_esp, +}; + +// sprite palette data +static const ScummNESFile::Resource res_sprpals_usa[2] = { { 0x0BFC1, 0x0010, NES_SPRPALS }, { 0x0BFD1, 0x0010, NES_SPRPALS } }; +static const ScummNESFile::Resource res_sprpals_eur[2] = { { 0x07F61, 0x0010, NES_SPRPALS }, { 0x0BEB2, 0x0010, NES_SPRPALS } }; +static const ScummNESFile::Resource res_sprpals_swe[2] = { { 0x07F55, 0x0010, NES_SPRPALS }, { 0x07F65, 0x0010, NES_SPRPALS } }; +static const ScummNESFile::Resource res_sprpals_fra[2] = { { 0x07ED8, 0x0010, NES_SPRPALS }, { 0x07EE8, 0x0010, NES_SPRPALS } }; +static const ScummNESFile::Resource res_sprpals_ger[2] = { { 0x07F6B, 0x0010, NES_SPRPALS }, { 0x0BF17, 0x0010, NES_SPRPALS } }; +static const ScummNESFile::Resource res_sprpals_esp[2] = { { 0x0BF15, 0x0010, NES_SPRPALS }, { 0x0BF25, 0x0010, NES_SPRPALS } }; + +static const ScummNESFile::Resource *res_sprpals[ScummNESFile::kROMsetNum] = { + res_sprpals_usa, + res_sprpals_eur, + res_sprpals_swe, + res_sprpals_fra, + res_sprpals_ger, + res_sprpals_esp, +}; + +// associates costume IDs with sprite sets (indexes into SPRLENS/SPROFFS) +static const ScummNESFile::Resource res_sprdesc_usa[2] = { { 0x0FFB7, 0x0031, NES_SPRDESC }, { 0x0BFE1, 0x0009, NES_SPRDESC } }; +static const ScummNESFile::Resource res_sprdesc_eur[2] = { { 0x0BEC2, 0x0031, NES_SPRDESC }, { 0x07F71, 0x0009, NES_SPRDESC } }; +static const ScummNESFile::Resource res_sprdesc_swe[2] = { { 0x0BF1B, 0x0031, NES_SPRDESC }, { 0x07F75, 0x0009, NES_SPRDESC } }; +static const ScummNESFile::Resource res_sprdesc_fra[2] = { { 0x07EF8, 0x0031, NES_SPRDESC }, { 0x07F29, 0x0009, NES_SPRDESC } }; +static const ScummNESFile::Resource res_sprdesc_ger[2] = { { 0x0BF27, 0x0031, NES_SPRDESC }, { 0x0BF58, 0x0009, NES_SPRDESC } }; +static const ScummNESFile::Resource res_sprdesc_esp[2] = { { 0x0BF35, 0x0031, NES_SPRDESC }, { 0x0BF66, 0x0009, NES_SPRDESC } }; + +static const ScummNESFile::Resource *res_sprdesc[ScummNESFile::kROMsetNum] = { + res_sprdesc_usa, + res_sprdesc_eur, + res_sprdesc_swe, + res_sprdesc_fra, + res_sprdesc_ger, + res_sprdesc_esp, +}; + +// number of sprites in each set (indicates length within SPRDATA) +static const ScummNESFile::Resource res_sprlens_usa[2] = { { 0x0FEA2, 0x0115, NES_SPRLENS }, { 0x07FF5, 0x0006, NES_SPRLENS } }; +static const ScummNESFile::Resource res_sprlens_eur[2] = { { 0x1BE32, 0x0115, NES_SPRLENS }, { 0x07F5B, 0x0006, NES_SPRLENS } }; +static const ScummNESFile::Resource res_sprlens_swe[2] = { { 0x13E6A, 0x0115, NES_SPRLENS }, { 0x07F4F, 0x0006, NES_SPRLENS } }; +static const ScummNESFile::Resource res_sprlens_fra[2] = { { 0x0FE61, 0x0115, NES_SPRLENS }, { 0x07ED2, 0x0006, NES_SPRLENS } }; +static const ScummNESFile::Resource res_sprlens_ger[2] = { { 0x2BE1A, 0x0115, NES_SPRLENS }, { 0x07F65, 0x0006, NES_SPRLENS } }; +static const ScummNESFile::Resource res_sprlens_esp[2] = { { 0x2EFE1, 0x0115, NES_SPRLENS }, { 0x07F7A, 0x0006, NES_SPRLENS } }; + +static const ScummNESFile::Resource *res_sprlens[ScummNESFile::kROMsetNum] = { + res_sprlens_usa, + res_sprlens_eur, + res_sprlens_swe, + res_sprlens_fra, + res_sprlens_ger, + res_sprlens_esp, +}; + +// offset of each sprite set (indexes into SPRDATA) +static const ScummNESFile::Resource res_sproffs_usa[2] = { { 0x2BDC5, 0x022A, NES_SPROFFS }, { 0x0BFEA, 0x000C, NES_SPROFFS } }; +static const ScummNESFile::Resource res_sproffs_eur[2] = { { 0x2FD42, 0x022A, NES_SPROFFS }, { 0x0BEF3, 0x000C, NES_SPROFFS } }; +static const ScummNESFile::Resource res_sproffs_swe[2] = { { 0x2BCE0, 0x022A, NES_SPROFFS }, { 0x0BF4C, 0x000C, NES_SPROFFS } }; +static const ScummNESFile::Resource res_sproffs_fra[2] = { { 0x2F959, 0x022A, NES_SPROFFS }, { 0x07F32, 0x000C, NES_SPROFFS } }; +static const ScummNESFile::Resource res_sproffs_ger[2] = { { 0x2F81F, 0x022A, NES_SPROFFS }, { 0x0BF61, 0x000C, NES_SPROFFS } }; +static const ScummNESFile::Resource res_sproffs_esp[2] = { { 0x2F447, 0x022A, NES_SPROFFS }, { 0x0BF6F, 0x000C, NES_SPROFFS } }; + +static const ScummNESFile::Resource *res_sproffs[ScummNESFile::kROMsetNum] = { + res_sproffs_usa, + res_sproffs_eur, + res_sproffs_swe, + res_sproffs_fra, + res_sproffs_ger, + res_sproffs_esp, +}; + +// sprite data sets (packed NES sprite data) +static const ScummNESFile::Resource res_sprdata_usa[2] = { { 0x2CE11, 0x2BE0, NES_SPRDATA }, { 0x07F6B, 0x008A, NES_SPRDATA } }; +static const ScummNESFile::Resource res_sprdata_eur[2] = { { 0x2CE11, 0x2BE0, NES_SPRDATA }, { 0x0BE28, 0x008A, NES_SPRDATA } }; +static const ScummNESFile::Resource res_sprdata_swe[2] = { { 0x2C401, 0x2BE0, NES_SPRDATA }, { 0x0FE6B, 0x008A, NES_SPRDATA } }; +static const ScummNESFile::Resource res_sprdata_fra[2] = { { 0x2CA28, 0x2BE0, NES_SPRDATA }, { 0x07E48, 0x008A, NES_SPRDATA } }; +static const ScummNESFile::Resource res_sprdata_ger[2] = { { 0x2C8EE, 0x2BE0, NES_SPRDATA }, { 0x0FE61, 0x008A, NES_SPRDATA } }; +static const ScummNESFile::Resource res_sprdata_esp[2] = { { 0x2C401, 0x2BE0, NES_SPRDATA }, { 0x0FE67, 0x008A, NES_SPRDATA } }; +static const ScummNESFile::Resource *res_sprdata[ScummNESFile::kROMsetNum] = { + res_sprdata_usa, + res_sprdata_eur, + res_sprdata_swe, + res_sprdata_fra, + res_sprdata_ger, + res_sprdata_esp, +}; + +static const ScummNESFile::Resource res_charset_usa[1] = { { 0x3F6EE, 0x0090, NES_CHARSET } }; +static const ScummNESFile::Resource res_charset_eur[1] = { { 0x3F724, 0x0090, NES_CHARSET } }; +static const ScummNESFile::Resource res_charset_swe[1] = { { 0x3F739, 0x0090, NES_CHARSET } }; +static const ScummNESFile::Resource res_charset_fra[1] = { { 0x3F739, 0x0090, NES_CHARSET } }; +static const ScummNESFile::Resource res_charset_ger[1] = { { 0x3F739, 0x0090, NES_CHARSET } }; +static const ScummNESFile::Resource res_charset_esp[1] = { { 0x3F739, 0x0090, NES_CHARSET } }; + +static const ScummNESFile::Resource *res_charset[ScummNESFile::kROMsetNum] = { + res_charset_usa, + res_charset_eur, + res_charset_swe, + res_charset_fra, + res_charset_ger, + res_charset_esp, +}; + +static const ScummNESFile::Resource res_preplist_usa[1] = { { 0x3FB5A, 0x000E, NES_PREPLIST } }; +static const ScummNESFile::Resource res_preplist_eur[1] = { { 0x3FB90, 0x000E, NES_PREPLIST } }; +static const ScummNESFile::Resource res_preplist_swe[1] = { { 0x3FBA9, 0x000E, NES_PREPLIST } }; +static const ScummNESFile::Resource res_preplist_fra[1] = { { 0x3FBAF, 0x0010, NES_PREPLIST } }; +static const ScummNESFile::Resource res_preplist_ger[1] = { { 0x3FBAB, 0x000F, NES_PREPLIST } }; +static const ScummNESFile::Resource res_preplist_esp[1] = { { 0x3FBAE, 0x000F, NES_PREPLIST } }; + +static const ScummNESFile::Resource *res_preplist[ScummNESFile::kROMsetNum] = { + res_preplist_usa, + res_preplist_eur, + res_preplist_swe, + res_preplist_fra, + res_preplist_ger, + res_preplist_esp, +}; + +static uint16 write_byte(Common::WriteStream *out, byte val) { + val ^= 0xFF; + if (out != 0) + out->writeByte(val); + return 1; +} + +static uint16 write_word(Common::WriteStream *out, uint16 val) { + val ^= 0xFFFF; + if (out != 0) + out->writeUint16LE(val); + return 2; +} + +byte ScummNESFile::fileReadByte() { + byte b = 0; + File::read(&b, 1); + return b; +} + +uint16 ScummNESFile::fileReadUint16LE() { + uint16 a = fileReadByte(); + uint16 b = fileReadByte(); + return a | (b << 8); +} + +uint16 ScummNESFile::extractResource(Common::WriteStream *output, const Resource *res) { + uint16 len, i, j; + byte val; + byte cnt; + uint16 reslen = 0; + + if (res == NULL) + error("extract_resource - no resource specified"); + + if ((res->offset == 0) && (res->length == 0)) + return 0; /* there are 8 scripts that are zero bytes long, so we should skip them */ + + File::seek(res->offset,SEEK_SET); + + switch (res->type) { + case NES_GLOBDATA: + len = res->length; + + for (i = 0; i < len; i++) + reslen += write_byte(output, fileReadByte()); + + break; + + case NES_ROOMGFX: + case NES_COSTUMEGFX: + reslen += write_word(output, (uint16)(res->length + 2)); + len = fileReadByte(); + reslen += write_byte(output, (byte)len); + + if (!len) + len = 256; + len = len << 4; + + for (i = 0; i < len;) { + reslen += write_byte(output, cnt = fileReadByte()); + for (j = 0; j < (cnt & 0x7F); j++, i++) + if ((cnt & 0x80) || (j == 0)) + reslen += write_byte(output, fileReadByte()); + } + + if (File::pos() - res->offset != res->length) + error("extract_resource - length mismatch while extracting graphics resource (was %04X, should be %04X)", File::pos() - res->offset, res->length); + + break; + + case NES_ROOM: + case NES_SCRIPT: + len = fileReadUint16LE(); + + if (len != res->length) + error("extract_resource - length mismatch while extracting room/script resource (was %04X, should be %04X)", len, res->length); + + File::seek(-2, SEEK_CUR); + + for (i = 0; i < len; i++) + reslen += write_byte(output, fileReadByte()); + + break; + + case NES_SOUND: + len = res->length + 2; + val = fileReadByte(); + cnt = fileReadByte(); + + if ((val == 2) && (cnt == 100)) { + reslen += write_word(output, len); + reslen += write_byte(output, val); + reslen += write_byte(output, cnt); + + cnt = fileReadByte(); + reslen += write_byte(output, cnt); + for (i = 0; i < cnt; i++) + reslen += write_byte(output, fileReadByte()); + for (i = 0; i < cnt; i++) + reslen += write_byte(output, fileReadByte()); + + while (1) { + reslen += write_byte(output, val = fileReadByte()); + if (val >= 0xFE) + break; + } + } else if (((val == 0) || (val == 1) || (val == 4)) && (cnt == 10)) { + reslen += write_word(output, len); + reslen += write_byte(output, val); + reslen += write_byte(output, cnt); + while (1) { + reslen += write_byte(output, val = fileReadByte()); + + if (val >= 0xFE) + break; + + if (val >= 0x10) + reslen += write_byte(output, fileReadByte()); + else { + reslen += write_byte(output, fileReadByte()); + reslen += write_byte(output, fileReadByte()); + reslen += write_byte(output, fileReadByte()); + reslen += write_byte(output, fileReadByte()); + } + } + } else + error("extract_resource - unknown sound type %d/%d detected",val,cnt); + + if (File::pos() - res->offset != res->length) + error("extract_resource - length mismatch while extracting sound resource (was %04X, should be %04X)", File::pos() - res->offset, res->length); + + break; + + case NES_COSTUME: + case NES_SPRPALS: + case NES_SPRDESC: + case NES_SPRLENS: + case NES_SPROFFS: + case NES_SPRDATA: + case NES_CHARSET: + len = res->length; + reslen += write_word(output, (uint16)(len + 2)); + + for (i = 0; i < len; i++) + reslen += write_byte(output, fileReadByte()); + + break; + + case NES_PREPLIST: + len = res->length; + reslen += write_word(output, 0x002A); + + reslen += write_byte(output, ' '); + for (i = 1; i < 8; i++) + reslen += write_byte(output, 0); + + for (j = 0; j < 4; j++) { + reslen += write_byte(output,' '); + for (i = 1; (val = fileReadByte()); i++) + reslen += write_byte(output, val); + for (; i < 8; i++) + reslen += write_byte(output, 0); + } + break; + + default: + error("extract_resource - unknown resource type %d specified!", res->type); + } + + return reslen; +} + +struct ScummNESFile::LFLEntry { + const Resource **type; + int index; +}; + +// based on structure of Classic PC Maniac Mansion LFL files +// (roomgfx resources are arranged in order, one per file, +// after the room blocks) +static const ScummNESFile::LFLEntry lfl_01[] = { {res_rooms, 1}, {res_roomgfx, 1}, {res_scripts, 57}, {res_scripts, 61}, {res_scripts, 76}, {res_scripts, 105}, {res_scripts, 111}, {res_sounds, 5}, {res_scripts, 132}, {res_scripts, 148}, {res_scripts, 155}, {res_scripts, 156}, {res_sounds, 39}, {NULL, 0} }; +static const ScummNESFile::LFLEntry lfl_02[] = { {res_rooms, 2}, {res_roomgfx, 2}, {NULL, 0} }; +static const ScummNESFile::LFLEntry lfl_03[] = { {res_rooms, 3}, {res_roomgfx, 3}, {res_scripts, 21}, {res_sounds, 26}, {NULL, 0} }; +static const ScummNESFile::LFLEntry lfl_04[] = { {res_rooms, 4}, {res_roomgfx, 4}, {res_scripts, 46}, {res_scripts, 56}, {res_scripts, 137}, {res_scripts, 146}, {res_sounds, 12}, {res_sounds, 11}, {res_sounds, 13}, {res_sounds, 42}, {NULL, 0} }; +static const ScummNESFile::LFLEntry lfl_05[] = { {res_rooms, 5}, {res_roomgfx, 5}, {res_scripts, 30}, {res_scripts, 31}, {res_scripts, 32}, {res_scripts, 33}, {res_scripts, 34}, {res_scripts, 35}, {res_sounds, 22}, {res_sounds, 23}, {res_sounds, 24}, {res_sounds, 21}, {res_sounds, 46}, {NULL, 0} }; +static const ScummNESFile::LFLEntry lfl_06[] = { {res_rooms, 6}, {res_roomgfx, 6}, {NULL, 0} }; +static const ScummNESFile::LFLEntry lfl_07[] = { {res_rooms, 7}, {res_roomgfx, 7}, {res_scripts, 17}, {res_scripts, 58}, {res_scripts, 59}, {res_scripts, 60}, {res_scripts, 74}, {res_scripts, 81}, {res_scripts, 82}, {res_scripts, 150}, {res_sounds, 14}, {res_sounds, 15}, {res_sounds, 16}, {res_sounds, 17}, {NULL, 0} }; +static const ScummNESFile::LFLEntry lfl_08[] = { {res_rooms, 8}, {res_roomgfx, 8}, {res_scripts, 7}, {res_scripts, 12}, {res_scripts, 13}, {res_scripts, 47}, {res_scripts, 48}, {res_scripts, 49}, {res_scripts, 154}, {res_sounds, 32}, {res_sounds, 33}, {res_sounds, 36}, {NULL, 0} }; +static const ScummNESFile::LFLEntry lfl_09[] = { {res_rooms, 9}, {res_roomgfx, 9}, {res_scripts, 10}, {res_scripts, 11}, {res_scripts, 45}, {res_scripts, 55}, {res_scripts, 84}, {res_scripts, 85}, {res_scripts, 86}, {NULL, 0} }; +static const ScummNESFile::LFLEntry lfl_10[] = { {res_rooms, 10}, {res_roomgfx, 10}, {res_scripts, 24}, {res_scripts, 149}, {res_sounds, 28}, {NULL, 0} }; +static const ScummNESFile::LFLEntry lfl_11[] = { {res_rooms, 11}, {res_roomgfx, 11}, {res_scripts, 166}, {res_scripts, 167}, {res_scripts, 168}, {NULL, 0} }; +static const ScummNESFile::LFLEntry lfl_12[] = { {res_rooms, 12}, {res_roomgfx, 12}, {res_scripts, 51}, {res_scripts, 103}, {res_scripts, 104}, {res_scripts, 161}, {res_sounds, 63}, {res_costumes, 14}, {NULL, 0} }; +static const ScummNESFile::LFLEntry lfl_13[] = { {res_rooms, 13}, {res_roomgfx, 13}, {NULL, 0} }; +static const ScummNESFile::LFLEntry lfl_14[] = { {res_rooms, 14}, {res_roomgfx, 14}, {NULL, 0} }; +static const ScummNESFile::LFLEntry lfl_15[] = { {res_rooms, 15}, {res_roomgfx, 15}, {res_sounds, 27}, {NULL, 0} }; +static const ScummNESFile::LFLEntry lfl_16[] = { {res_rooms, 16}, {res_roomgfx, 16}, {res_scripts, 14}, {res_scripts, 121}, {res_scripts, 122}, {res_sounds, 40}, {res_sounds, 64}, {res_sounds, 68}, {NULL, 0} }; +static const ScummNESFile::LFLEntry lfl_17[] = { {res_rooms, 17}, {res_roomgfx, 17}, {res_scripts, 20}, {res_scripts, 100}, {res_sounds, 25}, {res_sounds, 44}, {res_sounds, 2}, {res_sounds, 50}, {res_sounds, 52}, {NULL, 0} }; +static const ScummNESFile::LFLEntry lfl_18[] = { {res_rooms, 18}, {res_roomgfx, 18}, {res_scripts, 25}, {res_scripts, 26}, {res_scripts, 27}, {res_scripts, 28}, {res_scripts, 64}, {res_scripts, 65}, {res_scripts, 66}, {res_scripts, 67}, {res_scripts, 68}, {res_scripts, 69}, {res_scripts, 70}, {res_scripts, 71}, {res_scripts, 73}, {res_scripts, 101}, {res_sounds, 35}, {NULL, 0} }; +static const ScummNESFile::LFLEntry lfl_19[] = { {res_rooms, 19}, {res_roomgfx, 19}, {res_scripts, 36}, {res_scripts, 37}, {res_scripts, 38}, {res_scripts, 39}, {res_scripts, 40}, {res_scripts, 152}, {res_scripts, 153}, {res_costumes, 10}, {NULL, 0} }; +static const ScummNESFile::LFLEntry lfl_20[] = { {res_rooms, 20}, {res_roomgfx, 20}, {res_scripts, 107}, {res_scripts, 108}, {res_scripts, 109}, {res_scripts, 110}, {res_scripts, 159}, {NULL, 0} }; +static const ScummNESFile::LFLEntry lfl_21[] = { {res_rooms, 21}, {res_roomgfx, 21}, {res_scripts, 41}, {res_scripts, 42}, {res_scripts, 43}, {res_scripts, 53}, {res_scripts, 136}, {res_sounds, 29}, {res_sounds, 20}, {res_sounds, 37}, {NULL, 0} }; +static const ScummNESFile::LFLEntry lfl_22[] = { {res_rooms, 22}, {res_roomgfx, 22}, {res_scripts, 15}, {NULL, 0} }; +static const ScummNESFile::LFLEntry lfl_23[] = { {res_rooms, 23}, {res_roomgfx, 23}, {res_scripts, 77}, {res_scripts, 79}, {res_scripts, 80}, {res_scripts, 83}, {res_sounds, 41}, {NULL, 0} }; +static const ScummNESFile::LFLEntry lfl_24[] = { {res_rooms, 24}, {res_roomgfx, 24}, {res_scripts, 18}, {res_scripts, 19}, {res_scripts, 78}, {res_sounds, 7}, {res_sounds, 3}, {res_sounds, 18}, {res_sounds, 34}, {res_costumes, 12}, {NULL, 0} }; +static const ScummNESFile::LFLEntry lfl_25[] = { {res_rooms, 25}, {res_roomgfx, 25}, {res_scripts, 29}, {res_sounds, 30}, {res_sounds, 31}, {NULL, 0} }; +static const ScummNESFile::LFLEntry lfl_26[] = { {res_rooms, 26}, {res_roomgfx, 26}, {res_scripts, 87}, {res_scripts, 88}, {res_scripts, 89}, {res_scripts, 90}, {res_scripts, 91}, {res_scripts, 92}, {res_scripts, 93}, {res_scripts, 94}, {res_scripts, 95}, {res_scripts, 96}, {res_scripts, 97}, {res_scripts, 98}, {res_scripts, 116}, {res_scripts, 151}, {res_scripts, 174}, {res_costumes, 11}, {NULL, 0} }; +static const ScummNESFile::LFLEntry lfl_27[] = { {res_rooms, 27}, {res_roomgfx, 27}, {res_scripts, 16}, {res_scripts, 52}, {res_scripts, 54}, {res_scripts, 113}, {res_sounds, 45}, {res_costumes, 19}, {NULL, 0} }; +static const ScummNESFile::LFLEntry lfl_28[] = { {res_rooms, 28}, {res_roomgfx, 28}, {res_scripts, 22}, {res_scripts, 23}, {NULL, 0} }; +static const ScummNESFile::LFLEntry lfl_29[] = { {res_rooms, 29}, {res_roomgfx, 29}, {res_scripts, 75}, {res_sounds, 43}, {NULL, 0} }; +static const ScummNESFile::LFLEntry lfl_30[] = { {res_rooms, 30}, {res_roomgfx, 30}, {res_scripts, 63}, {res_sounds, 0}, {res_scripts, 123}, {res_scripts, 125}, {res_scripts, 126}, {res_scripts, 127}, {res_scripts, 129}, {res_sounds, 55}, {res_sounds, 59}, {res_sounds, 60}, {res_costumes, 8}, {NULL, 0} }; +static const ScummNESFile::LFLEntry lfl_31[] = { {res_rooms, 31}, {res_roomgfx, 31}, {res_scripts, 99}, {res_scripts, 115}, {res_scripts, 117}, {res_scripts, 119}, {res_scripts, 147}, {res_scripts, 157}, {res_scripts, 158}, {res_scripts, 160}, {res_costumes, 13}, {res_costumes, 9}, {res_costumes, 23}, {res_costumes, 24}, {NULL, 0} }; +static const ScummNESFile::LFLEntry lfl_32[] = { {res_rooms, 32}, {res_roomgfx, 32}, {res_costumes, 15}, {NULL, 0} }; +static const ScummNESFile::LFLEntry lfl_33[] = { {res_rooms, 33}, {res_roomgfx, 33}, {res_scripts, 120}, {res_scripts, 135}, {res_sounds, 56}, {res_sounds, 57}, {res_sounds, 58}, {res_sounds, 1}, {res_costumes, 22}, {NULL, 0} }; +static const ScummNESFile::LFLEntry lfl_34[] = { {res_rooms, 34}, {res_roomgfx, 34}, {NULL, 0} }; +static const ScummNESFile::LFLEntry lfl_35[] = { {res_rooms, 35}, {res_roomgfx, 35}, {NULL, 0} }; +static const ScummNESFile::LFLEntry lfl_36[] = { {res_rooms, 36}, {res_roomgfx, 36}, {res_sounds, 10}, {res_sounds, 4}, {NULL, 0} }; +static const ScummNESFile::LFLEntry lfl_37[] = { {res_rooms, 37}, {res_roomgfx, 37}, {NULL, 0} }; +static const ScummNESFile::LFLEntry lfl_38[] = { {res_rooms, 38}, {res_roomgfx, 38}, {res_scripts, 138}, {res_scripts, 139}, {res_scripts, 140}, {res_scripts, 141}, {res_scripts, 142}, {res_scripts, 143}, {res_scripts, 144}, {res_scripts, 145}, {NULL, 0} }; +static const ScummNESFile::LFLEntry lfl_39[] = { {res_rooms, 39}, {res_roomgfx, 39}, {NULL, 0} }; +static const ScummNESFile::LFLEntry lfl_40[] = { {res_rooms, 40}, {res_roomgfx, 0}, {res_scripts, 112}, {res_costumes, 17}, {NULL, 0} }; +static const ScummNESFile::LFLEntry lfl_41[] = { {res_rooms, 41}, {res_scripts, 106}, {res_sounds, 47}, {res_sounds, 48}, {res_sounds, 53}, {res_sounds, 49}, {res_sounds, 51}, {NULL, 0} }; +static const ScummNESFile::LFLEntry lfl_42[] = { {res_rooms, 42}, {res_scripts, 124}, {res_costumes, 18}, {NULL, 0} }; +static const ScummNESFile::LFLEntry lfl_43[] = { {res_rooms, 43}, {res_scripts, 44}, {res_sounds, 19}, {NULL, 0} }; +static const ScummNESFile::LFLEntry lfl_44[] = { {res_rooms, 44}, {res_scripts, 102}, {res_sounds, 6}, {res_sounds, 38}, {res_sounds, 8}, {res_sounds, 9}, {res_costumes, 1}, {res_costumes, 2}, {res_costumes, 5}, {res_costumes, 6}, {res_costumes, 3}, {res_costumes, 4}, {res_costumes, 7}, {NULL, 0} }; +static const ScummNESFile::LFLEntry lfl_45[] = { {res_rooms, 45}, {res_scripts, 1}, {res_scripts, 2}, {res_scripts, 3}, {res_scripts, 4}, {res_scripts, 5}, {res_scripts, 9}, {res_scripts, 114}, {res_scripts, 131}, {res_scripts, 164}, {res_scripts, 165}, {res_scripts, 169}, {res_scripts, 170}, {res_scripts, 171}, {res_scripts, 172}, {res_scripts, 173}, {res_scripts, 175}, {res_sounds, 54}, {NULL, 0} }; +static const ScummNESFile::LFLEntry lfl_46[] = { {res_rooms, 46}, {res_scripts, 130}, {res_sounds, 65}, {res_costumes, 0}, {res_costumes, 21}, {NULL, 0} }; +static const ScummNESFile::LFLEntry lfl_47[] = { {res_rooms, 47}, {res_scripts, 62}, {res_sounds, 69}, {NULL, 0} }; +static const ScummNESFile::LFLEntry lfl_48[] = { {res_rooms, 48}, {NULL, 0} }; +static const ScummNESFile::LFLEntry lfl_49[] = { {res_rooms, 49}, {NULL, 0} }; +static const ScummNESFile::LFLEntry lfl_50[] = { {res_rooms, 50}, {res_scripts, 133}, {res_scripts, 163}, {NULL, 0} }; +static const ScummNESFile::LFLEntry lfl_51[] = { {res_rooms, 51}, {res_scripts, 118}, {res_scripts, 128}, {res_sounds, 61}, {res_sounds, 62}, {res_sounds, 67}, {res_sounds, 66}, {res_costumes, 16}, {res_costumes, 20}, {NULL, 0} }; +static const ScummNESFile::LFLEntry lfl_52[] = { {res_rooms, 52}, {NULL, 0} }; +// remaining 'standard' resources (not used by any of the original LFL files) +static const ScummNESFile::LFLEntry lfl_53[] = { {res_rooms, 53}, {res_scripts, 177}, {res_scripts, 178}, {res_sounds, 70}, {res_sounds, 71}, {res_sounds, 72}, {res_sounds, 73}, {res_sounds, 74}, {res_sounds, 75}, {res_sounds, 76}, {res_sounds, 77}, {res_sounds, 78}, {res_sounds, 79}, {res_sounds, 80}, {res_sounds, 81}, {NULL, 0} }; +// all 'non-standard' resources (the costume-related stuff) +static const ScummNESFile::LFLEntry lfl_54[] = { {res_rooms, 54}, {res_sprdesc, 0}, {res_sprdesc, 1}, {res_sprlens, 0}, {res_sprlens, 1}, {res_sproffs, 0}, {res_sproffs, 1}, {res_sprdata, 0}, {res_sprdata, 1}, {res_costumegfx, 0}, {res_costumegfx, 1}, {res_sprpals, 0}, {res_sprpals, 1}, {res_charset, 0}, {res_preplist, 0}, {NULL, 0} }; + +struct ScummNESFile::LFL { + int num; + const ScummNESFile::LFLEntry *entries; +}; + +static const ScummNESFile::LFL lfls[] = { + { 1, lfl_01 }, + { 2, lfl_02 }, + { 3, lfl_03 }, + { 4, lfl_04 }, + { 5, lfl_05 }, + { 6, lfl_06 }, + { 7, lfl_07 }, + { 8, lfl_08 }, + { 9, lfl_09 }, + { 10, lfl_10 }, + { 11, lfl_11 }, + { 12, lfl_12 }, + { 13, lfl_13 }, + { 14, lfl_14 }, + { 15, lfl_15 }, + { 16, lfl_16 }, + { 17, lfl_17 }, + { 18, lfl_18 }, + { 19, lfl_19 }, + { 20, lfl_20 }, + { 21, lfl_21 }, + { 22, lfl_22 }, + { 23, lfl_23 }, + { 24, lfl_24 }, + { 25, lfl_25 }, + { 26, lfl_26 }, + { 27, lfl_27 }, + { 28, lfl_28 }, + { 29, lfl_29 }, + { 30, lfl_30 }, + { 31, lfl_31 }, + { 32, lfl_32 }, + { 33, lfl_33 }, + { 34, lfl_34 }, + { 35, lfl_35 }, + { 36, lfl_36 }, + { 37, lfl_37 }, + { 38, lfl_38 }, + { 39, lfl_39 }, + { 40, lfl_40 }, + { 41, lfl_41 }, + { 42, lfl_42 }, + { 43, lfl_43 }, + { 44, lfl_44 }, + { 45, lfl_45 }, + { 46, lfl_46 }, + { 47, lfl_47 }, + { 48, lfl_48 }, + { 49, lfl_49 }, + { 50, lfl_50 }, + { 51, lfl_51 }, + { 52, lfl_52 }, + { 53, lfl_53 }, + { 54, lfl_54 }, + { -1, NULL } +}; + +#include "common/pack-start.h" // START STRUCT PACKING + +struct _lfl_index { + byte room_lfl[55]; + uint16 room_addr[55]; + byte costume_lfl[80]; + uint16 costume_addr[80]; + byte script_lfl[200]; + uint16 script_addr[200]; + byte sound_lfl[100]; + uint16 sound_addr[100]; +} PACKED_STRUCT; + +#include "common/pack-end.h" // END STRUCT PACKING + +_lfl_index lfl_index; + +bool ScummNESFile::generateResource(int res) { + const LFL *lfl = &lfls[res - 1]; + int j; + int bufsize = 2; + + for (j = 0; lfl->entries[j].type != NULL; j++) + bufsize += extractResource(0, &lfl->entries[j].type[_ROMset][lfl->entries[j].index]); + + free(_buf); + _buf = (byte *)calloc(1, bufsize); + + Common::MemoryWriteStream out(_buf, bufsize); + + for (j = 0; lfl->entries[j].type != NULL; j++) { + const Resource *entry = &lfl->entries[j].type[_ROMset][lfl->entries[j].index]; + extractResource(&out, entry); + } + write_byte(&out, 0xD1); + write_byte(&out, 0xF5); + + if (_stream) + delete _stream; + + _stream = new Common::MemoryReadStream(_buf, bufsize); + + return true; +} + +bool ScummNESFile::generateIndex() { + int i, j; + + for (i = 0; lfls[i].num != -1; i++) { + const LFL *lfl = &lfls[i]; + uint16 respos = 0; + + for (j = 0; lfl->entries[j].type != NULL; j++) { + const LFLEntry *entry = &lfl->entries[j]; + + switch (entry->type[_ROMset][entry->index].type) { + case NES_ROOM: + lfl_index.room_lfl[entry->index] = lfl->num; + lfl_index.room_addr[entry->index] = TO_LE_16(respos); + break; + case NES_COSTUME: + lfl_index.costume_lfl[entry->index] = lfl->num; + lfl_index.costume_addr[entry->index] = TO_LE_16(respos); + break; + case NES_SPRDESC: + lfl_index.costume_lfl[entry->index + 25] = lfl->num; + lfl_index.costume_addr[entry->index + 25] = TO_LE_16(respos); + break; + case NES_SPRLENS: + lfl_index.costume_lfl[entry->index + 27] = lfl->num; + lfl_index.costume_addr[entry->index + 27] = TO_LE_16(respos); + break; + case NES_SPROFFS: + lfl_index.costume_lfl[entry->index + 29] = lfl->num; + lfl_index.costume_addr[entry->index + 29] = TO_LE_16(respos); + break; + case NES_SPRDATA: + lfl_index.costume_lfl[entry->index + 31] = lfl->num; + lfl_index.costume_addr[entry->index + 31] = TO_LE_16(respos); + break; + case NES_COSTUMEGFX: + lfl_index.costume_lfl[entry->index + 33] = lfl->num; + lfl_index.costume_addr[entry->index + 33] = TO_LE_16(respos); + break; + case NES_SPRPALS: + lfl_index.costume_lfl[entry->index + 35] = lfl->num; + lfl_index.costume_addr[entry->index + 35] = TO_LE_16(respos); + break; + case NES_ROOMGFX: + lfl_index.costume_lfl[entry->index + 37] = lfl->num; + lfl_index.costume_addr[entry->index + 37] = TO_LE_16(respos); + break; + case NES_SCRIPT: + lfl_index.script_lfl[entry->index] = lfl->num; + lfl_index.script_addr[entry->index] = TO_LE_16(respos); + break; + case NES_SOUND: + lfl_index.sound_lfl[entry->index] = lfl->num; + lfl_index.sound_addr[entry->index] = TO_LE_16(respos); + break; + case NES_CHARSET: + lfl_index.costume_lfl[77] = lfl->num; + lfl_index.costume_addr[77] = TO_LE_16(respos); + break; + case NES_PREPLIST: + lfl_index.costume_lfl[78] = lfl->num; + lfl_index.costume_addr[78] = TO_LE_16(respos); + break; + default: + error("Unindexed entry found!"); + break; + } + respos += extractResource(0, &entry->type[_ROMset][entry->index]); + } + } + + int bufsize = 2; + + bufsize += 775; + bufsize += sizeof(lfl_index); + + free(_buf); + _buf = (byte *)calloc(1, bufsize); + + Common::MemoryWriteStream out(_buf, bufsize); + + write_byte(&out, 0x43); + write_byte(&out, 0x46); + + extractResource(&out, &res_globdata[_ROMset][0]); + + for (i = 0; i < (int)sizeof(lfl_index); i++) + write_byte(&out, ((byte *)&lfl_index)[i]); + + if (_stream) + delete _stream; + + _stream = new Common::MemoryReadStream(_buf, bufsize); + + return true; +} + +bool ScummNESFile::open(const Common::String &filename, AccessMode mode) { + + if (_ROMset == kROMsetNum) { + char md5str[32+1]; + if (Common::md5_file_string(filename.c_str(), md5str)) { + + if (!strcmp(md5str, "3905799e081b80a61d4460b7b733c206")) { + _ROMset = kROMsetUSA; + debug(1, "ROM contents verified as Maniac Mansion (USA)"); + } else if (!strcmp(md5str, "d8d07efcb88f396bee0b402b10c3b1c9")) { + _ROMset = kROMsetEurope; + debug(1, "ROM contents verified as Maniac Mansion (Europe)"); + } else if (!strcmp(md5str, "22d07d6c386c9c25aca5dac2a0c0d94b")) { + _ROMset = kROMsetSweden; + debug(1, "ROM contents verified as Maniac Mansion (Sweden)"); + } else if (!strcmp(md5str, "81bbfa181184cb494e7a81dcfa94fbd9")) { + _ROMset = kROMsetFrance; + debug(2, "ROM contents verified as Maniac Mansion (France)"); + } else if (!strcmp(md5str, "257f8c14d8c584f7ddd601bcb00920c7")) { + _ROMset = kROMsetGermany; + debug(2, "ROM contents verified as Maniac Mansion (Germany)"); + } else if (!strcmp(md5str, "f163cf53f7850e43fb482471e5c52e1a")) { + _ROMset = kROMsetSpain; + debug(2, "ROM contents verified as Maniac Mansion (Spain)"); + } else { + error("Unsupported Maniac Mansion ROM, md5: %s", md5str); + return false; + } + } else { + return false; + } + } + + if (File::open(filename, mode)) { + if (_stream) + delete _stream; + _stream = 0; + + free(_buf); + _buf = 0; + + return true; + } else { + return false; + } +} + +void ScummNESFile::close() { + if (_stream) + delete _stream; + _stream = 0; + + free(_buf); + _buf = 0; + + File::close(); +} + +bool ScummNESFile::openSubFile(const Common::String &filename) { + assert(isOpen()); + + const char *ext = strrchr(filename.c_str(), '.'); + char resNum[3]; + int res; + + // We always have file name in form of XX.lfl + resNum[0] = ext[-2]; + resNum[1] = ext[-1]; + resNum[2] = 0; + + res = atoi(resNum); + + if (res == 0) { + return generateIndex(); + } else { + return generateResource(res); + } +} + + +} // End of namespace Scumm diff --git a/engines/scumm/file_nes.h b/engines/scumm/file_nes.h new file mode 100644 index 0000000000..d601c2c496 --- /dev/null +++ b/engines/scumm/file_nes.h @@ -0,0 +1,81 @@ +/* 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. + * + * $URL$ + * $Id$ + * + */ + +#ifndef SCUMM_FILE_NES_H +#define SCUMM_FILE_NES_H + +#include "common/file.h" + +#include "scumm/file.h" + +namespace Scumm { + +class ScummNESFile : public BaseScummFile { +public: + enum ROMset { + kROMsetUSA, + kROMsetEurope, + kROMsetSweden, + kROMsetFrance, + kROMsetGermany, + kROMsetSpain, + kROMsetNum + }; + + struct Resource; + struct LFLEntry; + struct LFL; + +private: + Common::MemoryReadStream *_stream; + ROMset _ROMset; + byte *_buf; + + bool generateIndex(); + bool generateResource(int res); + uint16 extractResource(Common::WriteStream *out, const Resource *res); + + byte fileReadByte(); + uint16 fileReadUint16LE(); + +public: + ScummNESFile(); + void setEnc(byte value); + + bool open(const Common::String &filename, AccessMode mode = kFileReadMode); + bool openSubFile(const Common::String &filename); + + void close(); + bool eof() { return _stream->eos(); } + uint32 pos() { return _stream->pos(); } + uint32 size() { return _stream->size(); } + void seek(int32 offs, int whence = SEEK_SET) { _stream->seek(offs, whence); } + uint32 read(void *dataPtr, uint32 dataSize) { return _stream->read(dataPtr, dataSize); } + uint32 write(const void *dataPtr, uint32 dataSize); +}; + +} // End of namespace Scumm + +#endif diff --git a/engines/scumm/gfx.cpp b/engines/scumm/gfx.cpp index c1e06609b9..8d111492a2 100644 --- a/engines/scumm/gfx.cpp +++ b/engines/scumm/gfx.cpp @@ -51,6 +51,7 @@ static void copy8Col(byte *dst, int dstPitch, const byte *src, int height); static void clear8Col(byte *dst, int dstPitch, int height); static void ditherHerc(byte *src, byte *hercbuf, int srcPitch, int *x, int *y, int *width, int *height); +static void scale2x(byte *dst, int dstPitch, const byte *src, int srcPitch, int w, int h); struct StripTable { int offsets[160]; @@ -90,9 +91,6 @@ struct TransitionEffect { byte stripTable[16]; // ditto }; -#ifdef PALMOS_68K -static const TransitionEffect *transitionEffects; -#else static const TransitionEffect transitionEffects[6] = { // Iris effect (looks like an opening/closing camera iris) { @@ -197,7 +195,6 @@ static const TransitionEffect transitionEffects[6] = { } }; -#endif Gdi::Gdi(ScummEngine *vm) : _vm(vm) { @@ -322,7 +319,7 @@ void ScummEngine::initScreens(int b, int h) { void ScummEngine::initVirtScreen(VirtScreenNumber slot, int top, int width, int height, bool twobufs, bool scrollable) { - VirtScreen *vs = &virtscr[slot]; + VirtScreen *vs = &_virtscr[slot]; int size; assert(height >= 0); @@ -378,7 +375,7 @@ void ScummEngine::initVirtScreen(VirtScreenNumber slot, int top, int width, int } VirtScreen *ScummEngine::findVirtScreen(int y) { - VirtScreen *vs = virtscr; + VirtScreen *vs = _virtscr; int i; for (i = 0; i < 3; i++, vs++) { @@ -390,7 +387,7 @@ VirtScreen *ScummEngine::findVirtScreen(int y) { } void ScummEngine::markRectAsDirty(VirtScreenNumber virt, int left, int right, int top, int bottom, int dirtybit) { - VirtScreen *vs = &virtscr[virt]; + VirtScreen *vs = &_virtscr[virt]; int lp, rp; if (left > right || top > bottom) @@ -456,7 +453,7 @@ void ScummEngine::drawDirtyScreenParts() { // Update game area ("stage") if (camera._last.x != camera._cur.x || (_game.version >= 7 && (camera._cur.y != camera._last.y))) { // Camera moved: redraw everything - VirtScreen *vs = &virtscr[kMainVirtScreen]; + VirtScreen *vs = &_virtscr[kMainVirtScreen]; drawStripToScreen(vs, 0, vs->w, 0, vs->h); vs->setDirtyRange(vs->h, 0); } else { @@ -501,7 +498,7 @@ void ScummEngine_v6::drawDirtyScreenParts() { * a full blit is done, otherwise only the visible dirty areas are updated. */ void ScummEngine::updateDirtyScreen(VirtScreenNumber slot) { - VirtScreen *vs = &virtscr[slot]; + VirtScreen *vs = &_virtscr[slot]; // Do nothing for unused virtual screens if (vs->h == 0) @@ -745,7 +742,7 @@ void ditherHerc(byte *src, byte *hercbuf, int srcPitch, int *x, int *y, int *wid *height = dsty - *y; } -void ScummEngine::scale2x(byte *dst, int dstPitch, const byte *src, int srcPitch, int w, int h) { +void scale2x(byte *dst, int dstPitch, const byte *src, int srcPitch, int w, int h) { byte *dstL1 = dst; byte *dstL2 = dst + dstPitch; @@ -779,7 +776,7 @@ void ScummEngine::initBGBuffers(int height) { // Resize main virtual screen in V7 games. This is necessary // because in V7, rooms may be higher than one screen, so we have // to accomodate for that. - initVirtScreen(kMainVirtScreen, virtscr[0].topline, _screenWidth, height, true, true); + initVirtScreen(kMainVirtScreen, _virtscr[kMainVirtScreen].topline, _screenWidth, height, true, true); } if (_game.heversion >= 70) @@ -903,7 +900,7 @@ void ScummEngine_v71he::redrawBGAreas() { byte *room = getResourceAddress(rtRoomImage, _roomResource) + _IM00_offs; if (_fullRedraw) { _bgNeedsRedraw = false; - _gdi->drawBMAPBg(room, &virtscr[0]); + _gdi->drawBMAPBg(room, &_virtscr[kMainVirtScreen]); } drawRoomObjects(0); @@ -929,7 +926,7 @@ void ScummEngine::redrawBGStrip(int start, int num) { else room = getResourceAddress(rtRoom, _roomResource); - _gdi->drawBitmap(room + _IM00_offs, &virtscr[0], s, 0, _roomWidth, virtscr[0].h, s, num, 0); + _gdi->drawBitmap(room + _IM00_offs, &_virtscr[kMainVirtScreen], s, 0, _roomWidth, _virtscr[kMainVirtScreen].h, s, num, 0); } void ScummEngine::restoreBackground(Common::Rect rect, byte backColor) { @@ -987,7 +984,7 @@ void ScummEngine::restoreCharsetBg() { // restoreBackground(), but was changed to only restore those parts which are // currently covered by the charset mask. - VirtScreen *vs = &virtscr[_charset->_textScreenID]; + VirtScreen *vs = &_virtscr[_charset->_textScreenID]; if (!vs->h) return; @@ -1022,7 +1019,7 @@ void ScummEngine::clearTextSurface() { } byte *ScummEngine::getMaskBuffer(int x, int y, int z) { - return _gdi->getMaskBuffer((x + virtscr[0].xstart) / 8, y, z); + return _gdi->getMaskBuffer((x + _virtscr[kMainVirtScreen].xstart) / 8, y, z); } byte *Gdi::getMaskBuffer(int x, int y, int z) { @@ -1223,7 +1220,7 @@ void ScummEngine_v5::clearFlashlight() { void ScummEngine_v5::drawFlashlight() { int i, j, x, y; - VirtScreen *vs = &virtscr[kMainVirtScreen]; + VirtScreen *vs = &_virtscr[kMainVirtScreen]; // Remove the flash light first if it was previously drawn if (_flashlight.isDrawn) { @@ -1923,7 +1920,7 @@ void Gdi::drawBMAPObject(const byte *ptr, VirtScreen *vs, int obj, int x, int y, if (code == 8 || code == 9) { Common::Rect rScreen(0, 0, vs->w, vs->h); - byte *dst = (byte *)_vm->virtscr[0].backBuf + scrX; + byte *dst = (byte *)_vm->_virtscr[kMainVirtScreen].backBuf + scrX; Wiz::copyWizImage(dst, bmap_ptr, vs->w, vs->h, x - scrX, y, w, h, &rScreen); } @@ -1943,7 +1940,7 @@ void Gdi::drawBMAPObject(const byte *ptr, VirtScreen *vs, int obj, int x, int y, void ScummEngine_v70he::restoreBackgroundHE(Common::Rect rect, int dirtybit) { byte *src, *dst; - VirtScreen *vs = &virtscr[0]; + VirtScreen *vs = &_virtscr[kMainVirtScreen]; if (rect.top > vs->h || rect.bottom < 0) return; @@ -1969,12 +1966,12 @@ void ScummEngine_v70he::restoreBackgroundHE(Common::Rect rect, int dirtybit) { if (rw == 0 || rh == 0) return; - src = virtscr[0].getBackPixels(rect.left, rect.top); - dst = virtscr[0].getPixels(rect.left, rect.top); + src = _virtscr[kMainVirtScreen].getBackPixels(rect.left, rect.top); + dst = _virtscr[kMainVirtScreen].getPixels(rect.left, rect.top); assert(rw <= _screenWidth && rw > 0); assert(rh <= _screenHeight && rh > 0); - blit(dst, virtscr[0].pitch, src, virtscr[0].pitch, rw, rh); + blit(dst, _virtscr[kMainVirtScreen].pitch, src, _virtscr[kMainVirtScreen].pitch, rw, rh); markRectAsDirty(kMainVirtScreen, rect, dirtybit); } #endif @@ -1983,7 +1980,7 @@ void ScummEngine_v70he::restoreBackgroundHE(Common::Rect rect, int dirtybit) { * Reset the background behind an actor or blast object. */ void Gdi::resetBackground(int top, int bottom, int strip) { - VirtScreen *vs = &_vm->virtscr[0]; + VirtScreen *vs = &_vm->_virtscr[kMainVirtScreen]; byte *backbuff_ptr, *bgbak_ptr; int numLinesToProcess; @@ -3162,7 +3159,7 @@ void ScummEngine::fadeIn(int effect) { // that broke the FOA intro. Probably other things as well. // // Hopefully it's safe to do it at this point, at least. - virtscr[0].setDirtyRange(0, 0); + _virtscr[kMainVirtScreen].setDirtyRange(0, 0); transitionEffect(effect - 1); break; case 128: @@ -3180,7 +3177,7 @@ void ScummEngine::fadeIn(int effect) { dissolveEffect(1, 1); break; case 135: - dissolveEffect(1, virtscr[0].h); + dissolveEffect(1, _virtscr[kMainVirtScreen].h); break; default: error("Unknown screen effect, %d", effect); @@ -3189,7 +3186,7 @@ void ScummEngine::fadeIn(int effect) { } void ScummEngine::fadeOut(int effect) { - VirtScreen *vs = &virtscr[0]; + VirtScreen *vs = &_virtscr[kMainVirtScreen]; vs->setDirtyRange(0, 0); if (_game.version < 7) @@ -3226,7 +3223,7 @@ void ScummEngine::fadeOut(int effect) { dissolveEffect(1, 1); break; case 135: - dissolveEffect(1, virtscr[0].h); + dissolveEffect(1, _virtscr[kMainVirtScreen].h); break; default: error("fadeOut: default case %d", effect); @@ -3256,7 +3253,7 @@ void ScummEngine::transitionEffect(int a) { int i, j; int bottom; int l, t, r, b; - const int height = MIN((int)virtscr[0].h, _screenHeight); + const int height = MIN((int)_virtscr[kMainVirtScreen].h, _screenHeight); const int delay = (VAR_FADE_DELAY != 0xFF) ? VAR(VAR_FADE_DELAY) * kFadeDelay : kPictureDelay; for (i = 0; i < 16; i++) { @@ -3278,8 +3275,8 @@ void ScummEngine::transitionEffect(int a) { if (t == b) { while (l <= r) { if (l >= 0 && l < _gdi->_numStrips && t < bottom) { - virtscr[0].tdirty[l] = _screenTop + t * 8; - virtscr[0].bdirty[l] = _screenTop + (b + 1) * 8; + _virtscr[kMainVirtScreen].tdirty[l] = _screenTop + t * 8; + _virtscr[kMainVirtScreen].bdirty[l] = _screenTop + (b + 1) * 8; } l++; } @@ -3290,8 +3287,8 @@ void ScummEngine::transitionEffect(int a) { b = bottom; if (t < 0) t = 0; - virtscr[0].tdirty[l] = _screenTop + t * 8; - virtscr[0].bdirty[l] = _screenTop + (b + 1) * 8; + _virtscr[kMainVirtScreen].tdirty[l] = _screenTop + t * 8; + _virtscr[kMainVirtScreen].bdirty[l] = _screenTop + (b + 1) * 8; } updateDirtyScreen(kMainVirtScreen); } @@ -3314,16 +3311,7 @@ void ScummEngine::transitionEffect(int a) { * dissolveEffect(virtsrc[0].width, 1) produces a line-by-line dissolve */ void ScummEngine::dissolveEffect(int width, int height) { -#ifdef PALMOS_68K - // Remove this dissolve effect for now on PalmOS since it is a bit - // too slow using 68k emulation - if (width == 1 && height == 1) { - waitForTimer(30); - return; - } -#endif - - VirtScreen *vs = &virtscr[0]; + VirtScreen *vs = &_virtscr[kMainVirtScreen]; int *offsets; int blits_before_refresh, blits; int x, y; @@ -3432,7 +3420,7 @@ void ScummEngine::dissolveEffect(int width, int height) { } void ScummEngine::scrollEffect(int dir) { - VirtScreen *vs = &virtscr[0]; + VirtScreen *vs = &_virtscr[kMainVirtScreen]; int x, y; int step; @@ -3557,15 +3545,3 @@ void ScummEngine::unkScreenEffect6() { } // End of namespace Scumm -#ifdef PALMOS_68K -#include "scumm_globals.h" - -_GINIT(Gfx) -_GSETPTR(Scumm::transitionEffects, GBVARS_TRANSITIONEFFECTS_INDEX, Scumm::TransitionEffect, GBVARS_SCUMM) -_GEND - -_GRELEASE(Gfx) -_GRELEASEPTR(GBVARS_TRANSITIONEFFECTS_INDEX, GBVARS_SCUMM) -_GEND - -#endif diff --git a/engines/scumm/gfx.h b/engines/scumm/gfx.h index fb8da562c8..4e92fad0fd 100644 --- a/engines/scumm/gfx.h +++ b/engines/scumm/gfx.h @@ -84,7 +84,7 @@ enum VirtScreenNumber { struct VirtScreen : Graphics::Surface { /** * The unique id of this screen (corresponds to its position in the - * ScummEngine:virtscr array). + * ScummEngine:_virtscr array). */ VirtScreenNumber number; diff --git a/engines/scumm/he/animation_he.cpp b/engines/scumm/he/animation_he.cpp index 3bc2f3e5d7..3c7d742ba2 100644 --- a/engines/scumm/he/animation_he.cpp +++ b/engines/scumm/he/animation_he.cpp @@ -89,7 +89,7 @@ void MoviePlayer::handleNextFrame() { return; } - VirtScreen *pvs = &_vm->virtscr[kMainVirtScreen]; + VirtScreen *pvs = &_vm->_virtscr[kMainVirtScreen]; decodeNextFrame(); diff --git a/engines/scumm/he/floodfill_he.cpp b/engines/scumm/he/floodfill_he.cpp index 1fdd11fce8..ea2043d69f 100644 --- a/engines/scumm/he/floodfill_he.cpp +++ b/engines/scumm/he/floodfill_he.cpp @@ -179,7 +179,7 @@ skip: void floodFill(FloodFillParameters *ffp, ScummEngine_v90he *vm) { uint8 *dst; - VirtScreen *vs = &vm->virtscr[kMainVirtScreen]; + VirtScreen *vs = &vm->_virtscr[kMainVirtScreen]; if (ffp->flags & 0x8000) { dst = vs->getBackPixels(0, vs->topline); } else { diff --git a/engines/scumm/he/script_v60he.cpp b/engines/scumm/he/script_v60he.cpp index baee2f3e49..0b9c94fe18 100644 --- a/engines/scumm/he/script_v60he.cpp +++ b/engines/scumm/he/script_v60he.cpp @@ -801,7 +801,7 @@ void ScummEngine_v60he::o60_kernelSetFunctions() { void ScummEngine_v60he::virtScreenLoad(int resIdx, int x1, int y1, int x2, int y2) { vsUnpackCtx ctx; memset(&ctx, 0, sizeof(ctx)); - VirtScreen &vs = virtscr[kMainVirtScreen]; + VirtScreen &vs = _virtscr[kMainVirtScreen]; ArrayHeader *ah = (ArrayHeader *)getResourceAddress(rtString, resIdx); virtScreenLoadUnpack(&ctx, ah->data); @@ -875,7 +875,7 @@ void ScummEngine_v60he::o60_kernelGetFunctions() { int ScummEngine_v60he::virtScreenSave(byte *dst, int x1, int y1, int x2, int y2) { int packedSize = 0; - VirtScreen &vs = virtscr[kMainVirtScreen]; + VirtScreen &vs = _virtscr[kMainVirtScreen]; for (int j = y1; j <= y2; ++j) { uint8 *p = vs.getBackPixels(x1, j - vs.topline); diff --git a/engines/scumm/he/sprite_he.cpp b/engines/scumm/he/sprite_he.cpp index 8e6f3ce4c2..15698dedba 100644 --- a/engines/scumm/he/sprite_he.cpp +++ b/engines/scumm/he/sprite_he.cpp @@ -1120,7 +1120,7 @@ void Sprite::resetBackground() { } void Sprite::setRedrawFlags(bool checkZOrder) { - VirtScreen *vs = &_vm->virtscr[kMainVirtScreen]; + VirtScreen *vs = &_vm->_virtscr[kMainVirtScreen]; for (int i = 0; i < _numSpritesToProcess; ++i) { SpriteInfo *spi = _activeSpritesTable[i]; if (!(spi->flags & kSFNeedRedraw)) { diff --git a/engines/scumm/he/wiz_he.cpp b/engines/scumm/he/wiz_he.cpp index 549e4480f6..a99f3b1ad5 100644 --- a/engines/scumm/he/wiz_he.cpp +++ b/engines/scumm/he/wiz_he.cpp @@ -1009,7 +1009,7 @@ static int wizPackType0(uint8 *dst, const uint8 *src, int srcPitch, const Common void Wiz::captureWizImage(int resNum, const Common::Rect& r, bool backBuffer, int compType) { debug(5, "ScummEngine_v72he::captureWizImage(%d, %d, [%d,%d,%d,%d])", resNum, compType, r.left, r.top, r.right, r.bottom); uint8 *src = NULL; - VirtScreen *pvs = &_vm->virtscr[kMainVirtScreen]; + VirtScreen *pvs = &_vm->_virtscr[kMainVirtScreen]; if (backBuffer) { src = pvs->getBackPixels(0, 0); } else { @@ -1182,7 +1182,7 @@ uint8 *Wiz::drawWizImage(int resNum, int state, int x1, int y1, int zorder, int assert(dst); getWizImageDim(dstResNum, 0, cw, ch); } else { - VirtScreen *pvs = &_vm->virtscr[kMainVirtScreen]; + VirtScreen *pvs = &_vm->_virtscr[kMainVirtScreen]; if (flags & kWIFMarkBufferDirty) { dst = pvs->getPixels(0, pvs->topline); } else { @@ -1377,7 +1377,7 @@ void Wiz::drawWizPolygonTransform(int resNum, int state, Common::Point *wp, int if (srcWizBuf) { uint8 *dst; int32 dstw, dsth, dstpitch, wizW, wizH; - VirtScreen *pvs = &_vm->virtscr[kMainVirtScreen]; + VirtScreen *pvs = &_vm->_virtscr[kMainVirtScreen]; int transColor = (_vm->VAR_WIZ_TCOLOR != 0xFF) ? _vm->VAR(_vm->VAR_WIZ_TCOLOR) : 5; if (dstResNum) { diff --git a/engines/scumm/imuse_digi/dimuse.h b/engines/scumm/imuse_digi/dimuse.h index dca9baac60..caff9958f3 100644 --- a/engines/scumm/imuse_digi/dimuse.h +++ b/engines/scumm/imuse_digi/dimuse.h @@ -237,16 +237,6 @@ struct imuseFtSeqTable { byte volume; }; -#ifdef PALMOS_68K -extern const imuseRoomMap *_digStateMusicMap; -extern const imuseDigTable *_digStateMusicTable; -extern const imuseDigTable *_digSeqMusicTable; -extern const imuseComiTable *_comiStateMusicTable; -extern const imuseComiTable *_comiSeqMusicTable; -extern const imuseFtStateTable *_ftStateMusicTable; -extern const imuseFtSeqTable *_ftSeqMusicTable; -extern const imuseFtNames *_ftSeqNames; -#else extern const imuseRoomMap _digStateMusicMap[]; extern const imuseDigTable _digStateMusicTable[]; extern const imuseDigTable _digSeqMusicTable[]; @@ -255,7 +245,6 @@ extern const imuseComiTable _comiSeqMusicTable[]; extern const imuseFtStateTable _ftStateMusicTable[]; extern const imuseFtSeqTable _ftSeqMusicTable[]; extern const imuseFtNames _ftSeqNames[]; -#endif } // End of namespace Scumm diff --git a/engines/scumm/imuse_digi/dimuse_codecs.cpp b/engines/scumm/imuse_digi/dimuse_codecs.cpp index 17082f5256..b79c7111f9 100644 --- a/engines/scumm/imuse_digi/dimuse_codecs.cpp +++ b/engines/scumm/imuse_digi/dimuse_codecs.cpp @@ -62,9 +62,6 @@ uint32 decode12BitsSample(const byte *src, byte **dst, uint32 size) { static byte _imcTableEntryBitCount[89]; -#ifdef PALMOS_68K -static const int16 *imcTable; -#else static const int16 imcTable[89] = { 7, 8, 9, 10, 11, 12, 13, 14, 16, 17, 19, 21, 23, 25, 28, 31, @@ -79,7 +76,6 @@ static const int16 imcTable[89] = { 15289,16818,18500,20350,22385,24623,27086,29794, 32767 }; -#endif static const byte imxOtherTable[6][64] = { { @@ -651,16 +647,3 @@ int32 decompressCodec(int32 codec, byte *compInput, byte *compOutput, int32 inpu } // End of namespace BundleCodecs } // End of namespace Scumm - -#ifdef PALMOS_68K -#include "scumm_globals.h" - -_GINIT(DimuseCodecs) -_GSETPTR(Scumm::BundleCodecs::imcTable, GBVARS_IMCTABLE_INDEX, int16, GBVARS_SCUMM) -_GEND - -_GRELEASE(DimuseCodecs) -_GRELEASEPTR(GBVARS_IMCTABLE_INDEX, GBVARS_SCUMM) -_GEND - -#endif diff --git a/engines/scumm/imuse_digi/dimuse_tables.cpp b/engines/scumm/imuse_digi/dimuse_tables.cpp index 0b014b5f5e..9c56063557 100644 --- a/engines/scumm/imuse_digi/dimuse_tables.cpp +++ b/engines/scumm/imuse_digi/dimuse_tables.cpp @@ -27,16 +27,6 @@ namespace Scumm { -#ifdef PALMOS_68K -const imuseRoomMap *_digStateMusicMap; -const imuseDigTable *_digStateMusicTable; -const imuseDigTable *_digSeqMusicTable; -const imuseComiTable *_comiStateMusicTable; -const imuseComiTable *_comiSeqMusicTable; -const imuseFtStateTable *_ftStateMusicTable; -const imuseFtSeqTable *_ftSeqMusicTable; -const imuseFtNames *_ftSeqNames; -#else const imuseRoomMap _digStateMusicMap[] = { {0, 0, 0, 0, 0, 0 }, {1, 0, 0, 0, 0, 0 }, @@ -852,33 +842,5 @@ const imuseFtSeqTable _ftSeqMusicTable[] = { {"legavox", 2, 127}, {"chances", 2, 90 }, }; -#endif } // End of namespace Scumm - -#ifdef PALMOS_68K -#include "scumm_globals.h" - -_GINIT(DimuseTables) -_GSETPTR(Scumm::_digStateMusicMap, GBVARS_DIGSTATEMUSICMAP_INDEX, Scumm::imuseRoomMap , GBVARS_SCUMM) -_GSETPTR(Scumm::_digStateMusicTable, GBVARS_DIGSTATEMUSICTABLE_INDEX, Scumm::imuseDigTable , GBVARS_SCUMM) -_GSETPTR(Scumm::_digSeqMusicTable, GBVARS_DIGSEQMUSICTABLE_INDEX, Scumm::imuseDigTable , GBVARS_SCUMM) -_GSETPTR(Scumm::_comiStateMusicTable, GBVARS_COMISTATEMUSICTABLE_INDEX, Scumm::imuseComiTable , GBVARS_SCUMM) -_GSETPTR(Scumm::_comiSeqMusicTable, GBVARS_COMISEQMUSICTABLE_INDEX, Scumm::imuseComiTable , GBVARS_SCUMM) -_GSETPTR(Scumm::_ftStateMusicTable, GBVARS_FTSTATEMUSICTABLE_INDEX, Scumm::imuseFtStateTable, GBVARS_SCUMM) -_GSETPTR(Scumm::_ftSeqMusicTable, GBVARS_FTSEQMUSICTABLE_INDEX, Scumm::imuseFtSeqTable , GBVARS_SCUMM) -_GSETPTR(Scumm::_ftSeqNames, GBVARS_FTSEQNAMES_INDEX, Scumm::imuseFtNames , GBVARS_SCUMM) -_GEND - -_GRELEASE(DimuseTables) -_GRELEASEPTR(GBVARS_DIGSTATEMUSICMAP_INDEX , GBVARS_SCUMM) -_GRELEASEPTR(GBVARS_DIGSTATEMUSICTABLE_INDEX , GBVARS_SCUMM) -_GRELEASEPTR(GBVARS_DIGSEQMUSICTABLE_INDEX , GBVARS_SCUMM) -_GRELEASEPTR(GBVARS_COMISTATEMUSICTABLE_INDEX , GBVARS_SCUMM) -_GRELEASEPTR(GBVARS_COMISEQMUSICTABLE_INDEX , GBVARS_SCUMM) -_GRELEASEPTR(GBVARS_FTSTATEMUSICTABLE_INDEX , GBVARS_SCUMM) -_GRELEASEPTR(GBVARS_FTSEQMUSICTABLE_INDEX , GBVARS_SCUMM) -_GRELEASEPTR(GBVARS_FTSEQNAMES_INDEX , GBVARS_SCUMM) -_GEND - -#endif diff --git a/engines/scumm/input.cpp b/engines/scumm/input.cpp index 6647e9fe8d..94fafc78de 100644 --- a/engines/scumm/input.cpp +++ b/engines/scumm/input.cpp @@ -249,14 +249,15 @@ void ScummEngine::processInput() { if (_mouse.y > _screenHeight-1) _mouse.y = _screenHeight-1; - _virtualMouse.x = _mouse.x + virtscr[0].xstart; - _virtualMouse.y = _mouse.y - virtscr[0].topline; + VirtScreen *vs = &_virtscr[kMainVirtScreen]; + _virtualMouse.x = _mouse.x + vs->xstart; + _virtualMouse.y = _mouse.y - vs->topline; if (_game.version >= 7) _virtualMouse.y += _screenTop; if (_virtualMouse.y < 0) _virtualMouse.y = -1; - if (_virtualMouse.y >= virtscr[0].h) + if (_virtualMouse.y >= vs->h) _virtualMouse.y = -1; // diff --git a/engines/scumm/insane/insane.cpp b/engines/scumm/insane/insane.cpp index 252407913e..af09daff96 100644 --- a/engines/scumm/insane/insane.cpp +++ b/engines/scumm/insane/insane.cpp @@ -1169,8 +1169,6 @@ int Insane::smlayer_loadCostume(int id, int phase) { _vm->ensureResourceLoaded(rtCostume, resid); _vm->_res->setResourceCounter(rtCostume, resid, 1); - // smlayer_lock(rtCostume, resid); // FIXME - if (phase == 1) { _objArray1Idx2++; _objArray1[_objArray1Idx2] = id; diff --git a/engines/scumm/insane/insane_scenes.cpp b/engines/scumm/insane/insane_scenes.cpp index 5843e85f0f..0cf6623664 100644 --- a/engines/scumm/insane/insane_scenes.cpp +++ b/engines/scumm/insane/insane_scenes.cpp @@ -171,7 +171,7 @@ void Insane::runScene(int arraynum) { writeArray(339, _enemy[EN_VULTF2].isEmpty); writeArray(340, _enemy[EN_VULTM2].isEmpty); } - // insane_unlock(); // FIXME + _vm->_sound->stopAllSounds(); // IMUSE_StopAllSounds(); } @@ -328,8 +328,7 @@ int Insane::loadSceneData(int scene, int flag, int phase) { int retvalue = 1; debugC(DEBUG_INSANE, "Insane::loadSceneData(%d, %d, %d)", scene, flag, phase); - //if (phase == 1) /// FIXME - // insane_unlock(); + switch (scene) { case 1: smlayer_loadSound(88, flag, phase); diff --git a/engines/scumm/module.mk b/engines/scumm/module.mk index a340f564b3..2d70b167ea 100644 --- a/engines/scumm/module.mk +++ b/engines/scumm/module.mk @@ -14,6 +14,7 @@ MODULE_OBJS := \ detection.o \ dialogs.o \ file.o \ + file_nes.o \ gfx.o \ he/script_v60he.o \ he/sound_he.o \ diff --git a/engines/scumm/object.cpp b/engines/scumm/object.cpp index a88c56bc5a..128270538d 100644 --- a/engines/scumm/object.cpp +++ b/engines/scumm/object.cpp @@ -156,11 +156,14 @@ void ScummEngine::setOwnerOf(int obj, int owner) { } void ScummEngine::clearOwnerOf(int obj) { - int i, j; + int i; uint16 *a; + // Stop the associated object script code (else crashes might occurs) stopObjectScript(obj); + // If the object is "owned" by a the current room, we scan the + // object list and (only if it's a floating object) nuke it. if (getOwner(obj) == OF_OWNER_ROOM) { for (i = 0; i < _numLocalObjects; i++) { if (_objs[i].obj_nr == obj && _objs[i].fl_object_index) { @@ -170,26 +173,28 @@ void ScummEngine::clearOwnerOf(int obj) { _objs[i].fl_object_index = 0; } } - return; - } - - for (i = 0; i < _numInventory; i++) { - if (_inventory[i] == obj) { - j = whereIsObject(obj); - if (j == WIO_INVENTORY) { + } else { + + // Alternatively, scan the inventory to see if the object is in there... + for (i = 0; i < _numInventory; i++) { + if (_inventory[i] == obj) { + assert(WIO_INVENTORY == whereIsObject(obj)); + // Found the object! Nuke it from the inventory. _res->nukeResource(rtInventory, i); _inventory[i] = 0; - } - a = _inventory; - for (i = 0; i < _numInventory - 1; i++, a++) { - if (!a[0] && a[1]) { - a[0] = a[1]; - a[1] = 0; - _res->address[rtInventory][i] = _res->address[rtInventory][i + 1]; - _res->address[rtInventory][i + 1] = NULL; + + // Now fill up the gap removing the object from the inventory created. + a = _inventory; + for (i = 0; i < _numInventory - 1; i++, a++) { + if (!_inventory[i] && _inventory[i+1]) { + _inventory[i] = _inventory[i+1]; + _inventory[i+1] = 0; + _res->address[rtInventory][i] = _res->address[rtInventory][i + 1]; + _res->address[rtInventory][i + 1] = NULL; + } } + break; } - return; } } } @@ -583,11 +588,7 @@ void ScummEngine::drawObject(int obj, int arg) { return; ptr = getOBIMFromObjectData(od); - - if (_game.features & GF_OLD_BUNDLE) - ptr += 0; - else - ptr = getObjectImage(ptr, getState(od.obj_nr)); + ptr = getObjectImage(ptr, getState(od.obj_nr)); if (!ptr) return; @@ -619,10 +620,10 @@ void ScummEngine::drawObject(int obj, int arg) { #ifndef DISABLE_HE if (_game.heversion >= 70 && findResource(MKID_BE('SMAP'), ptr) == NULL) - _gdi->drawBMAPObject(ptr, &virtscr[0], obj, od.x_pos, od.y_pos, od.width, od.height); + _gdi->drawBMAPObject(ptr, &_virtscr[kMainVirtScreen], obj, od.x_pos, od.y_pos, od.width, od.height); else #endif - _gdi->drawBitmap(ptr, &virtscr[0], x, ypos, width * 8, height, x - xpos, numstrip, flags); + _gdi->drawBitmap(ptr, &_virtscr[kMainVirtScreen], x, ypos, width * 8, height, x - xpos, numstrip, flags); } } @@ -1394,7 +1395,9 @@ void ScummEngine::findObjectInRoom(FindObjectInRoom *fo, byte findWhat, uint id, if (id2 == (uint16)id) { if (findWhat & foCodeHeader) { fo->obcd = obcdptr; - fo->cdhd = (const CodeHeader *)(obcdptr + 10); // TODO - FIXME + // We assume that the code header starts at a fixed offset. + // A bit hackish, but works reasonably well. + fo->cdhd = (const CodeHeader *)(obcdptr + 10); } if (findWhat & foImageHeader) { fo->obim = obimptr; @@ -1626,7 +1629,7 @@ void ScummEngine_v6::drawBlastObject(BlastObject *eo) { int objnum; BompDrawData bdd; - vs = &virtscr[0]; + vs = &_virtscr[kMainVirtScreen]; assertRange(30, eo->number, _numGlobalObjects - 1, "blast object"); @@ -1704,7 +1707,7 @@ void ScummEngine_v6::removeBlastObjects() { } void ScummEngine_v6::removeBlastObject(BlastObject *eo) { - VirtScreen *vs = &virtscr[0]; + VirtScreen *vs = &_virtscr[kMainVirtScreen]; Common::Rect r; int left_strip, right_strip; diff --git a/engines/scumm/player_v2.cpp b/engines/scumm/player_v2.cpp index ae7985011b..82bb2cb4ec 100644 --- a/engines/scumm/player_v2.cpp +++ b/engines/scumm/player_v2.cpp @@ -44,16 +44,6 @@ namespace Scumm { #define FB_WNOISE 0x12000 /* feedback for white noise */ #define FB_PNOISE 0x08000 /* feedback for periodic noise */ -#ifdef PALMOS_68K -const uint8 *note_lengths; -static const uint16 *hull_offsets; -static const int16 *hulls; -static const uint16 *freqmod_lengths; -static const uint16 *freqmod_offsets; -static const int8 *freqmod_table; -static const uint16 *spk_freq_table; -static const uint16 *pcjr_freq_table; -#else const uint8 note_lengths[] = { 0, 0, 0, 2, @@ -341,7 +331,6 @@ static const uint16 pcjr_freq_table[12] = { 65472, 61760, 58304, 55040, 52032, 49024, 46272, 43648, 41216, 38912, 36736, 34624 }; -#endif Player_V2::Player_V2(ScummEngine *scumm, Audio::Mixer *mixer, bool pcjr) { @@ -977,30 +966,3 @@ void Player_V2::mutex_down() { } } // End of namespace Scumm - -#ifdef PALMOS_68K -#include "scumm_globals.h" - -_GINIT(PlayerV2) -_GSETPTR(Scumm::note_lengths, GBVARS_NOTELENGTHS_INDEX, uint8, GBVARS_SCUMM) -_GSETPTR(Scumm::hull_offsets, GBVARS_HULLOFFSETS_INDEX, uint16, GBVARS_SCUMM) -_GSETPTR(Scumm::hulls, GBVARS_HULLS_INDEX, int16, GBVARS_SCUMM) -_GSETPTR(Scumm::freqmod_lengths, GBVARS_FREQMODLENGTHS_INDEX, uint16, GBVARS_SCUMM) -_GSETPTR(Scumm::freqmod_offsets, GBVARS_FREQMODOFFSETS_INDEX, uint16, GBVARS_SCUMM) -_GSETPTR(Scumm::freqmod_table, GBVARS_FREQMODTABLE_INDEX, int8, GBVARS_SCUMM) -_GSETPTR(Scumm::spk_freq_table, GBVARS_SPKFREQTABLE_INDEX, uint16, GBVARS_SCUMM) -_GSETPTR(Scumm::pcjr_freq_table, GBVARS_PCJRFREQTABLE_INDEX, uint16, GBVARS_SCUMM) -_GEND - -_GRELEASE(PlayerV2) -_GRELEASEPTR(GBVARS_NOTELENGTHS_INDEX, GBVARS_SCUMM) -_GRELEASEPTR(GBVARS_HULLOFFSETS_INDEX, GBVARS_SCUMM) -_GRELEASEPTR(GBVARS_HULLS_INDEX, GBVARS_SCUMM) -_GRELEASEPTR(GBVARS_FREQMODLENGTHS_INDEX, GBVARS_SCUMM) -_GRELEASEPTR(GBVARS_FREQMODOFFSETS_INDEX, GBVARS_SCUMM) -_GRELEASEPTR(GBVARS_FREQMODTABLE_INDEX, GBVARS_SCUMM) -_GRELEASEPTR(GBVARS_SPKFREQTABLE_INDEX, GBVARS_SCUMM) -_GRELEASEPTR(GBVARS_PCJRFREQTABLE_INDEX, GBVARS_SCUMM) -_GEND - -#endif diff --git a/engines/scumm/player_v2a.cpp b/engines/scumm/player_v2a.cpp index 7096021be9..ceabbc7d95 100644 --- a/engines/scumm/player_v2a.cpp +++ b/engines/scumm/player_v2a.cpp @@ -32,20 +32,15 @@ namespace Scumm { #define BASE_FREQUENCY 3579545 -#ifdef PALMOS_68K -static uint32 *CRCtable = NULL; -#else static uint32 CRCtable[256]; -#endif -static void InitCRC (void) -{ + +static void InitCRC (void) { const uint32 poly = 0xEDB88320; int i, j; uint32 n; - for (i = 0; i < 256; i++) - { + for (i = 0; i < 256; i++) { n = i; for (j = 0; j < 8; j++) n = (n & 1) ? ((n >> 1) ^ poly) : (n >> 1); @@ -53,8 +48,7 @@ static void InitCRC (void) } } -static uint32 GetCRC (byte *data, int len) -{ +static uint32 GetCRC (byte *data, int len) { uint32 CRC = 0xFFFFFFFF; int i; for (i = 0; i < len; i++) @@ -1116,8 +1110,7 @@ public: } virtual bool update() { assert(_id); - if (_curfreq >= _freq2) - { + if (_curfreq >= _freq2) { _mod->setChannelFreq(_id, BASE_FREQUENCY / _curfreq); _curfreq -= _bendrate; if (--_bendctr) @@ -1125,9 +1118,7 @@ public: _bendrate--; if (_bendrate < 2) _bendrate = 2; - } - else - { + } else { if (!--_holdctr) return false; } @@ -1163,15 +1154,12 @@ public: } virtual bool update() { assert(_id); - if (!_loop) - { + if (!_loop) { _vol--; if (_vol) _mod->setChannelVol(_id, _vol); else return false; - } - else if (!--_loop) - { + } else if (!--_loop) { _mod->stopChannel(_id); char *tmp_data = (char *)malloc(_size2); memcpy(tmp_data, _data + _offset2, _size2); @@ -1309,9 +1297,6 @@ Player_V2A::Player_V2A(ScummEngine *scumm, Audio::Mixer *mixer) { int i; _vm = scumm; -#ifdef PALMOS_68K - if (!CRCtable) CRCtable = (uint32 *)calloc(256, sizeof(uint32)); -#endif InitCRC(); for (i = 0; i < V2A_MAXSLOTS; i++) { @@ -1325,9 +1310,6 @@ Player_V2A::Player_V2A(ScummEngine *scumm, Audio::Mixer *mixer) { Player_V2A::~Player_V2A() { delete _mod; -#ifdef PALMOS_68K - free(CRCtable); -#endif } void Player_V2A::setMusicVolume (int vol) { diff --git a/engines/scumm/resource.cpp b/engines/scumm/resource.cpp index 88df9da6c7..d96ecc58f6 100644 --- a/engines/scumm/resource.cpp +++ b/engines/scumm/resource.cpp @@ -597,7 +597,7 @@ void ScummEngine::ensureResourceLoaded(int type, int i) { i = _resourceMapper[i & 0x7F]; } - // FIXME - TODO: This check used to be "i==0". However, that causes + // FIXME: This check used to be "i==0". However, that causes // problems when using this function to ensure charset 0 is loaded. // This is done for many games, e.g. Zak256 or Indy3 (EGA and VGA). // For now we restrict the check to anything which is not a charset. diff --git a/engines/scumm/saveload.cpp b/engines/scumm/saveload.cpp index 3f638946c4..0e485e226a 100644 --- a/engines/scumm/saveload.cpp +++ b/engines/scumm/saveload.cpp @@ -344,7 +344,7 @@ bool ScummEngine::loadState(int slot, bool compat) { // Restore the virtual screens and force a fade to black. initScreens(0, _screenHeight); - VirtScreen *vs = &virtscr[kMainVirtScreen]; + VirtScreen *vs = &_virtscr[kMainVirtScreen]; memset(vs->getPixels(0, 0), 0, vs->pitch * vs->h); vs->setDirtyRange(0, vs->h); updateDirtyScreen(kMainVirtScreen); diff --git a/engines/scumm/script_v0.cpp b/engines/scumm/script_v0.cpp index 62e5cee03b..143e926604 100644 --- a/engines/scumm/script_v0.cpp +++ b/engines/scumm/script_v0.cpp @@ -527,9 +527,9 @@ void ScummEngine_v0::drawSentence() { } _string[2].charset = 1; - _string[2].ypos = virtscr[kVerbVirtScreen].topline; + _string[2].ypos = _virtscr[kVerbVirtScreen].topline; _string[2].xpos = 0; - _string[2].right = virtscr[kVerbVirtScreen].w - 1; + _string[2].right = _virtscr[kVerbVirtScreen].w - 1; _string[2].color = 16; byte string[80]; @@ -550,10 +550,10 @@ void ScummEngine_v0::drawSentence() { } string[i] = 0; - sentenceline.top = virtscr[kVerbVirtScreen].topline; - sentenceline.bottom = virtscr[kVerbVirtScreen].topline + 8; + sentenceline.top = _virtscr[kVerbVirtScreen].topline; + sentenceline.bottom = _virtscr[kVerbVirtScreen].topline + 8; sentenceline.left = 0; - sentenceline.right = virtscr[kVerbVirtScreen].w - 1; + sentenceline.right = _virtscr[kVerbVirtScreen].w - 1; restoreBackground(sentenceline); drawString(2, (byte*)string); diff --git a/engines/scumm/script_v2.cpp b/engines/scumm/script_v2.cpp index 767d9495cc..532acc98a3 100644 --- a/engines/scumm/script_v2.cpp +++ b/engines/scumm/script_v2.cpp @@ -1053,9 +1053,9 @@ void ScummEngine_v2::o2_drawSentence() { } _string[2].charset = 1; - _string[2].ypos = virtscr[kVerbVirtScreen].topline; + _string[2].ypos = _virtscr[kVerbVirtScreen].topline; _string[2].xpos = 0; - _string[2].right = virtscr[kVerbVirtScreen].w - 1; + _string[2].right = _virtscr[kVerbVirtScreen].w - 1; if (_game.platform == Common::kPlatformNES) { _string[2].xpos = 16; _string[2].color = 0; @@ -1087,15 +1087,15 @@ void ScummEngine_v2::o2_drawSentence() { string[i] = 0; if (_game.platform == Common::kPlatformNES) { - sentenceline.top = virtscr[kVerbVirtScreen].topline; - sentenceline.bottom = virtscr[kVerbVirtScreen].topline + 16; + sentenceline.top = _virtscr[kVerbVirtScreen].topline; + sentenceline.bottom = _virtscr[kVerbVirtScreen].topline + 16; sentenceline.left = 16; - sentenceline.right = virtscr[kVerbVirtScreen].w - 1; + sentenceline.right = _virtscr[kVerbVirtScreen].w - 1; } else { - sentenceline.top = virtscr[kVerbVirtScreen].topline; - sentenceline.bottom = virtscr[kVerbVirtScreen].topline + 8; + sentenceline.top = _virtscr[kVerbVirtScreen].topline; + sentenceline.bottom = _virtscr[kVerbVirtScreen].topline + 8; sentenceline.left = 0; - sentenceline.right = virtscr[kVerbVirtScreen].w - 1; + sentenceline.right = _virtscr[kVerbVirtScreen].w - 1; } restoreBackground(sentenceline); @@ -1590,9 +1590,9 @@ void ScummEngine_v2::setUserState(byte state) { // Hide all verbs and inventory Common::Rect rect; - rect.top = virtscr[kVerbVirtScreen].topline; - rect.bottom = virtscr[kVerbVirtScreen].topline + 8 * 88; - rect.right = virtscr[kVerbVirtScreen].w - 1; + rect.top = _virtscr[kVerbVirtScreen].topline; + rect.bottom = _virtscr[kVerbVirtScreen].topline + 8 * 88; + rect.right = _virtscr[kVerbVirtScreen].w - 1; if (_game.platform == Common::kPlatformNES) { rect.left = 16; } else { diff --git a/engines/scumm/script_v5.cpp b/engines/scumm/script_v5.cpp index c4f7937aa4..3cd71bac08 100644 --- a/engines/scumm/script_v5.cpp +++ b/engines/scumm/script_v5.cpp @@ -2929,8 +2929,8 @@ void ScummEngine_v5::o5_oldRoomEffect() { // For now, we force a redraw of the screen background. This // way the Zak end credits seem to work mostly correct. - VirtScreen *vs = &virtscr[0]; - restoreBackground(Common::Rect(0,vs->topline, vs->w, vs->topline + vs->h)); + VirtScreen *vs = &_virtscr[kMainVirtScreen]; + restoreBackground(Common::Rect(0, vs->topline, vs->w, vs->topline + vs->h)); vs->setDirtyRange(0, vs->h); updateDirtyScreen(kMainVirtScreen); diff --git a/engines/scumm/script_v6.cpp b/engines/scumm/script_v6.cpp index 7e0d705377..e436489f25 100644 --- a/engines/scumm/script_v6.cpp +++ b/engines/scumm/script_v6.cpp @@ -2715,7 +2715,7 @@ void ScummEngine_v6::o6_kernelGetFunctions() { int i; int slot; Actor *a; - VirtScreen *vs = &virtscr[0]; + VirtScreen *vs = &_virtscr[kMainVirtScreen]; getStackList(args, ARRAYSIZE(args)); diff --git a/engines/scumm/scumm-md5.h b/engines/scumm/scumm-md5.h index 4f6b2477c6..69d2bea3e0 100644 --- a/engines/scumm/scumm-md5.h +++ b/engines/scumm/scumm-md5.h @@ -1,5 +1,5 @@ /* - This file was generated by the md5table tool on Fri Jul 20 21:25:14 2007 + This file was generated by the md5table tool on Mon Aug 13 12:40:13 2007 DO NOT EDIT MANUALLY! */ @@ -104,9 +104,9 @@ static const MD5Table md5table[] = { { "2232b0b9411575b1f9961713ebc9de61", "balloon", "HE 80", "", -1, Common::ES_ESP, Common::kPlatformWindows }, { "225e18566e810c634bf7de63e7568e3e", "mustard", "", "", -1, Common::EN_USA, Common::kPlatformUnknown }, { "22c9eb04455440131ffc157aeb8d40a8", "fbear", "HE 70", "Demo", -1, Common::EN_ANY, Common::kPlatformWindows }, - { "22d07d6c386c9c25aca5dac2a0c0d94b", "maniac", "NES", "", -1, Common::SE_SWE, Common::kPlatformNES }, + { "22d07d6c386c9c25aca5dac2a0c0d94b", "maniac", "NES", "", 262144, Common::SE_SWE, Common::kPlatformNES }, { "22f4ea88a09da12df9308ba30bcb7d0f", "loom", "EGA", "EGA", -1, Common::EN_ANY, Common::kPlatformPC }, - { "257f8c14d8c584f7ddd601bcb00920c7", "maniac", "NES", "", -1, Common::DE_DEU, Common::kPlatformNES }, + { "257f8c14d8c584f7ddd601bcb00920c7", "maniac", "NES", "", 262144, Common::DE_DEU, Common::kPlatformNES }, { "2723fea3dae0cb47768c424b145ae0e7", "tentacle", "", "Floppy", 7932, Common::EN_ANY, Common::kPlatformPC }, { "27b3a4224ad63d5b04627595c1c1a025", "zak", "V2", "V2", -1, Common::IT_ITA, Common::kPlatformAmiga }, { "28d24a33448fab6795850bc9f159a4a2", "atlantis", "", "Demo", 11170, Common::JA_JPN, Common::kPlatformFMTowns }, @@ -147,7 +147,7 @@ static const MD5Table md5table[] = { { "37ff1b308999c4cca7319edfcc1280a0", "puttputt", "HE 70", "Demo", 8269, Common::EN_ANY, Common::kPlatformWindows }, { "3824e60cdf639d22f6df92a03dc4b131", "fbear", "HE 61", "", 7732, Common::EN_ANY, Common::kPlatformPC }, { "387a544b8b10b26912d8413bab63a853", "monkey2", "", "Demo", -1, Common::EN_ANY, Common::kPlatformPC }, - { "3905799e081b80a61d4460b7b733c206", "maniac", "NES", "", -1, Common::EN_GRB, Common::kPlatformNES }, + { "3905799e081b80a61d4460b7b733c206", "maniac", "NES", "", 262144, Common::EN_GRB, Common::kPlatformNES }, { "3938ee1aa4433fca9d9308c9891172b1", "zak", "FM-TOWNS", "Demo", -1, Common::EN_ANY, Common::kPlatformFMTowns }, { "399b217b0c8d65d0398076da486363a9", "indy3", "VGA", "VGA", 6295, Common::DE_DEU, Common::kPlatformPC }, { "39cb9dec16fa16f38d79acd80effb059", "loom", "EGA", "EGA", -1, Common::FR_FRA, Common::kPlatformAmiga }, @@ -312,7 +312,7 @@ static const MD5Table md5table[] = { { "7f945525abcd48015adf1632637a44a1", "pajama", "", "Demo", -1, Common::FR_FRA, Common::kPlatformUnknown }, { "7fc6cdb46b4c9d384c52327f4bca6416", "football", "", "", -1, Common::EN_ANY, Common::kPlatformUnknown }, { "810a9da887aefa597b0cf3c77d262897", "BluesABCTime", "", "Demo", -1, Common::EN_ANY, Common::kPlatformUnknown }, - { "81bbfa181184cb494e7a81dcfa94fbd9", "maniac", "NES", "", -1, Common::FR_FRA, Common::kPlatformNES }, + { "81bbfa181184cb494e7a81dcfa94fbd9", "maniac", "NES", "", 262144, Common::FR_FRA, Common::kPlatformNES }, { "8299d9b8a1b0e7b881bae7a9971dc5e2", "zak", "V2", "Demo", 1916, Common::EN_ANY, Common::kPlatformAtariST }, { "8368f552b1e3eba559f8d559bcc4cadb", "freddi3", "", "", -1, Common::UNK_LANG, Common::kPlatformUnknown }, { "83cedbe26aa8b58988e984e3d34cac8e", "freddi3", "HE 99", "", -1, Common::DE_DEU, Common::kPlatformUnknown }, @@ -414,6 +414,7 @@ static const MD5Table md5table[] = { { "b5298a5c15ffbe8b381d51ea4e26d35c", "freddi4", "HE 99", "", -1, Common::DE_DEU, Common::kPlatformUnknown }, { "b597e0403cc0002f69170e6caba7edd9", "indy3", "EGA", "EGA Demo", 5361, Common::EN_ANY, Common::kPlatformPC }, { "b628506f7def772e40de0aa5440fb8e1", "activity", "HE 70", "", -1, Common::EN_ANY, Common::kPlatformWindows }, + { "b7d37d6b786b5a22deea3b038eca96ca", "maniac", "NES", "extracted", 2082, Common::ES_ESP, Common::kPlatformNES }, { "b886b0a5d909c7158a914e1d7c1c6c65", "loom", "EGA", "EGA", -1, Common::FR_FRA, Common::kPlatformPC }, { "b8955d7d23b4972229060d1592489fef", "freddicove", "HE 100", "", -1, Common::NL_NLD, Common::kPlatformUnknown }, { "b9ba19ce376efc69be78ef3baef8d2b9", "monkey", "CD", "", -1, Common::EN_ANY, Common::kPlatformMacintosh }, @@ -426,6 +427,7 @@ static const MD5Table md5table[] = { { "bf8b52fdd9a69c67f34e8e9fec72661c", "farm", "HE 71", "Demo", -1, Common::EN_ANY, Common::kPlatformWindows }, { "bfdf584b01503f0762baded581f6a0a2", "SoccerMLS", "", "", -1, Common::EN_ANY, Common::kPlatformWindows }, { "c0039ad982999c92d0de81910d640fa0", "freddi", "HE 71", "", -1, Common::NL_NLD, Common::kPlatformWindows }, + { "c0d5c89550381ac433624fedad5e1100", "loom", "PC-Engine", "", -1, Common::JA_JPN, Common::kPlatformPCEngine }, { "c13225cb1bbd3bc9fe578301696d8021", "monkey", "SEGA", "", -1, Common::EN_ANY, Common::kPlatformSegaCD }, { "c24c490373aeb48fbd54caa8e7ae376d", "loom", "No Adlib", "EGA", -1, Common::DE_DEU, Common::kPlatformAtariST }, { "c25755b08a8d0d47695e05f1e2111bfc", "freddi4", "", "Demo", -1, Common::EN_USA, Common::kPlatformUnknown }, @@ -488,7 +490,7 @@ static const MD5Table md5table[] = { { "d7b247c26bf1f01f8f7daf142be84de3", "balloon", "HE 99", "Updated", -1, Common::EN_ANY, Common::kPlatformWindows }, { "d831f7c048574dd9d5d85db2a1468099", "maniac", "C64", "", -1, Common::EN_ANY, Common::kPlatformC64 }, { "d8323015ecb8b10bf53474f6e6b0ae33", "dig", "", "", 16304, Common::UNK_LANG, Common::kPlatformUnknown }, - { "d8d07efcb88f396bee0b402b10c3b1c9", "maniac", "NES", "", -1, Common::EN_USA, Common::kPlatformNES }, + { "d8d07efcb88f396bee0b402b10c3b1c9", "maniac", "NES", "", 262144, Common::EN_USA, Common::kPlatformNES }, { "d917f311a448e3cc7239c31bddb00dd2", "samnmax", "", "CD", 9080, Common::EN_ANY, Common::kPlatformUnknown }, { "d9d0dd93d16ab4dec55cabc2b86bbd17", "samnmax", "", "Demo", 6478, Common::EN_ANY, Common::kPlatformPC }, { "da09e666fc8f5b78d7b0ac65d1a3b56e", "monkey2", "", "", 11135, Common::EN_ANY, Common::kPlatformFMTowns }, @@ -537,6 +539,7 @@ static const MD5Table md5table[] = { { "f049e38c1f8302b5db6170f1872af89a", "monkey", "CD", "CD", 8955, Common::ES_ESP, Common::kPlatformPC }, { "f06e66fd45b2f8b0f4a2833ff4476050", "fbpack", "", "", -1, Common::HB_ISR, Common::kPlatformPC }, { "f08145577e4f13584cc90b3d6e9caa55", "pajama3", "", "Demo", -1, Common::NL_NLD, Common::kPlatformUnknown }, + { "f163cf53f7850e43fb482471e5c52e1a", "maniac", "NES", "", 262144, Common::ES_ESP, Common::kPlatformNES }, { "f1b0e0d587b85052de5534a3847e68fe", "water", "HE 99", "Updated", -1, Common::EN_ANY, Common::kPlatformUnknown }, { "f237bf8a5ef9af78b2a6a4f3901da341", "pajama", "", "Demo", 18354, Common::EN_ANY, Common::kPlatformUnknown }, { "f27b1ba0eadaf2a6617b2b58192d1dbf", "samnmax", "", "Floppy", -1, Common::DE_DEU, Common::kPlatformPC }, diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index e54060c9e1..60911a97dd 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -41,6 +41,7 @@ #include "scumm/debugger.h" #include "scumm/dialogs.h" #include "scumm/file.h" +#include "scumm/file_nes.h" #include "scumm/imuse/imuse.h" #include "scumm/imuse_digi/dimuse.h" #include "scumm/smush/smush_mixer.h" @@ -227,7 +228,7 @@ ScummEngine::ScummEngine(OSystem *syst, const DetectorResult &dr) _roomWidth = 0; _screenHeight = 0; _screenWidth = 0; - memset(virtscr, 0, sizeof(virtscr)); + memset(_virtscr, 0, sizeof(_virtscr)); memset(&camera, 0, sizeof(CameraData)); memset(_colorCycle, 0, sizeof(_colorCycle)); memset(_colorUsedByCycle, 0, sizeof(_colorUsedByCycle)); @@ -1196,12 +1197,7 @@ void ScummEngine::setupScumm() { } int maxHeapThreshold = -1; -#ifdef PALMOS_68K - if (_game.features & GF_NEW_COSTUMES) - maxHeapThreshold = gVars->memory[kMemScummNewCostGames]; - else - maxHeapThreshold = gVars->memory[kMemScummOldCostGames]; -#else + if (_game.features & GF_NEW_COSTUMES) { // Since the new costumes are very big, we increase the heap limit, to avoid having // to constantly reload stuff from the data files. @@ -1209,7 +1205,7 @@ void ScummEngine::setupScumm() { } else { maxHeapThreshold = 550000; } -#endif + _res->setHeapThreshold(400000, maxHeapThreshold); #if (defined(PALMOS_ARM) || defined(PALMOS_DEBUG) || defined(__GP32__)) @@ -1381,7 +1377,7 @@ void ScummEngine::resetScumm() { } camera._follows = 0; - virtscr[0].xstart = 0; + _virtscr[0].xstart = 0; _mouse.x = 104; _mouse.y = 56; diff --git a/engines/scumm/scumm.h b/engines/scumm/scumm.h index 18c2275029..2a155c7e02 100644 --- a/engines/scumm/scumm.h +++ b/engines/scumm/scumm.h @@ -917,7 +917,7 @@ protected: public: int _roomHeight, _roomWidth; int _screenHeight, _screenWidth; - VirtScreen virtscr[4]; // Virtual screen areas + VirtScreen _virtscr[4]; // Virtual screen areas CameraData camera; // 'Camera' - viewport int _screenStartStrip, _screenEndStrip; @@ -1031,7 +1031,6 @@ protected: void updateDirtyScreen(VirtScreenNumber slot); void drawStripToScreen(VirtScreen *vs, int x, int w, int t, int b); void ditherCGA(byte *dst, int dstPitch, int x, int y, int width, int height) const; - void scale2x(byte *dst, int dstPitch, const byte *src, int srcPitch, int w, int h); public: VirtScreen *findVirtScreen(int y); diff --git a/engines/scumm/smush/codec47.cpp b/engines/scumm/smush/codec47.cpp index 6904e96c11..739c7308d3 100644 --- a/engines/scumm/smush/codec47.cpp +++ b/engines/scumm/smush/codec47.cpp @@ -88,9 +88,6 @@ static const int8 codec47_table_big2[] = { 0, 0, 0, 0, 1, 3, 4, 6, 7, 7, 7, 7, 6, 4, 3, 1, }; -#ifdef PALMOS_68K -static const int8 *codec47_table; -#else static const int8 codec47_table[] = { 0, 0, -1, -43, 6, -43, -9, -42, 13, -41, -16, -40, 19, -39, -23, -36, 26, -34, -2, -33, @@ -144,7 +141,6 @@ static const int8 codec47_table[] = { 23, 36, -19, 39, 16, 40, -13, 41, 9, 42, -6, 43, 1, 43, 0, 0, 0, 0, 0, 0 }; -#endif void Codec47Decoder::makeTablesInterpolation(int param) { int32 variable1, variable2; @@ -617,16 +613,3 @@ bool Codec47Decoder::decode(byte *dst, const byte *src) { } } // End of namespace Scumm - -#ifdef PALMOS_68K -#include "scumm_globals.h" - -_GINIT(Codec47) -_GSETPTR(Scumm::codec47_table, GBVARS_CODEC47TABLE_INDEX, int8, GBVARS_SCUMM) -_GEND - -_GRELEASE(Codec47) -_GRELEASEPTR(GBVARS_CODEC47TABLE_INDEX, GBVARS_SCUMM) -_GEND - -#endif diff --git a/engines/scumm/smush/smush_player.cpp b/engines/scumm/smush/smush_player.cpp index ce39302e25..612f2771db 100644 --- a/engines/scumm/smush/smush_player.cpp +++ b/engines/scumm/smush/smush_player.cpp @@ -265,6 +265,8 @@ SmushPlayer::~SmushPlayer() { } void SmushPlayer::init(int32 speed) { + VirtScreen *vs = &_vm->_virtscr[kMainVirtScreen]; + _frame = 0; _speed = speed; _endOfFile = false; @@ -273,7 +275,7 @@ void SmushPlayer::init(int32 speed) { _vm->_smushActive = true; _vm->setDirtyColors(0, 255); - _dst = _vm->virtscr[0].getPixels(0, 0); + _dst = vs->getPixels(0, 0); // HACK HACK HACK: This is an *evil* trick, beware! // We do this to fix bug #1037052. A proper solution would change all the @@ -281,10 +283,10 @@ void SmushPlayer::init(int32 speed) { // However, since a lot of the SMUSH code currently assumes the screen // width and pitch to be equal, this will require lots of changes. So // we resort to this hackish solution for now. - _origPitch = _vm->virtscr[0].pitch; + _origPitch = vs->pitch; _origNumStrips = _vm->_gdi->_numStrips; - _vm->virtscr[0].pitch = _vm->virtscr[0].w; - _vm->_gdi->_numStrips = _vm->virtscr[0].w / 8; + vs->pitch = vs->w; + _vm->_gdi->_numStrips = vs->w / 8; _vm->_mixer->stopHandle(_compressedFileSoundHandle); _vm->_mixer->stopHandle(_IACTchannel); @@ -319,7 +321,7 @@ void SmushPlayer::release() { // HACK HACK HACK: This is an *evil* trick, beware! See above for // some explanation. - _vm->virtscr[0].pitch = _origPitch; + _vm->_virtscr[kMainVirtScreen].pitch = _origPitch; _vm->_gdi->_numStrips = _origNumStrips; delete _codec37; diff --git a/engines/scumm/string.cpp b/engines/scumm/string.cpp index 32fdf0e04e..83b4e90cf6 100644 --- a/engines/scumm/string.cpp +++ b/engines/scumm/string.cpp @@ -456,7 +456,7 @@ void ScummEngine::CHARSET_1() { if (a && _string[0].overhead) { int s; - _string[0].xpos = a->getPos().x - virtscr[0].xstart; + _string[0].xpos = a->getPos().x - _virtscr[kMainVirtScreen].xstart; _string[0].ypos = a->getPos().y - a->getElevation() - _screenTop; if (_game.version <= 5) { @@ -586,7 +586,7 @@ void ScummEngine::CHARSET_1() { _nextTop += _charset->getFontHeight(); } if (_game.version > 3) { - // FIXME - is this really needed? + // FIXME: is this really needed? _charset->_disableOffsX = true; } continue; @@ -678,7 +678,7 @@ void ScummEngine_v8::CHARSET_1() { if (a && _string[0].overhead) { int s; - _string[0].xpos = a->getPos().x - virtscr[0].xstart; + _string[0].xpos = a->getPos().x - _virtscr[kMainVirtScreen].xstart; s = a->_scalex * a->_talkPosX / 255; _string[0].xpos += (a->_talkPosX - s) / 2 + s; diff --git a/engines/scumm/thumbnail.cpp b/engines/scumm/thumbnail.cpp index 01255f1c1d..360d0de932 100644 --- a/engines/scumm/thumbnail.cpp +++ b/engines/scumm/thumbnail.cpp @@ -99,7 +99,7 @@ Graphics::Surface *ScummEngine::loadThumbnail(Common::InSaveFile *file) { void ScummEngine::saveThumbnail(Common::OutSaveFile *file) { Graphics::Surface thumb; -#if !defined(PALMOS_68K) || !defined(__DS__) +#if !defined(__DS__) if (!createThumbnailFromScreen(&thumb)) #endif thumb.create(kThumbnailWidth, kThumbnailHeight2, sizeof(uint16)); diff --git a/engines/scumm/verbs.cpp b/engines/scumm/verbs.cpp index 56ee454240..3c5713d241 100644 --- a/engines/scumm/verbs.cpp +++ b/engines/scumm/verbs.cpp @@ -86,7 +86,7 @@ static const VerbSettings v0VerbTable_German[] = { }; void ScummEngine_v0::resetVerbs() { - VirtScreen *virt = &virtscr[kVerbVirtScreen]; + VirtScreen *virt = &_virtscr[kVerbVirtScreen]; VerbSlot *vs; int i; @@ -121,7 +121,7 @@ void ScummEngine_v0::resetVerbs() { } void ScummEngine_v0::setNewKidVerbs() { - VirtScreen *virt = &virtscr[kVerbVirtScreen]; + VirtScreen *virt = &_virtscr[kVerbVirtScreen]; VerbSlot *vs; int i; @@ -283,7 +283,7 @@ void ScummEngine_v2::initNESMouseOver() { } void ScummEngine_v2::checkV2MouseOver(Common::Point pos) { - VirtScreen *vs = &virtscr[kVerbVirtScreen]; + VirtScreen *vs = &_virtscr[kVerbVirtScreen]; Common::Rect rect; byte *ptr, *dst; int i, x, y, new_box = -1; @@ -346,7 +346,7 @@ void ScummEngine_v2::checkV2Inventory(int x, int y) { int inventoryArea = (_game.platform == Common::kPlatformNES) ? 48: 32; int object = 0; - y -= virtscr[kVerbVirtScreen].topline; + y -= _virtscr[kVerbVirtScreen].topline; if ((y < inventoryArea) || !(_mouseAndKeyboardStat & MBS_LEFT_CLICK)) return; @@ -391,7 +391,7 @@ void ScummEngine_v2::checkV2Inventory(int x, int y) { } void ScummEngine_v2::redrawV2Inventory() { - VirtScreen *vs = &virtscr[kVerbVirtScreen]; + VirtScreen *vs = &_virtscr[kVerbVirtScreen]; int i; int max_inv; Common::Rect inventoryBox; @@ -405,7 +405,7 @@ void ScummEngine_v2::redrawV2Inventory() { // Clear on all invocations inventoryBox.top = vs->topline + inventoryArea; - inventoryBox.bottom = vs->topline + virtscr[kVerbVirtScreen].h; + inventoryBox.bottom = vs->topline + vs->h; inventoryBox.left = 0; inventoryBox.right = vs->w; restoreBackground(inventoryBox); @@ -1014,8 +1014,8 @@ void ScummEngine::setVerbObject(uint room, uint object, uint verb) { } else if (_game.features & GF_SMALL_HEADER) { for (i = (_numLocalObjects-1); i > 0; i--) { if (_objs[i].obj_nr == object) { - // FIXME - the only thing we need from the OBCD is the image size! - // So we could use almost the same code (save for offsets) + // FIXME: the only thing we need from the OBCD is the image size! + // So we could use almost the same code (except for offsets) // as in the GF_OLD_BUNDLE code. But of course that would break save games // unless we insert special conversion code... <sigh> findObjectInRoom(&foir, foImageHeader, object, room); |