diff options
author | Oliver Kiehl | 2003-05-24 18:56:19 +0000 |
---|---|---|
committer | Oliver Kiehl | 2003-05-24 18:56:19 +0000 |
commit | d7bc94e810942fc50fcafed74a9610754644576c (patch) | |
tree | f7cc95bf9906a7ead8ca67977431bd84e4e632bc /sky | |
parent | 14dd35b9763a9bbee4470825ee871179cd4e8493 (diff) | |
download | scummvm-rg350-d7bc94e810942fc50fcafed74a9610754644576c.tar.gz scummvm-rg350-d7bc94e810942fc50fcafed74a9610754644576c.tar.bz2 scummvm-rg350-d7bc94e810942fc50fcafed74a9610754644576c.zip |
add fnInteract
svn-id: r7898
Diffstat (limited to 'sky')
-rw-r--r-- | sky/logic.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/sky/logic.cpp b/sky/logic.cpp index 7f352c4f01..a0b4a82843 100644 --- a/sky/logic.cpp +++ b/sky/logic.cpp @@ -1092,8 +1092,18 @@ uint32 SkyLogic::fnIdle(uint32 a, uint32 b, uint32 c) { error("Stub: fnIdle"); } -uint32 SkyLogic::fnInteract(uint32 a, uint32 b, uint32 c) { - error("Stub: fnInteract"); +uint32 SkyLogic::fnInteract(uint32 targetId, uint32 b, uint32 c) { + _compact->mode += 4; // next level up + _compact->logic = L_SCRIPT; + Compact *cpt = SkyState::fetchCompact(targetId); + + uint16 *scriptNo = (uint16 *)SkyCompact::getCompactElem(_compact, C_BASE_SUB + _compact->mode); + uint16 *offset = (uint16 *)SkyCompact::getCompactElem(_compact, C_BASE_SUB + _compact->mode + 2); + + *scriptNo = cpt->actionScript; + *offset = 0; + + return 0; } uint32 SkyLogic::fnStartSub(uint32 a, uint32 b, uint32 c) { |