diff options
author | Filippos Karapetis | 2011-01-15 18:25:10 +0000 |
---|---|---|
committer | Filippos Karapetis | 2011-01-15 18:25:10 +0000 |
commit | f680e24146452172dfe87eddf3f15d29c04af60d (patch) | |
tree | 1342239d376cde748ba44b2381ff9ede2f7e424d /engines/sci/engine | |
parent | 0f9c33e02f1cb2c740c1eb0dcaad96dd22ec29e7 (diff) | |
download | scummvm-rg350-f680e24146452172dfe87eddf3f15d29c04af60d.tar.gz scummvm-rg350-f680e24146452172dfe87eddf3f15d29c04af60d.tar.bz2 scummvm-rg350-f680e24146452172dfe87eddf3f15d29c04af60d.zip |
SCI: Added a hack to fix bug #3122075 - "LB1: Game play freezes when taking shower"
This is a regression from the new kInitBresen/kDoBresen functions, enabled in r52467.
Many thanks to waltervn for his work in bisecting this. The actual bug should be
found, but since only this death scene has an issue, it's not really worth the
effort. The old functions are based on observations, so there are many differences in
the way that they behave. If another test case is found, then this shall be examined
further. Until then, this simple and unobtrusive hack will do.
svn-id: r55251
Diffstat (limited to 'engines/sci/engine')
-rw-r--r-- | engines/sci/engine/kmovement.cpp | 11 | ||||
-rw-r--r-- | engines/sci/engine/kscripts.cpp | 22 |
2 files changed, 33 insertions, 0 deletions
diff --git a/engines/sci/engine/kmovement.cpp b/engines/sci/engine/kmovement.cpp index 49f2ae4517..3c516f63f2 100644 --- a/engines/sci/engine/kmovement.cpp +++ b/engines/sci/engine/kmovement.cpp @@ -166,6 +166,17 @@ reg_t kSetJump(EngineState *s, int argc, reg_t *argv) { return s->r_acc; } +// TODO/FIXME: There is a notable regression with the new kInitBresed/kDoBresen +// functions below in a death scene of LB1 - the shower scene, room 215 (bug +// #3122075). There is a hack to get around this bug by modifying the actor's +// position for that scene in kScriptID. The actual bug should be found, but +// since only this death scene has an issue, it's not really worth the effort. +// The new kInitBresen/kDoBresen functions have been enabled in r52467. The +// old ones are based on observations, so there are many differences in the +// way that they behave. Check the hack in kScriptID for more info. Note that +// the actual issue might not be with kInitBresen/kDoBresen, and there might +// be another underlying problem here. + reg_t kInitBresen(EngineState *s, int argc, reg_t *argv) { SegManager *segMan = s->_segMan; reg_t mover = argv[0]; diff --git a/engines/sci/engine/kscripts.cpp b/engines/sci/engine/kscripts.cpp index 79cde7c5d9..810e8a13ee 100644 --- a/engines/sci/engine/kscripts.cpp +++ b/engines/sci/engine/kscripts.cpp @@ -264,6 +264,28 @@ reg_t kScriptID(EngineState *s, int argc, reg_t *argv) { } } + // HACK: Prevent the murderer from getting stuck behind the door in + // Colonel's Bequest, room 215. A temporary fix for bug #3122075. + // TODO/FIXME: Add a proper fix for this. There is a regression in this + // scene with the new kInitBresen and kDoBresen functions (r52467). Using + // just the "old" kInitBresen works. This hack is added for now because the + // two functions are quite complex. The "old" versions were created based + // on observations, and not on the interpreter itself, thus they have a lot + // of differences in the way they behave and set variables to the mover object. + // Since this is just a death scene where Laura is supposed to die anyway, + // figuring out the exact cause of this is just not worth the effort. + // Differences between the new and the old kInitBresen to the MoveTo object: + // dy: 1 (new) - 2 (old) + // b-i1: 20 (new) - 12 (old) + // b-di: 65526 (new) - 65516 (old) + // Performing the changes above to MoveTo (0017:033a) allows the killer to + // move. Note that the actual issue might not be with kInitBresen/kDoBresen, + // and there might be another underlying problem here. + if (g_sci->getGameId() == GID_LAURABOW && script == 215) { + warning("Moving actor position for the shower scene of Colonel's Bequest"); + writeSelectorValue(s->_segMan, s->_segMan->findObjectByName("killer"), SELECTOR(x), 6); + } + return make_reg(scriptSeg, address); } |