diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/kyra/lol.cpp | 8 | ||||
-rw-r--r-- | engines/kyra/lol.h | 3 | ||||
-rw-r--r-- | engines/kyra/resource.h | 1 | ||||
-rw-r--r-- | engines/kyra/scene_lol.cpp | 11 | ||||
-rw-r--r-- | engines/kyra/script_lol.cpp | 6 | ||||
-rw-r--r-- | engines/kyra/sprites_lol.cpp | 2 | ||||
-rw-r--r-- | engines/kyra/staticres.cpp | 7 | ||||
-rw-r--r-- | engines/kyra/text_lol.cpp | 28 |
8 files changed, 34 insertions, 32 deletions
diff --git a/engines/kyra/lol.cpp b/engines/kyra/lol.cpp index eb313821af..6ce05b1e3d 100644 --- a/engines/kyra/lol.cpp +++ b/engines/kyra/lol.cpp @@ -550,8 +550,12 @@ Common::Error LoLEngine::go() { return Common::kNoError; } - if (!_flags.isDemo && !_res->loadFileList("FILEDATA.FDT")) - error("Couldn't load file list: 'FILEDATA.FDT'"); + if (_flags.isTalkie && !_flags.isDemo) { + if (!_res->loadFileList("FILEDATA.FDT")) + error("Couldn't load file list: 'FILEDATA.FDT'"); + } else if (_pakFileList) { + _res->loadFileList(_pakFileList, _pakFileListSize); + } // Usually fonts etc. would be setup by the prologue code, if we skip // the prologue code we need to setup them manually here. diff --git a/engines/kyra/lol.h b/engines/kyra/lol.h index 7a112cfd8f..40dec5f712 100644 --- a/engines/kyra/lol.h +++ b/engines/kyra/lol.h @@ -332,6 +332,9 @@ private: void writeSettings(); void readSettings(); + const char *const *_pakFileList; + int _pakFileListSize; + // options int _monsterDifficulty; bool _smoothScrollingEnabled; diff --git a/engines/kyra/resource.h b/engines/kyra/resource.h index 508c698b9a..1c46eb22cd 100644 --- a/engines/kyra/resource.h +++ b/engines/kyra/resource.h @@ -216,6 +216,7 @@ enum kKyraResources { k3ItemStringMap, #ifdef ENABLE_LOL + kLolIngamePakFiles, kLolCharacterDefs, kLolIngameSfxFiles, kLolIngameSfxIndex, diff --git a/engines/kyra/scene_lol.cpp b/engines/kyra/scene_lol.cpp index 4a07072270..3dadeb91c8 100644 --- a/engines/kyra/scene_lol.cpp +++ b/engines/kyra/scene_lol.cpp @@ -443,9 +443,14 @@ void LoLEngine::loadLevelGraphics(const char *file, int specialColor, int weight char tname[13]; snprintf(tname, sizeof(tname), "LEVEL%.02d.TLC", _currentLevel); Common::SeekableReadStream *s = _res->createReadStream(tname); - s->read(_trueLightTable1, 256); - s->read(_trueLightTable2, 5120); - delete s; + if (s) { + s->read(_trueLightTable1, 256); + s->read(_trueLightTable2, 5120); + delete s; + } else { + memset(_trueLightTable1, 0, 256); + memset(_trueLightTable2, 0, 5120); + } _loadSuppFilesFlag = 1; } diff --git a/engines/kyra/script_lol.cpp b/engines/kyra/script_lol.cpp index e4b77f6a07..432603be5c 100644 --- a/engines/kyra/script_lol.cpp +++ b/engines/kyra/script_lol.cpp @@ -2257,6 +2257,10 @@ int LoLEngine::olol_setMouseCursor(EMCState *script) { int LoLEngine::olol_characterSays(EMCState *script) { debugC(3, kDebugLevelScriptFuncs, "LoLEngine::olol_characterSays(%p) (%d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2)); + + if (!_flags.isTalkie) + return 0; + if (stackPos(0) == -1) { snd_stopSpeech(true); return 1; @@ -2305,7 +2309,7 @@ int LoLEngine::olol_getLanguage(EMCState *script) { #pragma mark - int LoLEngine::tlol_setupPaletteFade(const TIM *tim, const uint16 *param) { - debugC(3, kDebugLevelScriptFuncs, "LoLEngine::t2_playSoundEffect(%p, %p) (%d)", (const void *)tim, (const void *)param, param[0]); + debugC(3, kDebugLevelScriptFuncs, "LoLEngine::tlol_setupPaletteFade(%p, %p) (%d)", (const void *)tim, (const void *)param, param[0]); _screen->getFadeParams(_screen->getPalette(0), param[0], _tim->_palDelayInc, _tim->_palDiff); _tim->_palDelayAcc = 0; return 1; diff --git a/engines/kyra/sprites_lol.cpp b/engines/kyra/sprites_lol.cpp index c88286bdc6..591c44daff 100644 --- a/engines/kyra/sprites_lol.cpp +++ b/engines/kyra/sprites_lol.cpp @@ -908,7 +908,7 @@ void LoLEngine::drawDoor(uint8 *shape, uint8 *table, int index, int unk2, int w, _shpDmY = _dscDoorMonsterY[t] + 120; if (flags & 1) { - //TODO + // TODO / UNUSED flags |=1; } diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp index 3bbc999ac3..5da88e8bce 100644 --- a/engines/kyra/staticres.cpp +++ b/engines/kyra/staticres.cpp @@ -45,7 +45,7 @@ namespace Kyra { -#define RESFILE_VERSION 52 +#define RESFILE_VERSION 53 namespace { bool checkKyraDat(Common::SeekableReadStream *file) { @@ -387,6 +387,8 @@ bool StaticResource::init() { { k2SeqplayIntroTracks, kStringList, "S_INTRO.TRA" }, // Ingame + { kLolIngamePakFiles, kStringList, "PAKFILES.TXT" }, + { kLolCharacterDefs, kLolCharData, "CHARACTER.DEF" }, { kLolIngameSfxFiles, kStringList, "SFXFILES.TRA" }, { kLolIngameSfxIndex, kRawData, "SFXINDEX.MAP" }, @@ -484,8 +486,6 @@ bool StaticResource::init() { _filenameTable = kyra3StaticRes; #ifdef ENABLE_LOL } else if (_vm->game() == GI_LOL) { - if (!_vm->gameFlags().isDemo && !_vm->gameFlags().isTalkie) - return true; _builtIn = 0; _filenameTable = kLolStaticRes; #endif // ENABLE_LOL @@ -1852,6 +1852,7 @@ void LoLEngine::initStaticResource() { if (_flags.isDemo) return; + _pakFileList = _staticres->loadStrings(kLolIngamePakFiles, _pakFileListSize); _charDefaults = _staticres->loadCharData(kLolCharacterDefs, _charDefaultsSize); _ingameSoundIndex = (const uint16 *)_staticres->loadRawData(kLolIngameSfxIndex, _ingameSoundIndexSize); _musicTrackMap = _staticres->loadRawData(kLolMusicTrackMap, _musicTrackMapSize); diff --git a/engines/kyra/text_lol.cpp b/engines/kyra/text_lol.cpp index 2174bcc441..2c7c71e0ee 100644 --- a/engines/kyra/text_lol.cpp +++ b/engines/kyra/text_lol.cpp @@ -138,22 +138,6 @@ void TextDisplayer_LoL::resetDimTextPositions(int dim) { _textDimData[dim].line = 0; } -/*void TextDisplayer_LoL::setAnimParameters(const char *str, int x, uint8 col1, uint8 col2) { - static const char defaultStr[] = "<MORE>"; - - if (str) { - _animString = str; - _animWidth = x; - _animColor1 = col1; - _animColor2 = col2; - } else { - _animString = defaultStr; - _animWidth = 7; - _animColor1 = 0; - _animColor2 = 0; - } -}*/ - void TextDisplayer_LoL::printDialogueText(int dim, char *str, EMCState *script, const uint16 *paramList, int16 paramIndex) { int oldDim = 0; @@ -403,7 +387,7 @@ void TextDisplayer_LoL::displayText(char *str, ...) { break; case 11: - //TODO + // TODO (UNUSED) break; case 12: @@ -414,23 +398,23 @@ void TextDisplayer_LoL::displayText(char *str, ...) { break; case 18: - //TODO + // TODO (UNUSED) break; case 23: - //TODO + // TODO (UNUSED) break; case 24: - //TODO + // TODO (UNUSED) break; case 26: - //TODO + // TODO (UNUSED) break; case 28: - //TODO + // TODO (UNUSED) break; default: |