SCI: removing kDoBresen hack for sq5

adding detailed comment about sq5 scrubbing issue
not 100% fixed (waltervn should look into it), but at least it works now

svn-id: r51833
This commit is contained in:
Martin Kiewitz 2010-08-07 13:56:31 +00:00
parent 1c1eff9ec5
commit d2d22de911
2 changed files with 9 additions and 8 deletions

View file

@ -315,14 +315,8 @@ reg_t kDoBresen(EngineState *s, int argc, reg_t *argv) {
))) {
// Whew... in short: If we have reached or passed our target position
// Sanity check: make sure that destx, desty are inside the screen coordinates.
// They can go off screen in some cases, e.g. in SQ5 while scrubbing the floor (bug #3037351)
if (destx <= g_sci->_gfxScreen->getWidth() && desty <= g_sci->_gfxScreen->getHeight()) {
x = destx;
y = desty;
} else {
warning("kDoBresen: destination x, y would be off-screen(%d, %d)", destx, desty);
}
completed = 1;
debugC(2, kDebugLevelBresen, "Finished mover %04x:%04x", PRINT_REG(mover));

View file

@ -166,6 +166,13 @@ const SciScriptSignature larry6Signatures[] = {
{ 0, NULL, 0, 0, NULL, NULL }
};
// It seems to scripts warp ego outside the screen somehow (or maybe kDoBresen?)
// ego::mover is set to 0 and rm119::doit will crash in that case. This here
// fixes part of the problem and actually checks ego::mover to be 0 and skips
// TODO: this should get further investigated by waltervn and maybe properly
// patched. For now ego will shortly disappear and reappear a bit after
// this isn't good, but sierra sci also "crashed" (endless looped) so this
// is at least better than the original code
const byte sq5SignatureScrubbing[] = {
19,
0x18, // not