diff options
-rw-r--r-- | engines/kyra/detection.cpp | 16 | ||||
-rw-r--r-- | engines/kyra/lol.h | 1 | ||||
-rw-r--r-- | engines/kyra/script_lol.cpp | 13 |
3 files changed, 29 insertions, 1 deletions
diff --git a/engines/kyra/detection.cpp b/engines/kyra/detection.cpp index 0c05df5970..f72d58d1c6 100644 --- a/engines/kyra/detection.cpp +++ b/engines/kyra/detection.cpp @@ -1009,6 +1009,22 @@ const KYRAGameDescription adGameDescs[] = { "lol", "Extracted", { + { "GENERAL.PAK", 0, "2aaa30e120c08af87196820e9dd4bf73", -1 }, + { "CHAPTER7.PAK", 0, "eb92bf7ebb4e890add1233a6b0c810ff", -1 }, + { 0, 0, 0, 0 } + }, + Common::EN_ANY, + Common::kPlatformPC, + ADGF_NO_FLAGS + }, + LOL_FLOPPY_FLAGS + }, + + { + { + "lol", + "Extracted", + { { "GENERAL.PAK", 0, "996e66e81054d36249907a1d8158da3d", -1 }, { "CHAPTER7.PAK", 0, "cabee57f00d6d84b65a732b6868a4959", -1 }, { 0, 0, 0, 0 } diff --git a/engines/kyra/lol.h b/engines/kyra/lol.h index 90bd8643f5..803b17e9c6 100644 --- a/engines/kyra/lol.h +++ b/engines/kyra/lol.h @@ -730,6 +730,7 @@ private: int olol_prepareSpecialScene(EMCState *script); int olol_restoreAfterSpecialScene(EMCState *script); int olol_assignCustomSfx(EMCState *script); + int olol_findAssignedMonster(EMCState *script); int olol_checkBlockForMonster(EMCState *script); int olol_transformRegion(EMCState *script); int olol_calcCoordinatesAddDirectionOffset(EMCState *script); diff --git a/engines/kyra/script_lol.cpp b/engines/kyra/script_lol.cpp index c0292425cd..188ba681ee 100644 --- a/engines/kyra/script_lol.cpp +++ b/engines/kyra/script_lol.cpp @@ -1791,6 +1791,17 @@ int LoLEngine::olol_assignCustomSfx(EMCState *script) { return 0; } +int LoLEngine::olol_findAssignedMonster(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "LoLEngine::olol_findAssignedMonster(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); + uint16 o = stackPos(1) == -1 ? _levelBlockProperties[stackPos(0)].assignedObjects : findObject(stackPos(1))->nextAssignedObject; + while (o) { + if (o & 0x8000) + return o & 0x7fff; + o = findObject(o)->nextAssignedObject; + } + return -1; +} + int LoLEngine::olol_checkBlockForMonster(EMCState *script) { debugC(3, kDebugLevelScriptFuncs, "LoLEngine::olol_checkBlockForMonster(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); uint16 block = stackPos(0); @@ -2511,7 +2522,7 @@ void LoLEngine::setupOpcodeTable() { // 0x94 Opcode(olol_assignCustomSfx); OpcodeUnImpl(); - OpcodeUnImpl(); + Opcode(olol_findAssignedMonster); Opcode(olol_checkBlockForMonster); // 0x98 |