[Scummvm-git-logs] scummvm master -> 9c78d324a6a674d022d725cc05aee57de35fd216
dwatteau
noreply at scummvm.org
Thu Aug 11 12:02:18 UTC 2022
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
9c78d324a6 SCUMM: Add a bit more comments about Trac#832 workaround
Commit: 9c78d324a6a674d022d725cc05aee57de35fd216
https://github.com/scummvm/scummvm/commit/9c78d324a6a674d022d725cc05aee57de35fd216
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2022-08-11T14:00:51+02:00
Commit Message:
SCUMM: Add a bit more comments about Trac#832 workaround
Most of the workarounds in SCUMM explain a bit what's going on, even
when referring to a Trac issue, but this one didn't say much.
I tested that this problem still occurs today (boot param 5234 is
perfect for this), while the original interpreter within DREAMM
doesn't mind this script.
Changed paths:
engines/scumm/script_v5.cpp
diff --git a/engines/scumm/script_v5.cpp b/engines/scumm/script_v5.cpp
index 1f0e3fe67ff..d795dd86fb0 100644
--- a/engines/scumm/script_v5.cpp
+++ b/engines/scumm/script_v5.cpp
@@ -1231,9 +1231,20 @@ void ScummEngine_v5::o5_getActorMoving() {
void ScummEngine_v5::o5_getActorRoom() {
getResultPos();
int act = getVarOrDirectByte(PARAM_1);
- // WORKAROUND bug #832. This is a really odd bug in either the script
- // or in our script engine. Might be a good idea to investigate this
- // further by e.g. looking at the FOA engine a bit closer.
+
+ // WORKAROUND bug #832: Invalid actor XXX in o5_getActorRoom().
+ //
+ // Script 94-206 is started by script 94-200 this way:
+ //
+ // Var[442] = getObjectOwner(586) (the metal rod)
+ // startScript(201,[Var[442]],F)
+ // startScript(206,[Var[442]],F,R)
+ //
+ // Script 201 gets to run first, and it changes the value of Var[442],
+ // so by the time script 206 is invoked, it gets a bad value as param.
+ // This is a really odd bug in either the script or in our script
+ // engine. Might be a good idea to investigate this further by e.g.
+ // looking at the FOA engine a bit closer. The original doesn't crash.
if (_game.id == GID_INDY4 && _roomResource == 94 && vm.slot[_currentScript].number == 206 && !isValidActor(act)) {
setResult(0);
return;
More information about the Scummvm-git-logs
mailing list