aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dists/engine-data/kyra.datbin264840 -> 278908 bytes
-rw-r--r--engines/kyra/lol.cpp8
-rw-r--r--engines/kyra/lol.h3
-rw-r--r--engines/kyra/resource.h1
-rw-r--r--engines/kyra/scene_lol.cpp11
-rw-r--r--engines/kyra/script_lol.cpp6
-rw-r--r--engines/kyra/sprites_lol.cpp2
-rw-r--r--engines/kyra/staticres.cpp7
-rw-r--r--engines/kyra/text_lol.cpp28
-rw-r--r--tools/create_kyradat/create_kyradat.cpp10
-rw-r--r--tools/create_kyradat/create_kyradat.h2
-rw-r--r--tools/create_kyradat/lol_cd.h2
-rw-r--r--tools/create_kyradat/lol_floppy.h87
-rw-r--r--tools/create_kyradat/misc.h87
14 files changed, 216 insertions, 38 deletions
diff --git a/dists/engine-data/kyra.dat b/dists/engine-data/kyra.dat
index 10cf665a4a..a2046f17e5 100644
--- a/dists/engine-data/kyra.dat
+++ b/dists/engine-data/kyra.dat
Binary files differ
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:
diff --git a/tools/create_kyradat/create_kyradat.cpp b/tools/create_kyradat/create_kyradat.cpp
index 15c17fa981..f37ef58f36 100644
--- a/tools/create_kyradat/create_kyradat.cpp
+++ b/tools/create_kyradat/create_kyradat.cpp
@@ -31,7 +31,7 @@
#include "md5.h"
enum {
- kKyraDatVersion = 52,
+ kKyraDatVersion = 53,
kIndexSize = 12
};
@@ -54,6 +54,8 @@ enum {
#include "malcolm.h"
#include "lol_cd.h"
+#include "lol_floppy.h"
+//#include "lol_pc98.h"
#include "lol_demo.h"
const Game kyra1FanTranslations[] = {
@@ -272,6 +274,8 @@ const ExtractFilename extractFilenames[] = {
{ kLolSeqplayIntroTracks, k2TypeSoundList, "S_INTRO.TRA" },
// Ingame
+ { kLolIngamePakFiles, kTypeStringList, "PAKFILES.TXT" },
+
{ kLolCharacterDefs, kTypeRawData, "CHARACTER.DEF" },
{ kLolIngameSfxFiles, k2TypeSfxList, "SFXFILES.TRA" },
{ kLolIngameSfxIndex, kTypeRawData, "SFXINDEX.MAP" },
@@ -1538,7 +1542,9 @@ const Game *gameDescs[] = {
kyra3Games,
lolDemos,
- lolGames,
+ lolDosTalkieGames,
+ lolDosFloppyGames,
+ //lolPC98Games,
0
};
diff --git a/tools/create_kyradat/create_kyradat.h b/tools/create_kyradat/create_kyradat.h
index 5941467aab..d3a05db727 100644
--- a/tools/create_kyradat/create_kyradat.h
+++ b/tools/create_kyradat/create_kyradat.h
@@ -179,6 +179,8 @@ enum kExtractID {
kLolSeqplayIntroTracks,
+ kLolIngamePakFiles,
+
kLolCharacterDefs,
kLolIngameSfxFiles,
kLolIngameSfxIndex,
diff --git a/tools/create_kyradat/lol_cd.h b/tools/create_kyradat/lol_cd.h
index ab8a29062f..b719c244a6 100644
--- a/tools/create_kyradat/lol_cd.h
+++ b/tools/create_kyradat/lol_cd.h
@@ -88,7 +88,7 @@ const ExtractEntry lolCDFile2[] = {
{ -1, 0, 0 }
};
-const Game lolGames[] = {
+const Game lolDosTalkieGames[] = {
{ kLol, EN_ANY, kLolCD, "9d1778314de80598c0b0d032e2a1a1cf", lolCDFile1E },
{ kLol, EN_ANY, kLolCD, "263998ec600afca1cc7b935c473df670", lolCDFile2 },
GAME_DUMMY_ENTRY
diff --git a/tools/create_kyradat/lol_floppy.h b/tools/create_kyradat/lol_floppy.h
new file mode 100644
index 0000000000..41f8a78205
--- /dev/null
+++ b/tools/create_kyradat/lol_floppy.h
@@ -0,0 +1,87 @@
+const ExtractEntry lolFloppyFile2G[] = {
+ { kLolIngamePakFiles, 0x0038C38, 0x0038CC0 },
+
+ { kLolCharacterDefs, 0x0002A6D0, 0x0002AB62 },
+ { kLolIngameSfxFiles, 0x0002ACA0, 0x0002B592 },
+ { kLolIngameSfxIndex, 0x0002B592, 0x0002B97A },
+ { kLolMusicTrackMap, 0x0002ABB0, 0x0002ACA0 },
+ { kLolGMSfxIndex, 0x0002B980, 0x0002BA7A },
+ { kLolMT32SfxIndex, 0x0002BA80, 0x0002BB7A },
+ { kLolSpellProperties, 0x0002C0E0, 0x0002C1F8 },
+ { kLolGameShapeMap, 0x0002BE5C, 0x0002BF70 },
+ { kLolSceneItemOffs, 0x0003730F, 0x00037317 },
+ { kLolCharInvIndex, 0x0002BF70, 0x0002BF7A },
+ { kLolCharInvDefs, 0x0002BF7A, 0x0002BFD2 },
+ { kLolCharDefsMan, 0x0002BFD2, 0x0002BFE4 },
+ { kLolCharDefsWoman, 0x0002BFE4, 0x0002BFF6 },
+ { kLolCharDefsKieran, 0x0002BFF6, 0x0002C008 },
+ { kLolCharDefsAkshel, 0x0002C01A, 0x0002C02C },
+ { kLolExpRequirements, 0x00031750, 0x0003177C },
+ { kLolMonsterModifiers, 0x0003177C, 0x00031794 },
+ { kLolMonsterLevelOffsets, 0x000372DF, 0x000372FF },
+ { kLolMonsterDirFlags, 0x000372FF, 0x0003730F },
+ { kLolMonsterScaleY, 0x00036EC0, 0x00036EDE },
+ { kLolMonsterScaleX, 0x00036EDE, 0x00036EFE },
+ { kLolMonsterScaleWH, 0x00028F30, 0x00028FB2 },
+ { kLolFlyingItemShp, 0x00028FB2, 0x00029034 },
+ { kLolInventoryDesc, 0x00037ACE, 0x00037AE4 },
+
+ { kLolLevelShpList, 0x00037C02, 0x00037C81 },
+ { kLolLevelDatList, 0x00037C81, 0x00037D00 },
+ { kLolCompassDefs, 0x00029034, 0x00029134 },
+ { kLolStashSetup, 0x0003781D, 0x00037829 },
+
+ { kLolDscUnk1, 0x00037317, 0x0003733B },
+ { kLolDscShapeIndex1, 0x0003733B, 0x0003735F },
+ { kLolDscShapeIndex2, 0x0003735F, 0x00037369 },
+ { kLolDscScaleWidthData, 0x00037369, 0x000373B1 },
+ { kLolDscScaleHeightData, 0x000373B1, 0x000373F9 },
+ { kLolDscX, 0x000373F9, 0x00037441 },
+ { kLolDscY, 0x00037441, 0x00037465 },
+ { kLolDscTileIndex, 0x00037465, 0x00037477 },
+ { kLolDscUnk2, 0x00037477, 0x0003748E },
+ { kLolDscDoorShapeIndex, 0x0003748E, 0x000374A5 },
+ { kLolDscDimData1, 0x00036F03, 0x00037047 },
+ { kLolDscDimData2, 0x00037047, 0x000370D0 },
+ { kLolDscBlockMap, 0x00036E64, 0x00036E70 },
+ { kLolDscDimMap, 0x00036E70, 0x00036E82 },
+ { kLolDscDoorScale, 0x00036E82, 0x00036E92 },
+ { kLolDscShapeOvlIndex, 0x00036E92, 0x00036EBA },
+ { kLolDscDoor4, 0x00036EBA, 0x00036EC2 },
+ { kLolDscBlockIndex, 0x00038B87, 0x00038BCF },
+ { kLolDscDoor1, 0x0002C050, 0x0002C0D0 },
+ { kLolDscDoorX, 0x00028630, 0x00028AB0 },
+ { kLolDscDoorY, 0x00028AB0, 0x00028F30 },
+
+ { kLolScrollXTop, 0x0003C216, 0x0003C220 },
+ { kLolScrollYTop, 0x0003C220, 0x0003C22A },
+ { kLolScrollXBottom, 0x0003C22A, 0x0003C234 },
+ { kLolScrollYBottom, 0x0003C234, 0x0003C23E },
+
+ { kLolButtonDefs, 0x000297F0, 0x0002A01A },
+ { kLolButtonList1, 0x0002A020, 0x0002A070 },
+ { kLolButtonList2, 0x0002A070, 0x0002A08E },
+ { kLolButtonList3, 0x0002A090, 0x0002A094 },
+ { kLolButtonList4, 0x0002A0A0, 0x0002A0BE },
+ { kLolButtonList5, 0x0002A0C0, 0x0002A0E0 },
+ { kLolButtonList6, 0x0002A0E0, 0x0002A0FC },
+ { kLolButtonList7, 0x0002A100, 0x0002A106 },
+ { kLolButtonList8, 0x0002A110, 0x0002A114 },
+
+ { kLolLegendData, 0x000374F0, 0x0003752C },
+ { kLolMapCursorOvl, 0x0003752C, 0x00037545 },
+ { kLolMapStringId, 0x00029140, 0x0002917C },
+
+ { kLolSpellbookAnim, 0x00038668, 0x000386A0 },
+ { kLolSpellbookCoords, 0x000386A0, 0x000386B8 },
+ { kLolHealShapeFrames, 0x0002A140, 0x0002A190 },
+ { kLolLightningDefs, 0x00037B08, 0x00037B1C },
+ { kLolFireballCoords, 0x0001E6E2, 0x0001E8E2 },
+
+ { -1, 0, 0 }
+};
+
+const Game lolDosFloppyGames[] = {
+ { kLol, EN_ANY, -1, "6b843869772c1b779e1386be868c15dd", lolFloppyFile2G },
+ GAME_DUMMY_ENTRY
+};
diff --git a/tools/create_kyradat/misc.h b/tools/create_kyradat/misc.h
index 5379b8577b..3c252f32a8 100644
--- a/tools/create_kyradat/misc.h
+++ b/tools/create_kyradat/misc.h
@@ -498,6 +498,89 @@ const int kyra3Need[] = {
-1
};
+const int lolFloppyNeed[] = {
+ kLolIngamePakFiles,
+
+ kLolCharacterDefs,
+ kLolIngameSfxFiles,
+ kLolIngameSfxIndex,
+ kLolMusicTrackMap,
+ kLolGMSfxIndex,
+ kLolMT32SfxIndex,
+ kLolSpellProperties,
+ kLolGameShapeMap,
+ kLolSceneItemOffs,
+ kLolCharInvIndex,
+ kLolCharInvDefs,
+ kLolCharDefsMan,
+ kLolCharDefsWoman,
+ kLolCharDefsKieran,
+ kLolCharDefsAkshel,
+ kLolExpRequirements,
+ kLolMonsterModifiers,
+ kLolMonsterLevelOffsets,
+ kLolMonsterDirFlags,
+ kLolMonsterScaleY,
+ kLolMonsterScaleX,
+ kLolMonsterScaleWH,
+ kLolFlyingItemShp,
+ kLolInventoryDesc,
+
+ kLolLevelShpList,
+ kLolLevelDatList,
+ kLolCompassDefs,
+ kLolStashSetup,
+ kLolDscUnk1,
+ kLolDscShapeIndex1,
+ kLolDscShapeIndex2,
+ kLolDscScaleWidthData,
+ kLolDscScaleHeightData,
+ kLolDscX,
+ kLolDscY,
+ kLolDscTileIndex,
+ kLolDscUnk2,
+ kLolDscDoorShapeIndex,
+ kLolDscDimData1,
+ kLolDscDimData2,
+ kLolDscBlockMap,
+ kLolDscDimMap,
+ kLolDscShapeOvlIndex,
+ kLolDscBlockIndex,
+ kLolDscDoor1,
+ kLolDscDoorScale,
+ kLolDscDoor4,
+ kLolDscDoorX,
+ kLolDscDoorY,
+
+ kLolScrollXTop,
+ kLolScrollYTop,
+ kLolScrollXBottom,
+ kLolScrollYBottom,
+
+ kLolButtonDefs,
+ kLolButtonList1,
+ kLolButtonList1,
+ kLolButtonList2,
+ kLolButtonList3,
+ kLolButtonList4,
+ kLolButtonList5,
+ kLolButtonList6,
+ kLolButtonList7,
+ kLolButtonList8,
+
+ kLolLegendData,
+ kLolMapCursorOvl,
+ kLolMapStringId,
+
+ kLolSpellbookAnim,
+ kLolSpellbookCoords,
+ kLolHealShapeFrames,
+ kLolLightningDefs,
+ kLolFireballCoords,
+
+ -1
+};
+
const int lolCDFile1ENeed[] = {
kLolHistory,
-1
@@ -510,7 +593,6 @@ const int lolCDFile2Need[] = {
kLolMusicTrackMap,
kLolGMSfxIndex,
kLolMT32SfxIndex,
- //lolADLSfxIndex,
kLolSpellProperties,
kLolGameShapeMap,
kLolSceneItemOffs,
@@ -519,7 +601,6 @@ const int lolCDFile2Need[] = {
kLolCharDefsMan,
kLolCharDefsWoman,
kLolCharDefsKieran,
- //lolCharDefsUnk,
kLolCharDefsAkshel,
kLolExpRequirements,
kLolMonsterModifiers,
@@ -577,7 +658,6 @@ const int lolCDFile2Need[] = {
kLolLegendData,
kLolMapCursorOvl,
kLolMapStringId,
- //lolMapPal,
kLolSpellbookAnim,
kLolSpellbookCoords,
@@ -627,6 +707,7 @@ const GameNeed gameNeedTable[] = {
{ kKyra3, -1, kyra3Need },
+ { kLol, -1, lolFloppyNeed },
{ kLol, kLolCD, lolCDFile1ENeed },
{ kLol, kLolCD, lolCDFile2Need },