From f4d38ccd407f2a007050d69e4841ba7fc53cd401 Mon Sep 17 00:00:00 2001 From: Florian Kagerer Date: Sat, 7 Aug 2010 14:38:07 +0000 Subject: LOL: added english floppy version svn-id: r51834 --- dists/engine-data/kyra.dat | Bin 355277 -> 355807 bytes engines/cruise/script.cpp | 4 ++-- engines/kyra/detection_tables.h | 17 +++++++++++++++++ engines/kyra/lol.cpp | 2 +- engines/kyra/lol.h | 2 +- engines/kyra/staticres.cpp | 2 +- engines/kyra/staticres_lol.cpp | 23 ++++++++++++----------- tools/create_kyradat/create_kyradat.cpp | 2 +- tools/create_kyradat/games.cpp | 1 + tools/create_kyradat/tables.cpp | 3 +++ 10 files changed, 39 insertions(+), 17 deletions(-) diff --git a/dists/engine-data/kyra.dat b/dists/engine-data/kyra.dat index ff21159362..d8cb28076a 100644 Binary files a/dists/engine-data/kyra.dat and b/dists/engine-data/kyra.dat differ diff --git a/engines/cruise/script.cpp b/engines/cruise/script.cpp index f2877a7730..d6c1aa47f3 100644 --- a/engines/cruise/script.cpp +++ b/engines/cruise/script.cpp @@ -618,13 +618,13 @@ int executeScripts(scriptInstanceStruct *ptr) { positionInStack = 0; do { -#ifdef SKIP_INTRO +//#ifdef SKIP_INTRO if (currentScriptPtr->scriptOffset == 290 && currentScriptPtr->overlayNumber == 4 && currentScriptPtr->scriptNumber == 0) { currentScriptPtr->scriptOffset = 923; } -#endif +//#endif opcodeType = getByteFromScript(); debugC(5, kCruiseDebugScript, "Script %s/%d ip=%d opcode=%d", diff --git a/engines/kyra/detection_tables.h b/engines/kyra/detection_tables.h index fe4cc7298f..8eabb15264 100644 --- a/engines/kyra/detection_tables.h +++ b/engines/kyra/detection_tables.h @@ -1108,6 +1108,23 @@ const KYRAGameDescription adGameDescs[] = { LOL_FLOPPY_FLAGS }, + { + { + "lol", + "Extracted", + { + { "GENERAL.PAK", 0, "0f1fabc1f67b772a30d8e05ece720ac5", -1 }, + { "CHAPTER7.PAK", 0, "482308aba1c40ee32449b91b0c63b990", -1 }, + { 0, 0, 0, 0 } + }, + Common::EN_ANY, + Common::kPlatformPC, + ADGF_NO_FLAGS, + Common::GUIO_NOSPEECH | Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIGM | Common::GUIO_MIDIPCSPK + }, + LOL_FLOPPY_FLAGS + }, + { { "lol", diff --git a/engines/kyra/lol.cpp b/engines/kyra/lol.cpp index 98f0e31b69..03d52ec4ac 100644 --- a/engines/kyra/lol.cpp +++ b/engines/kyra/lol.cpp @@ -4291,7 +4291,7 @@ void LoLEngine::drawMapPage(int pageNum) { if (!_defaultLegendData[ii].enable) continue; _screen->copyBlockAndApplyOverlay(_screen->_curPage, 235, (tY << 3) + 21 + yOffset, _screen->_curPage, 235 + xOffset, (tY << 3) + 21 + yOffset, 7, 6, 0, _mapOverlay); - _screen->drawShape(_screen->_curPage, _automapShapes[_defaultLegendData[ii].shapeIndex << 2], 232 + xOffset, (tY << 3) + 18 + yOffset + _defaultLegendData[ii].x, 0, 0); + _screen->drawShape(_screen->_curPage, _automapShapes[_defaultLegendData[ii].shapeIndex << 2], 232 + xOffset, (tY << 3) + 18 + yOffset + _defaultLegendData[ii].y, 0, 0); printMapText(_defaultLegendData[ii].stringId, 244 + xOffset, (tY << 3) + 22 + yOffset); tY++; } diff --git a/engines/kyra/lol.h b/engines/kyra/lol.h index b5a657ac15..57c127a94f 100644 --- a/engines/kyra/lol.h +++ b/engines/kyra/lol.h @@ -256,7 +256,7 @@ struct LevelTempData { struct MapLegendData { uint8 shapeIndex; bool enable; - int8 x; + int8 y; uint16 stringId; }; diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp index 274acae22c..4b71b1d69d 100644 --- a/engines/kyra/staticres.cpp +++ b/engines/kyra/staticres.cpp @@ -42,7 +42,7 @@ namespace Kyra { -#define RESFILE_VERSION 71 +#define RESFILE_VERSION 72 namespace { bool checkKyraDat(Common::SeekableReadStream *file) { diff --git a/engines/kyra/staticres_lol.cpp b/engines/kyra/staticres_lol.cpp index dbf6808e37..3287ee37d6 100644 --- a/engines/kyra/staticres_lol.cpp +++ b/engines/kyra/staticres_lol.cpp @@ -372,31 +372,32 @@ void LoLEngine::initStaticResource() { _autoMapStrings = _staticres->loadRawDataBe16(kLolMapStringId, _autoMapStringsSize); - int tmpSize = 0; - const uint8 *tmp = _staticres->loadRawData(kLolLegendData, tmpSize); - tmpSize /= 5; - if (tmp) { - _defaultLegendData = new MapLegendData[tmpSize]; - for (int i = 0; i < tmpSize; i++) { + int tempSize; + const uint8 *tmp = _staticres->loadRawData(kLolLegendData, tempSize); + uint8 entrySize = tempSize / 12; + tempSize /= entrySize; + if (tempSize) { + _defaultLegendData = new MapLegendData[tempSize]; + for (int i = 0; i < tempSize; i++) { _defaultLegendData[i].shapeIndex = *tmp++; _defaultLegendData[i].enable = *tmp++ ? true : false; - _defaultLegendData[i].x = (int8)*tmp++; + _defaultLegendData[i].y = (entrySize == 5) ? (int8)*tmp++ : (i == 10 ? -5 : 0); _defaultLegendData[i].stringId = READ_LE_UINT16(tmp); tmp += 2; } _staticres->unloadId(kLolLegendData); } - tmp = _staticres->loadRawData(kLolMapCursorOvl, tmpSize); - _mapCursorOverlay = new uint8[tmpSize]; - memcpy(_mapCursorOverlay, tmp, tmpSize); + tmp = _staticres->loadRawData(kLolMapCursorOvl, tempSize); + _mapCursorOverlay = new uint8[tempSize]; + memcpy(_mapCursorOverlay, tmp, tempSize); _staticres->unloadId(kLolMapCursorOvl); _updateSpellBookCoords = _staticres->loadRawData(kLolSpellbookCoords, _updateSpellBookCoordsSize); _updateSpellBookAnimData = _staticres->loadRawData(kLolSpellbookAnim, _updateSpellBookAnimDataSize); _healShapeFrames = _staticres->loadRawData(kLolHealShapeFrames, _healShapeFramesSize); - tmp = _staticres->loadRawData(kLolLightningDefs, tmpSize); + tmp = _staticres->loadRawData(kLolLightningDefs, tempSize); if (tmp) { _lightningProps = new LightningProperty[5]; for (int i = 0; i < 5; i++) { diff --git a/tools/create_kyradat/create_kyradat.cpp b/tools/create_kyradat/create_kyradat.cpp index a9d1ecc721..85038a0820 100644 --- a/tools/create_kyradat/create_kyradat.cpp +++ b/tools/create_kyradat/create_kyradat.cpp @@ -45,7 +45,7 @@ #include enum { - kKyraDatVersion = 71 + kKyraDatVersion = 72 }; const ExtractFilename extractFilenames[] = { diff --git a/tools/create_kyradat/games.cpp b/tools/create_kyradat/games.cpp index 1bd7d31648..008120868f 100644 --- a/tools/create_kyradat/games.cpp +++ b/tools/create_kyradat/games.cpp @@ -99,6 +99,7 @@ const Game lolGames[] = { { kLol, { EN_ANY, -1, -1 }, kPlatformPC, kDemoVersion, { "30bb5af87d38adb47d3e6ce06b1cb042", 0 } }, // DOS floppy (no language specifc strings) + { kLol, { EN_ANY, -1, -1 }, kPlatformPC, kNoSpecial, { "0cc764a204f7ba8cefe1a5f14c479619", 0 } }, { kLol, { DE_DEU, -1, -1 }, kPlatformPC, kNoSpecial, { "6b843869772c1b779e1386be868c15dd", 0 } }, // PC98 (no language specifc strings) diff --git a/tools/create_kyradat/tables.cpp b/tools/create_kyradat/tables.cpp index dc8163901d..e2235b1b78 100644 --- a/tools/create_kyradat/tables.cpp +++ b/tools/create_kyradat/tables.cpp @@ -1281,6 +1281,7 @@ const ExtractEntrySearchData kLolIngamePakFilesProvider[] = { }; const ExtractEntrySearchData kLolCharacterDefsProvider[] = { + { UNK_LANG, kPlatformPC, { 0x00000492, 0x000046B0, { { 0x7A, 0x94, 0x8B, 0xC6, 0xF7, 0xF1, 0x2F, 0xF3, 0xBC, 0x1B, 0x0B, 0x4E, 0x00, 0xC9, 0x44, 0x58 } } } }, // floppy { UNK_LANG, kPlatformPC, { 0x00000492, 0x000047FD, { { 0x8C, 0x0B, 0x8B, 0xCE, 0xE0, 0xB0, 0x8F, 0xA9, 0x06, 0xC3, 0x98, 0xE6, 0x2E, 0x09, 0xB6, 0x93 } } } }, // floppy { UNK_LANG, kPlatformPC, { 0x00000492, 0x00004ACD, { { 0xDF, 0x87, 0xFE, 0x89, 0x59, 0xCC, 0x01, 0xD7, 0xC7, 0xEB, 0x16, 0xA4, 0x09, 0xAF, 0x5D, 0xC0 } } } }, // CD { UNK_LANG, kPlatformPC98, { 0x00000492, 0x00005893, { { 0x7C, 0x7E, 0xFB, 0x80, 0xD9, 0xB6, 0x16, 0x87, 0x80, 0xB7, 0x46, 0x9B, 0x96, 0x1A, 0x6A, 0xBE } } } }, @@ -1619,6 +1620,7 @@ const ExtractEntrySearchData kLolScrollYBottomProvider[] = { }; const ExtractEntrySearchData kLolButtonDefsProvider[] = { + { UNK_LANG, kPlatformPC, { 0x0000082A, 0x0000CAAE, { { 0xC1, 0x83, 0x0D, 0xA0, 0x66, 0x16, 0x3D, 0x31, 0xCE, 0x30, 0x9F, 0x4E, 0x00, 0x65, 0x5A, 0xC8 } } } }, // floppy { UNK_LANG, kPlatformPC, { 0x0000082A, 0x0000C34E, { { 0x7F, 0x9A, 0x0F, 0x28, 0x1A, 0x8F, 0x03, 0x46, 0x48, 0xEB, 0xC9, 0xB9, 0x23, 0x29, 0x5E, 0x50 } } } }, // floppy { UNK_LANG, kPlatformPC, { 0x0000082A, 0x0000C47B, { { 0xDF, 0x1A, 0x18, 0x1F, 0x58, 0x05, 0x1F, 0x56, 0xD8, 0x6D, 0xBB, 0x93, 0xEC, 0x35, 0x9D, 0xA5 } } } }, // CD { UNK_LANG, kPlatformPC98, { 0x0000082A, 0x0000AB58, { { 0xDD, 0x2B, 0xA9, 0x54, 0x60, 0x25, 0x2C, 0x74, 0xF8, 0x5D, 0xC6, 0xD2, 0x2C, 0x1A, 0x24, 0x44 } } } }, @@ -1675,6 +1677,7 @@ const ExtractEntrySearchData kLolButtonList8Provider[] = { }; const ExtractEntrySearchData kLolLegendDataProvider[] = { + { UNK_LANG, kPlatformUnknown, { 0x00000030, 0x00000858, { { 0x63, 0x5E, 0x60, 0xC7, 0x62, 0x2C, 0x5D, 0x8F, 0x74, 0x71, 0x98, 0xB7, 0x09, 0xD2, 0x51, 0xC7 } } } }, { UNK_LANG, kPlatformUnknown, { 0x0000003C, 0x00000A52, { { 0x81, 0xC5, 0xA4, 0xE7, 0x60, 0xDA, 0xD6, 0x5E, 0x19, 0xAB, 0xF3, 0xC7, 0xDD, 0xDB, 0x92, 0x5E } } } }, EXTRACT_END_ENTRY -- cgit v1.2.3